#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2013
    Posts
    5
    Rep Power
    0

    Unhappy Car Parts Catolgue Database design


    Can anyone point me to a good source for database desgin related to a car parts catolgue. I'm having difficulty with a proper layout.
  2. #2
  3. Plays with fire
    Devshed Novice (500 - 999 posts)

    Join Date
    Aug 2003
    Location
    Barsoom
    Posts
    942
    Rep Power
    96
    This is a gargantuan question and really not one that can be answered with a lot more information.

    Cars have a lot of parts and some of those parts have subparts.

    Perhaps instead of trying to learn how to build a car parts database it would be more helpful to learn how to build relational databases.
    “Be ashamed to die until you have won some victory for humanity.” -- Horace Mann

    "...all men are created equal." -- US Declaration of Independence
  4. #3
  5. SQL Consultant
    Devshed Supreme Being (6500+ posts)

    Join Date
    Feb 2003
    Location
    Toronto Canada
    Posts
    27,120
    Rep Power
    4274
  6. #4
  7. Plays with fire
    Devshed Novice (500 - 999 posts)

    Join Date
    Aug 2003
    Location
    Barsoom
    Posts
    942
    Rep Power
    96
    Originally Posted by r937
    Man...is there anything you _don't_ know?
    “Be ashamed to die until you have won some victory for humanity.” -- Horace Mann

    "...all men are created equal." -- US Declaration of Independence
  8. #5
  9. SQL Consultant
    Devshed Supreme Being (6500+ posts)

    Join Date
    Feb 2003
    Location
    Toronto Canada
    Posts
    27,120
    Rep Power
    4274
    Originally Posted by Frank Grimes
    Man...is there anything you _don't_ know?
    yes, *tons*

    ask my two ex-wives

    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
  10. #6
  11. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2013
    Posts
    5
    Rep Power
    0
    Originally Posted by Frank Grimes
    This is a gargantuan question and really not one that can be answered with a lot more information.

    Cars have a lot of parts and some of those parts have subparts.

    Perhaps instead of trying to learn how to build a car parts database it would be more helpful to learn how to build relational databases.
    Thanks Frank.
    To give you more details, below is what my DB will/should have:-
    Vehicle - Model, Vin No, Type
    Divisons - Group, Section, Sub Section
    Parts - Part No., Item No, Description, Qty, Remarks

    A Model can have many Groups, Sections and Sub Sections and vice versa. (A Section might not have a Sub Section)

    A Part No. in the Parts table can be in different Sections or Sub Sections for the same machine model. This Part No. can also have different Qty in the different Section

    The Description can be the same for different Part No.
    Hope this explains what I'm looking at doing. (Electronic Parts Catologue)
  12. #7
  13. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2013
    Posts
    5
    Rep Power
    0
    Thanks r937. This is a great source.
  14. #8
  15. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2013
    Posts
    2
    Rep Power
    0
    Great diagram!
    To take this question a little further, how might one handle alternate part numbers?

    E.g. it's a different part number but it's really the same part? (e.g.EOM vs aftermarket parts)
  16. #9
  17. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2013
    Posts
    2
    Rep Power
    0
    My thoughts are to have a

    'PartsGroup' table

    It will have a groupID and partId's

    so a bunch of parts that are the same will have the same group number with unique partIds.

    That way when I want to show related parts, I can query the partsGroup table, get the groupId if one exist and then all the partId's belonging to that group.

    Let me know if you have any better ideas.

    Thanks!

IMN logo majestic logo threadwatch logo seochat tools logo