Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 Database Design and Application Architecture
 Vehicle Year Make & Model

Author  Topic 

tytyguy
Starting Member

13 Posts

Posted - 2008-05-14 : 09:37:28
Ok, so I am about to start on my new venture of adding a drop down list of year make and models for customers to select. I am wondering how I should go about setting up the tables in my database. Right now, I have
-a Year table that contains YEAR and YEARID(primary)
-a Make table that contains MAKE and MAKEID(primary)
-a Model table that contains MODEL and MODELID(primary)
-a YearMakeModel table that contains YEAR, YEARID(foreign), MAKE, MAKEID(foreign), MODEL, MODELID(foreign), and YEARMAKEMODEL ID(primary).

I am thinking this isn't good DB design...what do you suggest?

http://www.tunerplaza.com

tytyguy
Starting Member

13 Posts

Posted - 2008-05-14 : 13:04:30
anyone?

http://www.tunerplaza.com
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-05-14 : 13:24:53
I think I'd do this:

MAKE - MakeName
Model - MakeName, ModelName, Year

Whether or not you add ID columns for a surrogate key is up to you. I prefer natural keys.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Database maintenance routines:
http://weblogs.sqlteam.com/tarad/archive/2004/07/02/1705.aspx
Go to Top of Page
   

- Advertisement -