0% completed
The table's primary key is a composite key consisting of {Employee_ID, Project_ID} because:
Partial Dependency occurs when a non-key attribute depends only on a part of the composite primary key.
Identify Dependencies:
Final Result:
To achieve 2NF, we need to remove partial dependencies by creating separate tables for each entity.
Employee
TableThis table stores information specific to each employee.
Employee Table
Employee_ID (PK) | Employee_Name |
---|---|
101 | Alice |
102 | Bob |
103 | Charlie |
Primary Key: Employee_ID
Explanation:
Employee_ID
.Project
TableThis table stores information specific to each project.
Project Table
Project_ID (PK) | Project_Name | Project_Manager |
---|---|---|
P1 | Alpha | John |
P2 | Beta | Sarah |
P3 | Gamma | Alice |
Primary Key: Project_ID
Explanation:
Project_ID
.Step 3: Create the Employee_Project
Table
This table links employees to the projects they are working on.
Employee_Project Table
Employee_ID (PK)(FK) | Project_ID (PK)(FK) |
---|---|
101 | P1 |
101 | P2 |
102 | P1 |
103 | P3 |
Composite Primary Key: {Employee_ID, Project_ID}
Foreign Keys:
Employee_ID
references the Employee
table.Project_ID
references the Project
table.Explanation:
By decomposing the original table into three tables, we have:
Eliminated Partial Dependencies:
Achieved Second Normal Form (2NF):
.....
.....
.....