We have a database structure like the one shown in the (very simplified) diagram below:
As you can see, there is a table Categories, holding data like this:
Id Description
1 Car
2 Truck
The table VehicleParts holds the data that correlates which vehicle has which part.
My question
How can I guarantee that one row in the VehicleParts table does not reference a Version of a Car and a Part of a Truck or vice versa?
