retagged by
942 views
1 votes
1 votes

In a self referential relationship many to many relationship set, how minimum many tables are required to store in case of partial participation. 

Example: If an employee can report to several managers and manager can supervise any number of employees-

Shouldn't it be 1 table with compose candidate key as Eid,Supid

retagged by

1 Answer

0 votes
0 votes
Yes, You can but it will create redundancy.

Suppose,In employee table primary key or candidate key is EmpID.

So From EmpID we can derive all the other attribute like EmpID--->Ename,gender,city etc.

Now, If we put SupID in main Employee table then we can't say EmpID-->SupID. So Candiadate key will become EmpID,SupID.

Because Of above candidate key EmpID----->Ename,gender,city etc. become partial dependency so whole relation will come in 1NF.

 

Second reason is , Here many to many partial relation so employee may have supervisor or may not be. If employee doesn't have supervisor so SupID become NULL and It it is not possible because SupID is primary key of employee table and Primary key doesn't contain NULL value.

Related questions

0 votes
0 votes
1 answer
2
0 votes
0 votes
1 answer
3
2 votes
2 votes
0 answers
4
ajaysoni1924 asked Mar 28, 2019
539 views
Explain the distinction between condition-defined and user-defined constraints.Which of these constraints can the system check automatically?Explain your answer.