edited by
18,229 views
36 votes
36 votes

Let $E_1$ and $E_2$ be two entities in an $E/R$ diagram with simple-valued attributes. $R_1$ and $R_2$ are two relationships between $E_1$ and $E_2$, where $R_1$ is one-to-many and $R_2$ is many-to-many. $R_1$ and $R_2$ do not have any attributes of their own. What is the minimum number of tables required to represent this situation in the relational model?

  1. $2$
  2. $3$
  3. $4$
  4. $5$
edited by

4 Answers

Best answer
51 votes
51 votes

We need a separate table for many-to-many relation.
one-to-many relation doesn't need a separate table and can be handled using a foreign key.
So, answer is $B$ - $3$ tables.

Reference: MIT notes.

edited by
14 votes
14 votes

Minimum no. of table required:

Relationship Type                 Participation # of Tables
1-1 Both Side Partial 2
1-1 1: Partial  1: Full 1
1-m Both Side Partial 2
1-m 1: Full       m: Partial 1
1-m 1: Partial  m: Full 2
m-m Both Side Partial 3
m-m m: Partial m: Full 2
m-m Both Side Full 1

m-1 relationship behave like 1-m . 

 

This question belongs to the 2 categories:


R1 :- it's 1-m(Both side Partial) relationship which need 2 tables 1 table foe E1 and other for E2(combine with R1 ) 

R2:- it's m-m(Both side Partial) relationship which need 3 tables 1 table for E1 , 1 table for R2 & 1 table for E2 . but E1 and E2 is already counted so, only remaining R2 is required .

Min. no. of table :- E1,E2,R2 = 3

9 votes
9 votes

Answer is 3 tables

–3 votes
–3 votes

Answer (c)
The situation given can be expressed with following sample data.

E1
a
b
c

E2
x
y
z

R1
E1  E2
a    x
a    y
b    z


R2
E1   E2
a     x
a     y 
b     y 
Answer:

Related questions

39 votes
39 votes
3 answers
1
Kathleen asked Sep 22, 2014
19,959 views
The following table has two attributes $A$ and $C$ where $A$ is the primary key and $C$ is the foreign key referencing $A$ with on-delete cascade.$$\begin{array}{|c|c|} \...
53 votes
53 votes
5 answers
3
26 votes
26 votes
3 answers
4