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

From: Mathieu Pagé <informatique_remove_this__at_csfinc.com>
Date: Thu, 20 Jan 2005 16:38:04 GMT
Message-ID: <M7RHd.36816$06.16864_at_clgrps12>


-CELKO- a écrit :

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

Hi CELKO,

Again, your explanations are clear, thank you.

Mathieu P. Received on Thu Jan 20 2005 - 17:38:04 CET

Original text of this message