1

We have a database structure like the one shown in the (very simplified) diagram below:

enter image description here

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?

MDCCL
  • 8,530
  • 3
  • 32
  • 63
Guilherme
  • 111
  • 4

0 Answers0