Multiple Pk for a table!!! [message #55433] |
Fri, 24 January 2003 02:21 |
Raja
Messages: 57 Registered: March 2000
|
Member |
|
|
Hi
I 've a problem in basic concept. RDBMS says a table can have only one primary key(even multiple cols allowed for single key,ok). Which means i can have mutiple child table refering to the same PK or col Perhaps, multiple childs to the multiple cols in case of composite PK.
But it is also possible to relation between tables thru unique constraints. And we know a combo of unique and not null mimics PK.
Actually i tried to have three cols with this combo and mutiple child tables to refer. it works perfectly.
More elucidation helps to clear.
Thanks
|
|
|
Re: Multiple Pk for a table!!! [message #55434 is a reply to message #55433] |
Fri, 24 January 2003 03:17 |
sai sreenivas jeedigunta
Messages: 370 Registered: November 2001
|
Senior Member |
|
|
hello raja,
if u look at the functionality terms of PK, it says its a combo of Unique and Not Null, but IF u declare a column as a Unique and not null, it may not be a pk becos a pk is the one through which u Identify the entire table. Its a Beautiful concept of RDBMS.
For ex: Phno can be taken as not null and Unique combo (in some cases) but u wont use this to identify an Employee as u will use Empid....
sai
|
|
|