• edited by
2,515 views
2 2 votes

Consider the following ER diagram depicting the relationship of an employee and supervisor:

What is the possible relation if the above ERD is mapped into a relational model?

(a)

Employee (EmpID, BirthDate, Salary, Name(FirstName, MiddleName, LastName))

(b)

Employee (EmpID, BirthDate, Salary, Name(FirstName, MiddleName, LastName)}

(c)

Supervision (EmpID, BirthDate, Salary, Name(FirstName, MiddleName, LastName), EmpID)

(d)

Supervisor (SupervisorID, BirthDate, Salary, Name(FirstName, MiddleName, LastName),EmpID), {EmpID})

(e)

Employee (EmpID, BirthDate, Salary, Name(FirstName, MiddleName, LastName), SupervisorID).

Also mention how the answer will change if instead of 1:N relationship we have 1:1 and m*n relationship

IMG

1 Answer

3 3 votes

For actual quetion:

only on table is needed . 

Employee- Supervision(EmpID, BirthDate, Salary, Name(FirstName, MiddleName, LastName, supervisior id (FK))

If we take 1 to 1

1 table are required one for

Employee- Supervision (EmpID, BirthDate, Salary, Name(FirstName, MiddleName, LastName, supervisor id (FK))

If we take M to N

Two tables are required one for

Employee (EmpID, BirthDate, Salary, Name(FirstName, MiddleName, LastName)

Supervision (supervisor id , supervee id) both one candidate keys include supervisor id and superveeid.

• edited by
Position:
Show:

No related questions found