Welcome Guest, Not a member yet? Register   Sign In
MySQL Table design
#10

[eluser]jedd[/eluser]
I like the sound of this approach!

I haven't pondered it deeply, but I would consider having the ID field of wheels/cars/autoparts as the same as the listing.ID. Given everything appears in listing, then each item's listing.ID is going to be unique.

Having wheels.ID (etc) as the PK would enforce uniqueness, and you'd wrap some code around inserts to make sure there were no attempts to put in duplicates, but this should be a modest effort.

Note that wheels could technically be seen as a part, so think carefully about whether you want to separate them.


Messages In This Thread
MySQL Table design - by El Forum - 03-30-2009, 04:24 PM
MySQL Table design - by El Forum - 03-30-2009, 04:41 PM
MySQL Table design - by El Forum - 03-30-2009, 05:05 PM
MySQL Table design - by El Forum - 03-30-2009, 07:16 PM
MySQL Table design - by El Forum - 03-30-2009, 07:32 PM
MySQL Table design - by El Forum - 03-30-2009, 07:34 PM
MySQL Table design - by El Forum - 03-30-2009, 08:35 PM
MySQL Table design - by El Forum - 03-31-2009, 05:24 AM
MySQL Table design - by El Forum - 03-31-2009, 07:53 AM
MySQL Table design - by El Forum - 03-31-2009, 08:04 AM
MySQL Table design - by El Forum - 03-31-2009, 11:59 AM
MySQL Table design - by El Forum - 03-31-2009, 10:01 PM
MySQL Table design - by El Forum - 03-31-2009, 10:04 PM
MySQL Table design - by El Forum - 03-31-2009, 10:34 PM
MySQL Table design - by El Forum - 04-01-2009, 07:20 AM



Theme © iAndrew 2016 - Forum software by © MyBB