Transformation To 1NF
Transformation To 1NF
Transformation to 1NF:
|---------|--------------|-----------------|
The transformed 2NF tables do not fully comply with the Third Normal Form (3NF) because the
“Address” attribute in the “Order” table depends on “CustomerName” and not on the primary key
(OrderID).
Transformation to 3NF:
1. Remove transitive dependencies.
|1 | Fady14 | Street A |
|2 | Jana14 | Street B |
|3 | Rana14 | Street C |
Order:
| OrderID | CustomerID |
| 1001 | 1 |
| 1002 | 2 |
| 1003 | 1 |
| 1004 | 3 |
| 1005 | 2 |
| 1006 | 1 |
-ProductOrder:
| OrderID | ProductName | ProductCategory | Quantity | Price
Question 2:
Entity-Relationship Diagram (ERD) and Database Design for Employee and Project
Management System
1. Entity-Relationship Diagram (ERD) The ERD for managing employees and projects is
designed using UMLET, illustrating the following entities and their relationships:
Entities:
o Employee
Attributes: employeeID26 (Primary Key), name26, position26
Constraints:
employeeID26 is unique.
Name26 cannot be null.
Position26 must be one of {Manager, Developer, Analyst}.
o Project
Attributes: projectID26 (Primary Key), projectName26, startDate26
Constraints:
projectID26 is unique.
projectName26 cannot be null.
startDate26 must be a valid date.
Relationship:
Assignment (Many-to-Many Relationship between Employee and Project)
o Attributes: assignmentDate26
o Constraints:
employeeID26 and projectID26 must exist in their respective entities.
Employee:
o employeeID26(Primary Key, Unique)
o name26 (Not Null)
o position26(Must be valid as {Manager, Developer, Analyst})
Project:
o projectID26(Primary Key, Unique)
o projectName26 (Not Null)
o startDate26 (Valid Date)
Employee:
o Primary Key: employeeID26
o Attributes: name26, position26
o Constraints:
employeeID14 must be unique.
Name26cannot be null.
Position26 must belong to a set {Manager, Developer, Analyst}.
Project:
o Primary Key: projectID26
o Attributes: projectName14, startDate26
o Constraints:
projectID26 must be unique.
projectName26 cannot be null.
startDate26 must be a valid date.
4. Relation-for-Relationship Representation
Employee:
o Primary Key: employeeID26
Project:
Primary Key: projectID26
o
Employee_Project_Assignment:
o Primary Key: (employeeID26, projectID26)
o Foreign Keys:
employeeID26references Employee(employeeID26)
projectID26 references Project(projectID26)
Entities:
Employee
o Attributes: employeeID26, name26, position26
Enterprise
o Attributes: enterpriseID26, enterpriseName26, location26
Relationship:
Employee:
o Primary Key: employeeID26
o Foreign Key: enterpriseID26 (references Enterprise(enterpriseID26))
Enterprise:
o Primary Key: enterpriseID26
Relationship
o Primary Key for Employment: (employeeID26)