Im designing a database structure and I would like that it's design could prevent erroneous connections.
I'll make a simple example, that I think it will be easy to understand, bellow are the tables:
Brand - Vehicle - Engine - Fuel Emision for Diesel test - Fuel Emision for Gasoline test - Fuel Emision for Trucks test - Speed test
Let's assume that one Vehicle has one Brand and one Engine, but there are several tipes of tests that you could do to the Vehicle.
How can I guarantee for example that the results of the "Fuel Emision for Trucks test" bellongs to an ID of a truck Vehicle
Is there any design that can hide certain tables to some type of car or make them unconnectable? Or some kind of a check?