297 views

1 Answer

0 0 votes
Answer: 6

Since there are three entity sets in the given model, three tables corresponding to each of these entity sets is mandatory as shown below:

Now, we need to find how many extra tables are needed to fulfill the relationships.

1. Manages: Which employee manages what department can be fulfilled by adding eid in Dept table as a foreign key linked to primary key eid in Emp. The eid (foreign key) in Dept will be the manager of the department. NO EXTRA TABLE.

2. Reports: Subordinate reports to supervisor can be fulfilled by adding descriptive attribute supervisor_id  to the Emp table as a foreign key to eid in Emp. The employee in Emp who has a supervisor_id is a sub-ordinate and reports to some employee. The employee in Emp who has supervisor_id as NULL is a manager and not subordinate. NO EXTRA TABLE.

3. Works: Which employees is work in which departments can be fulfilled by creating a separate table Works (employees, departments) grouping many employees together with many departments. Works has multivalued attributes employees and departments. 1 EXTRA TABLE.

4. Owns: Which department owns which project can be fulfilled by creating a separate table Owns (departments, projects) grouping many projects together with many departments. Owns has multivalued attributes departments and projects. 1 EXTRA TABLE.

5. Assign: Which employee is assigned which project can be fulfilled by creating a separate table Assign (employees, projects) grouping many projects together with many employees. Assign has multivalued attributes employees and projects. 1 EXTRA TABLE.

6. Leads: Which employee leads what project can be fulfilled by adding eid in Project table as a foreign key linked to primary key eid in Emp. The eid (foreign key) in Project will be the Project Lead of the project. NO EXTRA TABLE.

$\text{Minimum tables needed = 3(mandatory)+3 (extra)=6}$

Position:
Show:

Related questions

5 5 votes
2 2 answers
9.6k
9.6k views
yg92 asked Jan 29, 2017
9,608 views
Doubts -1) When a ER diagram is given and no cardinalities are provided. How to determine relationship type 1:1 or 1:N or M:N ? Generally in such ER diagrams arrows ar...
0 0 votes
1 answers 1 answer
629
629 views
2 2 votes
1 answers 1 answer
3.9k
3.9k views
Arjun Kumar 1 asked Jul 31, 2017
3,859 views
how to represent foreign key in er diagram