retagged by
1,463 views
1 votes
1 votes

How can trainer id be p.key of Parts??

retagged by

1 Answer

0 votes
0 votes

Let us see how it works.

a) First of all "parts" is a weak entity , so it is in "many" side of the weak relationship "belongs to" .Also this entity is in "many" side of the relationship "maintained by".

b) Now as it is a many to one relation in both cases : i) From "parts" to "products" and

                                                                            ii) From "parts" to "trainer" entity

So no requirement to have separate tables for both the relations and hence they can be merged with the "parts" entity.Now we know that if no attribute is mentioned in the relationship also , it compulsorily contains the keys of participating entities.

So in the relationship "maintained by" we contain both "part-id" and "trainer-id" as its attributes so on merging with "parts" entity , the attribute "trainer-id"  has to be included in the table that will be formed by "parts" , "maintained by" and "belongs-to".

So the attribute set of the merged RDBMS table will be : {part-id , partname , trainer-id , p-id}

and the keys will be : {part-id , trainer-id , p-id}

Hence B is the correct option.

Answer:

Related questions

1 votes
1 votes
2 answers
1
PEKKA asked Nov 29, 2016
1,430 views
Any Good Resource to study this topic ? Or Could anyone explain this topic to me ?
0 votes
0 votes
0 answers
2
Shamim Ahmed asked Dec 18, 2018
305 views
How 1:1 cardinality with total participation of atleast 1 entity needs min no. of tables = 1 ?1:1 with partial participation of both entities needs min no of tables = 2?
3 votes
3 votes
2 answers
3
0 votes
0 votes
1 answer
4
ankitgupta.1729 asked Dec 16, 2017
373 views