My question may be trivial but I just have a hard time abstracting table relationships :P
I have 3 tables:
 -> primary key
Datas: [ID], Data
DataValues: DataID, ValueTypeID, Value
ValueTypes: [ID], Name
The first is the main table;
The second is an value-attributing table and reason of this topic;
The third is the value type definer;
The problem is as follows:
I want to be sure on this low-level model that ONE ValueType record only gets refferenced by ONE Data record.
Datas: ID -> 27, Data -> "Some Data"
ValueTypes: ID -> 14, Name -> "Length"
DataValues: DataID -> 27, ValueTypeID -> 14, Value -> 9
I want not to be possible to add another record in DataValues with DataID = 27 AND ValueTypeID = 14
It should allow, though, DataID = 27 AND ValueTypeID = 18 or DataID = 65 AND ValueTypeID = 14, for example.
View Complete Post