Q5: ER Diagram Error Analysis & Correction

Database Management, Spring 2026 — Assignment #3

Part A: Original (Incorrect) ER Diagram

Original Design:
DEPARTMENT DeptCode Name Manager ID-Number Phone Name ✗ Error 1 HAS (1) (M) EMPLOYEE ID-Number Name Phone Project Project-ID Resp. Dept ProjectName StartDate EndDate ✗ Error 2 & 3

Part B: Errors Identified(錯誤分析)

Error 1: Manager should NOT be a composite attribute of Department
(Manager 不應該是 Department 的複合屬性)
Error 2: Project should NOT be an attribute of Employee
(Project 不應該是 Employee 的屬性)
Error 3: "Responsible Department" should NOT be an attribute of Project
(Responsible Department 不應該是 Project 的屬性)

Part C: Corrected ER Diagram

DEPARTMENT DeptCode Name EMPLOYEE ID-Number Name Phone PROJECT Project-ID ProjectName StartDate EndDate HAS (1,1) (1,N) MANAGES (1,1) (0,1) WORKS_ON (0,N) (1,N) RESPONSIBLE _FOR (0,N) (1,1)

Summary(摘要)

ComponentOriginal (Incorrect)Corrected
Manager Composite attribute of Department
Redundant, duplicates Employee data
MANAGES relationship (Employee — Department)
1:1, reuses existing Employee entity
Project Composite attribute of Employee
Cannot model M:N, has own PK
Separate PROJECT entity
With Project-ID, ProjectName, StartDate, EndDate
Responsible Dept Attribute inside Project composite
Entity ref stored as attribute
RESPONSIBLE_FOR relationship (Dept — Project)
1:M, proper ER modeling
Employee-Project Not modeled (Project is just an attribute)
WORKS_ON relationship (M:N)

Cardinality Rationale(基數說明)

RelationshipCardinalityExplanation
HASDept(1,1) — Emp(1,N)Each employee belongs to exactly one department; each department has at least one employee.(每個員工屬於一個部門;每個部門至少有一個員工。)
MANAGESDept(1,1) — Emp(0,1)Each department has exactly one manager; an employee may manage at most one department (most don't).(每個部門有一個經理;一個員工最多管理一個部門。)
WORKS_ONEmp(0,N) — Proj(1,N)An employee can work on many projects (or none); each project has at least one employee.(員工可以參與多個專案;每個專案至少有一個員工。)
RESPONSIBLE_FORDept(0,N) — Proj(1,1)Each project has exactly one responsible department; a department can be responsible for many projects.(每個專案有一個負責部門;一個部門可以負責多個專案。)

Assignment #3 — Database Management, Spring 2026 — 1134542 俞綱皓