The Gateway to Computer Science Excellence
+3 votes
639 views

Please explain how they merged.(Modified)

in Databases by Active (4.7k points)
edited by | 639 views
0
Is 4 given answrr???
0
Given answer is 3
0
@Bikram sir how to approach this question?
+2

This may help You.

0
can you please write down all the tables with all attributes,bcz I am not getting how to represent the relationship among all.
0
@ Prashant, we can merge two table only if one-one and total participation on both sides na??...

you are merging even when only one side has total participation, due to this there will several tupples of E4 for which there will 'NULL' values under 'A' and 'B' attribute..

A        B         E      F

1        2          1      2

2        3          4      5

null    null       5      6

null   null        7     8

now according to merging 'AE' should be key of this table, but AE could not be key since prime attribute(A) is NULL....
0
I think there is no rule to take 'AE' as a key.In this case 'E' will be only PK.
0
Yes here 3 tables are minimum require.

1 table for E2

1 table for E3

1 table for (R E4 )

1:1 with only single side total participation we always take 1 table.

so in total 3 tables require here.
0
yes sorry, i had not seen it.. but still it is not good practice to merge relations with total participation on one side since there will many null values in a table..
0

but still it is not good practice to merge relations with total participation on one side since there will many null values in a table

yes that's true.

0

in this diagram there is a mistake , see

 

for total participation Notation we use = means double line , but in this question use <= a extra arrow they used , which is completely wrong .

Arrow is only used in 1:1 or 1:N relationship , see this snap from korth


Though we  ignore this arrow here but it is wrong notation to represent total participation.

 

And this ER diagram need minimum 3 tables for conversion to relational model.

0
Sir,I think arrow is correct, bcz arrow with "=" represent 1:1 with total participation.
0
arrow is not correct, i discussed this issue with others and also check  DBMS book from korth to navathe , no where arrow is used to represent total participation.

Even you see my snap, it  also says without arrow.

"=" represent  total participation. no arrow needed , this decision is based on standard books.

To represent 1:1 or 1:N this should be mention explicitly on lines .

Only ME and ACE questions i find this kind of arrow even NO Gate question use arrow to represent  1:1 with total participation. As gate question don't support we say it is wrong notation.
0
sir, you are saying "=" represent 1:1 with total partition (without arrow)..

than how to represent  total participation with many-one or many-many...either we have to exlicitly mention cardinality ratio nos on lines or we have to use arrow
0
Okay sir,

It means,If we want to represent total participation with "one" or "many" then,always it must explicitly mentioned in the model,Am i right sir?
+1
yes , we need to use cardinality ratio explicitly to represent that .

Because " =  " represent total participation . This is standard notation.

And no book use arrow with = to represent 1:1 with total participation , even no gate papers i found which use this arrow notation , you check all gate questions on this conversion topic .. if you don't believe my words and check any standard books ...so based on ME or ACE question we should not believe it right ?
0
Okay, if this is true, then we are saved from considering "=" total participation with "many".
0
Why you believe my words ?

Check all gate questions on this topic, just a single search in GO will do that .. then see the diagrams and notations they use !!

i discussed this topic with people , at the end i conclude that no arrow is correct diagram . I did checked gate papers and books too .. no where arrow is used.

check navathe , korth  and settle the answer !!
+1
Now it is correct .:)

2 Answers

+3 votes
Best answer

1 table for E2
1 table for E3
1 table for (E1R E4 )
E1 has total participation with R, it needs no seperate table.
1:1 with only single side total participation we always take 1 table.


so in total 3 tables require here.

by Veteran (74.4k points)
edited by
0
Sir that geeksforgeeks point is wrong we will create separate table only in case of m:n..the answer is 4 only ...
+1 vote
Plz check my answer:
E2{ C,D,A,B }
E3{ E,F, A, B}
E4{ G,H,A,B}

Explanation:
A has total participation in R.
So no need of seprate table.
And R has 1:M relationship with all other tables so no need to maintain seprate table for R.

Correct me if I'm wrong!
by Active (4.9k points)
+1
Why not move R in E1. We cannot move E1 to any relation. Correct??
Answer:

Related questions

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,306 answers
198,321 comments
105,014 users