• retagged by
10,198 views
6 6 votes

Consider the following ER diagram:

If A has 100 entities, B has 1000 entities, and C has 10 entities, what is the maximum number of triples of entities that could be in the relationship set for R?

4 Answers

Best answer
5 5 votes

1000 tuples will be in relationship set!

• selected by
5 5 votes

In relation R participation of A is many while participation of B and C is one . That means there is 1 to 1 relation between B and C,many-one between A and B, many to one between A and C.

A to B is many to one that means in every relationship,  only one entity of B can participate and many entity of A is participate in one relationship. So, total number of triples =  1000 triples .

As B have 1000 triples and each entity of B must take participation (maximum participation) .....(i)

B and C is one to one. So, only 10 triples are possible.  ...(ii)

A to C also many to one relation, C will also form 10 triples. ...(iii)

among (i) , (ii) and (iii) 1000 is maximum number of triples of entities that could be possible in the relationship set for R.

So maximum triples can be 1000 .

• edited by
1 1 vote

edited####=>>

I strongly suggest that all answers here are wrong and interpreted the question very wrongfully..

@Arjun@Bikram@Manu Thakur

in a relationship in ER model with n relations participating together we NEVER TAKE 2 RELATIONS AT A TIME AND SAY 1:m or 1:1 etc..

THE RULE IS TAKE (n-1) at a time with the other one..

so here AB and C; BC and A;AC and B are only 3 categories of saying whether they are x:y (x,y ∈ {1,m} ) .

YOU CAN'T JUST INVENT A 1:M OR WHATEVER RELATIONSHIP BETWEEN ONLY 2 OF THEM...THIS INTERPRETATION IS NOT CORRECT.

TO DO THAT FIRST CONVERT IT TO SOME DUAL RELATIONSHIP MODELS WHICH IS OF NO NEED HERE.

for A,B,C its m,1,1 given in diagram

meaning..

stmt_1)for one pair of A,B there can be at most 1 C

stmt_2)for one pair of A,C there can be at most 1 B

stmt_3)for one pair of B,C there can be at most m A's

so,  A,B->C ; A,C->B

******we can never know if A->B , A->C, B->C , C->B holds or not.*******

here Candidate keys are both A,B and A,C

and A,B,C is a strict superkey.

now, this two fd together never indicates B->C or C->B

A1,B1,C1

A2,B1,C1

A3,B1,C2

all can be in R

 

EVEN IF THEY DID, THAT DOES NOT MEAN THAT YOU STATE A RELATIONSHIP ONLY BETWEEN 2 OF THEM DIRECTLY.

IN A STATEMENT DICTATING RELATIONSHIP, 3 RELATIONS MUST BE THERE IF YOU'RE INTERCEPTING TERNARY RELATIONSHIP.

now the very fact that both AB and AC are candidate keys in turn makes each of A,B & C a prime attribute.

so none of them can contain NULL value.

now it asks for maximum number of triples in R,

so answer must be    100*min(1000,10)=1000

 

• edited by
0 0 votes

Consider a case if all entities had many participation,

then the maximum number of possible triples in a ternary relationship R(A, B, C) would simply be the Cartesian product:

100 × 1000 × 10 = 1,000,000 triples

However, in this case we are given that, both B and C have one participation, meaning:

  • Each B and each C can appear in only one triple

  • They form a bottleneck in the relationship


Since each triple must use a unique B and unique C,

the maximum number of distinct (B, C) pairs that can exist is limited by:

min⁡(1000,10) = 10→ This is the maximum "neck size" allowed by the B–C pairing constraint.

Now, since A has many participation, each of the 100 A values can pair with each of the 10 unique (B, C) pairs.


Final Computation:

Max triples = Number of A values × Max (B, C) pairs = 100 × 10 = 1000


Hope this helps😊

Answer:
Position:
Show:

Related questions

0 0 votes
1 1 answer
882
882 views
Sk Jamil Ahemad asked Feb 1, 2022
882 views
Please explain with some example that How Right to Left associativity takes place in case of Ternary operators?
1 1 vote
1 1 answer
980
980 views
Kalpataru Bose asked Jul 27, 2018
980 views
Let "if x then y else z" denote the expression and this expression can be represented ad "?xyz" using ternary prefix operatorthe prefix operator for the following express...
3 3 votes
2 2 answers
3.2k
3.2k views
rahul sharma 5 asked Mar 8, 2018
3,163 views
Why to prefer binary search over ternary search?Can someone give recreance relation for ternary search,so that i can compare both
5 5 votes
1 1 answer
3.0k
3.0k views
hacker16 asked Jan 20, 2018
2,952 views
Someone Please Explain thishttps://gateoverflow.in/2046/gate2014-3-12