Quote:
|
Originally Posted by r937
yes, there is, but in this case you wouldn't want to, because it would be redundant with the primary key
|
I started reading this thread to better understand the idenfiying/non-identifying relationships.
It seemed to me that the identifying/non-identifying relationships boils down to, do we add a surogate key or not?
Now r937, why do you say it is redundant? Maybe I didn't understand it right.
Asuming that column1 and column2 form togheter the natural key, I thought that by adding a surrogate key, and by adding a constraint UNIQUE (column1, column2) , there shouldn't be any problem, and it's better than the table without the constraint just with the surrogate key.
This way you avoid having doubles in your table, and you have a surogate key. There is a small penalty for inserts and deletes, but it's not that huge.
Thanks