The Gateway to Computer Science Excellence
+2 votes


in Databases by Boss (15.9k points) | 1.1k views
I think Answer should be 3, but given is 4..

3 Answers

+7 votes
Best answer
No of table will be 3

E1, E2,E3 we need 3 tables

but as it gives 1:n relationship , so no more tables are needed
by Veteran (118k points)
selected by
Please mention the primary key and foreign key(if any) of each of the tables.
E3 will be saparate  with E is key
First E1 R will combine with key CG then E1 R P will combine with key E1 G
E2 will kept seperate with key G.
Primary key of table E3 i.e. E works as a foreign key in the relationship set E1PR. And primary key of E1PR is CG.

Is that correct?
+2 votes
While converting ER Diagram to Relation Table, We create a separate table for:

1. WEAK Entity.
2. STRONG Entity.
3. M:N Relationship.
4. Composite Attribute.
5. Multivalued Attribute.

So, answer = 3.
by Junior (911 points)
We don't create seperate table for composite attributes.
0 votes
I think the answer must be 4.

For E1,E2,E3 we will defiantly need one table each.

By putting primary key of E2 i,e G in E1's table we can specify the indentifing relationship R between them. Hence no need of table for R.

But For P we will need a different table in which we will put primary key of E3 i,e E and Primary key of E1 i,e C  as foreign keys and the primary key of the table for  P will be the combination of E and  C i,e EC

Hence we need total 4 tables( for E1, E2 ,E3 and for P)
by Active (3.3k points)
Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,737 questions
57,258 answers
104,735 users