The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
+5 votes
207 views

asked in Databases by Boss (5.1k points) | 207 views

1 Answer

+6 votes
Best answer

First of all we have to check the ER diagram carefully.In this we have :

A) Strong entity employee with eid as the key

B) Weak entity dependent with dob as the partial key

C) A multivalued attribute phoneno..

So we need to have 3 relations :

a) For employee with eid as key

b) For {dependent , has} with {eid,dob} as key with eid being identifier

c) For multivalued attribute phoneno..

 

So no of attributes which are non prime in employee = 2 [which are dob,ename]

    no of attributes which are non prime in {dependent , has} = 1 [which is dname only]

 

Hence C) is the correct answer..

answered by Veteran (96.3k points)
selected by

I'm not getting why multi-values atrr.(phoneno.) needs special attention! 

Table-1(Employee){e_id,e_name,dob,phone_no}

Table-2(Has){e_id,dob}

Table-3(Dependant){d_name,e.id,dob}

Let me know where am I lacking?

This is the heuristic followed for multivalued attribute..U have to form a separate table for it..
So finally I'm having how many tables ?
can your write those?
ok let's assume that we have the third table for the phone number but why does the primary key of the phone number table has to be part of the primary key of the employee table.

and more than 1 employee can have the same phone number.

I think it should not be part of primary key.
that's what i'm trying to tell!

Ok, i got it! follow this, they explained everything about it! thanks Habib!

https://www.tutorialcup.com/dbms/er-model-into-tables.htm

 

Now the composite key that has been created is a primary key for stud_hobby table while hobby attribute get a miss from the student table.

Now relating to our question since phone no has been moved out from employee table. thus leaving us with 2 non-prime attributes. Am i correct?

and the phone no along with employee id would be primary key for phone table



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

28,834 questions
36,688 answers
90,626 comments
34,641 users