I need to model charts such as the one displayed below...
... and came up with the following:
For the sample chart I originally showed..
charts.nameis "Custom transactions",
x_legendis "Customer Group"
series.nameis "2007" for position 0 and "2006" for position 1,
categories.nameis "Foreign" for position 0, "Specialty Stores" for positions 1, etc.
chart_values.valuewill be the value for a given series and category such as $14,000,000 for series "2007" and category "Foreign".
As seen, the unique series can be identified solely on
position, (and similarly for categories, however, I will no longer be saying so), and thus
series.idseries is redundant. Does this violate the 1st, 2nd, 3rd, or Boyce and Codd Normal Form?
Regardless of normalization purity, I am also concerned (yet don't know why) with the implications of using composite key
series primary key. For my application, a backend configuration page will allow the user to add/remove categories and series, rename them, change the position order, etc. To change a series name, the client can provide the chart ID and series position along with the new desired value. To change position, the client could provide an array of the previous positions in a given order
[2, 0, 1, 3]. Are there any negative implications of using position in a group in an entities primary key (other than needing to change the primary key upon changing position)?