Welcome to Database Laboratory
Welcome to Database Laboratory
Assignment 2: Design any database with at least 3 entities and relationships between them. Draw suitable ER/EER diagram
Below is a description of the ER diagram for the Employee and Department tables before performing the DDL operations.
Entities
Employee
Attributes:
Emp_No (Primary Key)
Emp_Name
Designation
Designation_NO
SAL
COMMISSION
Department
Attributes:
Dept_ID (Primary Key)
Dept_Name
Relationships
WorksIn
Attributes:
Designation_NO (Foreign Key referencing Dept_ID in Department)
Employee Entity:
Contains attributes such as Emp_No, Emp_Name, Designation, Designation_NO, SAL, and COMMISSION.
Emp_No is the primary key.
Designation_NO is a foreign key that references Dept_ID in the Department table.
Department Entity:
Contains attributes such as Dept_ID and Dept_Name.
Dept_ID is the primary key.
WorksIn Relationship:
Represents the relationship between Employee and Department.
The foreign key Designation_NO in the Employee table references Dept_ID in the Department table.