clamum
Lifer
I have a question regarding foreign keys and table structure.
Assume I have multiple tables for each type of an object, say vehicles. One for cars, one for trucks, one for personal watercraft, etc.
I also have a customer table that holds customer contact information.
I also have a table, seller, that I would like to have hold a customer id, a vehicle id, a date field (which will be updated periodically), and a hold field that indicates if a customer's vehicle is temporarily on hold.
My problem is that I am not sure how to link the seller table to the vehicle tables. I know how to link the seller table to ONE table's vehicle id field, but not multiple. If that's even possible.
One possible solution would be to combine all of the vehicles into one table, and add a type field to it to indicate the type of vehicle. I am not sure if this is a good design practice or if it does not matter.
FYI I'm using MySQL 4.0.25. I can link a picture to a E-R diagram if that makes it easier to understand. Thanks for any help.
Assume I have multiple tables for each type of an object, say vehicles. One for cars, one for trucks, one for personal watercraft, etc.
I also have a customer table that holds customer contact information.
I also have a table, seller, that I would like to have hold a customer id, a vehicle id, a date field (which will be updated periodically), and a hold field that indicates if a customer's vehicle is temporarily on hold.
My problem is that I am not sure how to link the seller table to the vehicle tables. I know how to link the seller table to ONE table's vehicle id field, but not multiple. If that's even possible.
One possible solution would be to combine all of the vehicles into one table, and add a type field to it to indicate the type of vehicle. I am not sure if this is a good design practice or if it does not matter.
FYI I'm using MySQL 4.0.25. I can link a picture to a E-R diagram if that makes it easier to understand. Thanks for any help.