mysql - Storing footnotes related to fields -



mysql - Storing footnotes related to fields -

take next (straightforward) transaction table stock trades:

trade date | shares | cost | commission | total amt 2/11/2013 | 100 | $10 | $10 | $1000

etc.

let's wanted store footnote-like comment(s) on of these fields. there best-practices kind of storage?

i thinking of 2 options:

1) add together fields in transactions table -- 1 per primary value -- store comment ids in plain text, perhaps separated bar (|), , parse through them @ runtime. solution doesn't allow joins, preserve transaction list in more normal fashion.

2) alter table transactions more name-value storage, have footnotes placed related table, usual lookup table between them. solution allows joins, slow produce results, , isn't human-readable. incidentally, name-value table more this:

item | value | footnoteid date|2/11/2013|22 shares|100|0 price|$10|24

etc.

thanks tips.

mysql normalization

Comments

Popular posts from this blog

javascript - mongodb won't find my schema method in nested container -

How do you set up a perforce server to work over the internet? -

ios - Lagging ScrollView with UIWebview inside -