| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: How to represent a total-and-exclusive relation into a relational database
>> that the UNIQUE clause above is useless since 'vin' is our primary
key, I can not see how we could get any vin-vehicle-type pair that are
not unique. Did I miss something ? <<
No, the UNIQUE is redundant, but the extra UNIQUE constraints help queries. You can also use UNIQUE (vehicle_type, vin) to change the order of the index.
When I go down the hierarchy to a table with (vin, vehicle_type) as its primary key, I need to have a UNIQUE constraint for the REFERENCES clause that has both columns in the parent table.
This depends on the indexing methods in your SQL product, of course. Received on Wed Jan 19 2005 - 19:32:06 CST
![]() |
![]() |