Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.theory -> Re: How to represent a total-and-exclusive relation into a relational database

Re: How to represent a total-and-exclusive relation into a relational database

From: -CELKO- <jcelko212_at_earthlink.net>
Date: 19 Jan 2005 17:32:06 -0800
Message-ID: <1106184726.608986.206890@z14g2000cwz.googlegroups.com>


>> 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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US