GATE CSE
First time here? Checkout the FAQ!
x
+2 votes
105 views

asked in Databases by Loyal (3.1k points)   | 105 views

1 Answer

+3 votes

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 (65k points)  

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

Top Users Feb 2017
  1. Arjun

    5386 Points

  2. Bikram

    4230 Points

  3. Habibkhan

    3952 Points

  4. Aboveallplayer

    3086 Points

  5. Debashish Deka

    2564 Points

  6. sriv_shubham

    2318 Points

  7. Smriti012

    2240 Points

  8. Arnabi

    2008 Points

  9. mcjoshi

    1696 Points

  10. sh!va

    1684 Points

Monthly Topper: Rs. 500 gift card

20,863 questions
26,022 answers
59,696 comments
22,133 users