I have a standard automotive shopping type site. So far my MySQL database is set up with the following tables:
categories
customers
employees
orders
products
shippers
suppliers
I need to add some functionality to the site in that a user through list boxes first selects the 'make' then 'model' then 'year' of the car for the specified parts. Alot of the years will go in a group for instance a 1972-75 Pinto will produce the same product listings. But a Pinto from 76-78 produces a completely different listing.
My question is...
How should I go about creating these tables? Do I create a table that contains an 'autoid' field and then 'make' then 'model' and then a seperate table that joins productids and autoids. Then where does the model year of the car come in?
I dont want my database to read
id:1 make: ford model: pinto year: 1975
id:2 make: ford model: pinto year: 1976
I know this is a bad idea.
In addition I intend to add a forum at a later date so if you pick up anything in the database that makes it appear as though a forum just wont fit please let me know.
Im new to databases and am very concerned about update anomolies. I should also mention that my host only allows one database so if it seems insane trying to get all this into one spot thats why. Also I'm very open to any suggestions on my current database layout particulary if you think it sucks Thanks -Sean