Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 14

BSc (Hons) Artificial Intelligence and

Data Science

Module: CM1603 Database Systems

Individual Coursework Report

Module Leader: Ms. Dileeka Alwis

RGU Student ID :

IIT Student ID : 20232938

Student Name : Tharusha Chamadith Liyanagama


Table of Contents
Section 1.......................................................................................................................................................................2
1.0 Extended Entity Relationship Diagram (EERD)..............................................................................................2
1.1 Assumptions..............................................................................................................................................3
1.2 Identified Entities and Attributes..............................................................................................................4
1.3 Relationship with Multiplication Constraints...........................................................................................5
Section 2.......................................................................................................................................................................6
2.0 Logical Schema Diagram..................................................................................................................................6
2.1 Assumptions.............................................................................................................................................7
2.2 Relational Schema....................................................................................................................................8
Section 3.....................................................................................................................................................................10
3.0 Table Creation.................................................................................................................................................10
3.0.1 Job Table............................................................................................................................................10
3.1 Data population...............................................................................................................................................11
Section 4.....................................................................................................................................................................12
References...................................................................................................................................................................13

List of Figures
Figure 1 EERD diagram.................................................................................................................................................2
Figure 2 Logical Schema Diagram.................................................................................................................................6
Figure 3 Creation of Job table........................................................................................................................................9

List of tables
Table 1 Identified Entities and Attributes.......................................................................................................................4
Table 2 Relationship with Multiplication Constraints....................................................................................................5

Tharusha Liyanagama CM1603 Database Systems Page 1 of 14


Section 1
1.0 Extended Entity Relationship Diagram (EERD)

Figure 1 EERD diagram.

Tharusha Liyanagama CM1603 Database Systems Page 2 of 14


1.1 Assumptions
.
 Customers are divided into individuals and companies.

 Individuals’ customers have personal information such as first name, last name, email, occupation.

 Company customers have attributes like company name, company registration number.

 Customers can sponsor multiple projects.

 Customer can make multiple payments.

 Payment can invest multiple projects.

 Duty assignments allocated to one or more projects.

 Staff members can work with multiple projects.

 Supervisors can oversee multiple staff members.

 Jobs are based on multiple staff members.

 Staff members can assign multiple duty assignments.

 Duty assignments allocated to one or more projects.

Tharusha Liyanagama CM1603 Database Systems Page 3 of 14


1.2 Identified Entities and Attributes

Entity Key Attribute Non-Key Attributes


Supervisor Supervisor_Id Supervisor_Name
Additional_Privileges
Medical_Allowance
Salary
Staff Staff_Id F_name
L_name
Salary
Date_Of_Birth
Email
Tel_No
Job Job_Id Job_Role
Department
Min_Salary
Max_Salary
Experience_Level
Project Project_Id Project_Type
Location
Estimated_Date
Estimated_Amount
Completion_Date
Project_Involvement
Complition_Amount
Current_Progress
Payment Payment_Id Payment_Date
Payment_Method
Installment

Customer (Superclass) Customer_Id Address


Contact Number

Company (Subclass) Company_Name


Company_Registration_Number
Company_email
Individual (Subclass) Person_Name
- Email
Occupation

Table 1 Identified Entities and Attributes

Tharusha Liyanagama CM1603 Database Systems Page 4 of 14


1.3 Relationship with Multiplication Constraints

Relationship Description
Customer and Project There is a one-to-many relationship between customer and project indicating that
one customer can contain multiple projects and one project including one
customer.
Customer and payment There is a one-to-many relationship between customer and payment indicating
that one customer can make multiple payments and one payment has one
customer
Supervisor and Staff There is a one-to-many relationship between supervisors and staff members
indicating that one supervisor can oversee one or more staff members and it is
optional for staff members to have supervisors
Job and Staff There is a one-to-many relationship between jobs and staff members indicating
that one job can contain multiple staff members and each staff member includes
one job
Staff and duty assignments There is a one-to-many relationship between staff members and duty assignments
indicating that staff members can assign one or more duties and duty assignments
including one staff member
Duty assignments and project There is a many-to-many relationship between duty assignments and projects
indicating that duty assignments allocated to one or more projects and projects
have one or more duty assignments
Staff and Project There is a many-to- many relationship between staff and projects indicating that
staff works with one or more projects and projects have minimum one and
maximum many staffs
Table 2 Relationship with Multiplication Constraints

Section 2
Tharusha Liyanagama CM1603 Database Systems Page 5 of 14
2.0 Logical Schema Diagram

Figure 2 Logical Schema Diagram

2.1 Assumptions

Tharusha Liyanagama CM1603 Database Systems Page 6 of 14


2.2 Relational Schema

Tharusha Liyanagama CM1603 Database Systems Page 7 of 14


1. Supervisor(Supervisor_Id{PK},Additional_Privileges,Medical_Allowances,Salary)

2. Staff(Staff_Id{PK},F_Name,L_Name,Salary,Date_Of_Birth,Email, Supervisor_Id{FK}, Job_Id{FK})

3. Job(Job_Id{PK},Job_Role, Department, Min_Salary, Max_Salary, Experience_Level)

4. Customer(Customer_Id{PK}, Customer_Type, Stakeholder_Name, Field, Regulation)

5. CompanyCustomer(Customer_Id{PK},{FK}, Company_Name,street_address, postal_code,city,


Company_Registration_No)

6. Individual Customer(Customer_Id{PK},{FK}, F_name, L_name, Occupation)

7. Payment(Payment_Id{PK}, Payment_Date, Payment_Method,


Installmant,Installment_Number,Installment_Plan,Installment_Deadline, Customer_Id{FK})

8. Project(Project_Id{PK}, Project_Type, street_address,postal_code,city, Estimated_Date,


Estimated_Amount, Completion_Date Project_Involvement, Current_Progress, Complition_Amount,
Customer_Id{FK}, Payment_Id{FK})

9. DutyAssignment(Duty_Assignment_Id{PK}, Week_Record, Total_Working_Hours)

10. Update((Staff_Id{FK}, Project_Id{FK}, Duty_Assignment_Id{FK}){PK})

Tharusha Liyanagama CM1603 Database Systems Page 8 of 14


Section 3
3.0 Table Creation

3.0.1 Job Table

Figure 3 Creation of Job table Query.

Tharusha Liyanagama CM1603 Database Systems Page 9 of 14


3.1 Data population

Tharusha Liyanagama CM1603 Database Systems Page 10 of 14


Section 4

Tharusha Liyanagama CM1603 Database Systems Page 11 of 14


References
There are no sources in the current document.

Tharusha Liyanagama CM1603 Database Systems Page 12 of 14


Tharusha Liyanagama CM1603 Database Systems Page 13 of 14

You might also like