Hello all,
I am working on a database to store mutual fund data, and one table in particular to keep distributions for the fund.
The table already exists and was designed by my predecessor, and I think so far it is a good design. I will try to explain as best I can...
Columns:
id (pk, auto increment),
fundId (identifies to related fund)
dtAsOf (date of the distribution)
[3 other relevant date fields],
nValue (amount of the distribution)
Technically, I don't think I need id as fundId/dtAsOf could be a unique key, but it already exists and I generally do like to have the "id" field for tables. I have a data feed from a warehouse that populates this table, and comes in monthly. I have just learned of a requirement to have a 2nd feed come in yearly, and give a breakdown of the nValue. I think I have two correct options here, and one incorrect option, but I would like some validation on my thought process here.
One important note is that the sum of the breakdown does not equal the nValue, it's only a partial breakdown.
1) I would like to just add nValueBreakdown1 & nValueBreakdown2 columns to the original table, and when I find the fundId and dtAsOf in the yearly source, update the row with the breakdowns.
2) Add a second table with an id (pk), table1_id (fk), nValueBreakdown1 and nValueBreakdown2. This seems like overkill, but it would at least still be a good design, right?
3) Add a second table which is basically a duplicate of the 1st with the two additional columns. The reason for this is the data source is separate from the first table, even though the data is the same. To me, that is not an acceptable reason to add a new table with duplicate data.
What are your thoughts on these approaches? Thanks for sharing. Please ask any questions if anything was unclear.