I am working on creating a sports card database. I am trying to figure out the best way to layout the tables. Here is the data I am working with.
Each card belongs to a set of cards and a sport Each set of cards belongs to a brand of cards Each brand of cards belongs to a manufacturer
That part I thought I had all worked out, until I thought about years. Not all manufacturers existed throughout all the years, not all brands were produced by the manufacturers during all of the years, and not every set was produced under its brand every year.
So how should I include the year into the database while reducing redundancy? Any design strategies would greatly be appreciated.
asked May 30, 2010 at 04:37 AM in Default
You could use StartDate and EndDate instead of adding rows for every year. When you want to show all years a certain brand was manufactured by a certain manufacturer you can use a tally/numbers table technique to produce the years.
E.g. your ManufacturerBrand join-table could look like this:
ManufacturerID int, BrandID int, ProductionStartDate Date, ProductionEndDate Date
answered May 30, 2010 at 04:32 PM