in Databases edited by
1,347 views
1 vote
1 vote

Consider The Following Schema:-  

The minimum number of tables needed to represent E1 , E2and E3  are ______

 

Soln. According to me Answer should be 2 because We can merge

      1.  R1 and E2 in one Relation

       2. E1,R2,E3 in one because its total participation on both the sides.

So total 2 Tables Should be Enough.

in Databases edited by
by
1.3k views

3 Comments

Its answer should be 2.
0
0

@Na462 , @Jason , What if Relation R2 is M : N relation?

Shouldn’t we consider the type of relation it is??

Please explain !

0
0
The Type of relation R2 is 1:M you can see that in given ER diagram.
0
0

2 Answers

2 votes
2 votes

NO , number of table required for above diagram will be three not two .

one table $ E_2 R_1$ [ $\underline{AD}$ $F$]   

second table $R_2 E_3$ [$\underline G H A$ ]

third table $E_1 [ \underline{A}  B C]$ 

we cant merge $E_1$ with  $R_2 E_3$ because relation $R_2$ has key G ,and A is not key of relation  which will produce redudancy ,so we can't merge.total participation of ralation is given towards  $E_1$ ,so participation will not arise but redudancy is still there . so we have to keep seperate  $E_1$ .

1 comment

But A is the key of the relation E1.
0
0
0 votes
0 votes

I think the answer depends on the type of relation R2 is.

If R2 is

  1. one to one relation then we can merge both entities in to single entity as both the entities are total participating entities.(Total 2)
  2. one to many or many to one, then we need two tables for E1 and E3 (Total 3)
  3. Many to many need 3 tables for R2 E1 and E3 (Total 4)

1 comment

Didn't read the question properly .. Ya the minimum number of tables required is 2
0
0