Options A)4 B)3 C)2 D)1.
Answer B.
Explanation.
Let relation R1 is composed of table emp(ssn,name, Superssn). A query like this can be made from single table like. Find the employee ssn, name, super visor ssn, supervisor name from emp table. An ssn will map to a single supervisor and a supervisor can map to many employee.
In many to many relationship like "a student can take many subjects and many students can take a subject". it needs two table.eg. student(rollno,subject,name) where pk= roll no and subject. and fk = subject.
Foreign key map to pk of subjet (Subjetid, Subjname, Roomno).
Hence it required 3 tables
Answer B.
Explanation.
Let relation R1 is composed of table emp(ssn,name, Superssn). A query like this can be made from single table like. Find the employee ssn, name, super visor ssn, supervisor name from emp table. An ssn will map to a single supervisor and a supervisor can map to many employee.
In many to many relationship like "a student can take many subjects and many students can take a subject". it needs two table.eg. student(rollno,subject,name) where pk= roll no and subject. and fk = subject.
Foreign key map to pk of subjet (Subjetid, Subjname, Roomno).
Hence it required 3 tables
No comments:
Post a Comment
Note: only a member of this blog may post a comment.