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

asked in Databases by Loyal (3.3k points)   | 128 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 (66.6k 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 Jul 2017
  1. Bikram

    4386 Points

  2. manu00x

    2464 Points

  3. Debashish Deka

    1850 Points

  4. joshi_nitish

    1686 Points

  5. Arjun

    1340 Points

  6. Hemant Parihar

    1184 Points

  7. Arnab Bhadra

    1112 Points

  8. Shubhanshu

    1080 Points

  9. Ahwan

    900 Points

  10. rahul sharma 5

    732 Points


24,031 questions
30,983 answers
70,430 comments
29,358 users