Semester 1 - Assignment: Fundamentals of Database Systems
Content
Page1. Introduction 22. Mini World – Description3. Mini World - Analysis
a. Entitiesi. Identify Nounsii. Filter Synonyms / Aliasesiii. Identify Entitiesiv. Final Entitiesv. Entity Relationships
b. Attributesi. Identify Attributesii. Key Attributes
4. Entity Relationship / Extended Entity Relationship Schema
a. Primary ER / EER Schemab. ER / EER Schema after resolving N-nary
relationshipsc. ER / EER Schema after resolving M..N
relationshipsd. Constraintse. Assumptions
5. Relational Schemaa. EER to Relational Mapping
i. Strong / Regular Entitiesii. Weak Entitiesiii. 1:1 Relationshipsiv. 1:N Relationshipsv. M:N Relationshipsvi. Recursive Relationships
b. Relational Schema Diagram6. Data Dictionary7. Consolidated ER/EER Schema8. Limitations and Further Development9. Acknowledgement
Masters Programme in Biomedical Informatics Batch 3 – Group 2 Page 1
Semester 1 - Assignment: Fundamentals of Database Systems
10. Our Team Spirit
1. Introduction
2. Mini World - Description
ABC Hospital is a leading health care institute which provides both in and out ward services for its clients. In-ward services are delivered through the wards system available for all specialties. Outpatient care is provided by the OPD & Emergency department and the Multispecialty Clinic system.
Administrators of ABC decided to develop an information system to manage the Clinic system to enhance the efficacy of the services provided to clients.
Mini world: Group 1
For the clinics, clients are referred from wards or OPD. Each client is registered at the clinic registration desk in the first visit to a clinic. Each client is given a unique registration number and it can be used for any of the clinics if referred. For each client, information on Name, Gender, Date of Birth, Address, Phone number/s, Clinic name/s and Referred place (Ward/OPD & Emergency) is collected and stored.
Each clinic is conducted at a specific location. Each location is identified by an unique number and information on phone extension, seating capacity and conducted clinics are stored in the system.
Masters Programme in Biomedical Informatics Batch 3 – Group 2 Page 2
Semester 1 - Assignment: Fundamentals of Database Systems
A specific clinic session is conducted at the specified location according to a given time table. Clinic sessions are allocated for clients to attend a clinic.
Mini world: Group 2
Some doctors of ABC are attached to clinics and a single doctor can work in one or more clinics (non parallel).
Nurses of ABC are attached to a single specific location.
Both doctors and nurses are allocated to relevant clinic sessions.
Information on Name, Gender, Date of Birth, Address and Phone number/s and job category of ABC employees are stored in the system according to a unique employee number.
3. Mini World - Analysis
a. Entities
i. Identify Nouns
Nouns are in red:
Some doctors of ABC are attached to clinics and a single doctor can work in one or more clinics (non parallel).
Nurses of ABC are attached to a single specific location.
Both doctors and nurses are allocated to relevant clinic sessions.
Information on Name, Gender, Date of Birth, Address and Phone number/s and job category of ABC employees are stored in the system according to a unique employee number.
Identified Nouns:
Doctors ABC Hospital Clinics
Nurses Location Clinic Sessions
Name Gender Date of Birth
Address Phone number/s Job category
Employees Employee number
Masters Programme in Biomedical Informatics Batch 3 – Group 2 Page 3
Semester 1 - Assignment: Fundamentals of Database Systems
ii. Filter Synonyms / Aliases
iii. Identify Entities
Following entities were identified from available mini world information.
Entity Name Entity categoryDoctor
Strong / RegularNurseEmployeeLocationClinicClinic Session Weak
Non-Entity Nouns:
Masters Programme in Biomedical Informatics Batch 3 – Group 2 Page 4
Doctors ABC Hospital Clinics
Nurses Location Clinic Sessions
Name Gender Date of Birth
Address Phone Number/s Job Category
Employee Number Employees
Doctor Clinic Nurse
LocationClinic
SessionEmployee
Semester 1 - Assignment: Fundamentals of Database Systems
This is the Problem domain
These are attributes of ‘Employee’ entity
iv. Final Entities
v. Entity Relationships
Following relationships and their cardinality constraints were extracted from mini world information.
Some doctors are attached to clinics A single doctor can work in one or more clinics Each nurse is attached to a single specific location Some doctors are allocated to relevant clinic sessions Some nurses are allocated to relevant clinic sessions
Following relationships were made for the completion of schema.
Masters Programme in Biomedical Informatics Batch 3 – Group 2 Page 5
ABC Hospital
Name
Gender
Date of Birth
Address
Phone Number/s
Job Category
Employee Number
Employee Doctor Nurse
Location ClinicClinic
Session
Semester 1 - Assignment: Fundamentals of Database Systems
Each clinic has (conducts) clinic sessions Each clinic session is conducted in a specific location
Further to above we have made some assumptions and they are mentioned in relevant sections as well as under section 4.e: Assumptions.
b. Attributes
i. Identify Attributes
Followings are the attributes we identified for each entity.
Employee entity type
Doctor entity type
Nurse entity type
Clinic entity type
Masters Programme in Biomedical Informatics Batch 3 – Group 2 Page 6
Semester 1 - Assignment: Fundamentals of Database Systems
Location entity type
Clinic session entity type
ii. Key Attributes
Following is the list of key attributes of identified strong entities.
Entity Name Key AttributeEmployee Emp_NoDoctor Inherit Emp_ID from their
super class, EmployeeNurseLocation Location_IDClinic Clinic_ID
4. Entity Relationship / Extended Entity Relationship Schema
a. Primary ER / EER Schema
Masters Programme in Biomedical Informatics Batch 3 – Group 2 Page 7
Semester 1 - Assignment: Fundamentals of Database Systems
b. ER / EER Schema after resolving N-nary relationships
Masters Programme in Biomedical Informatics Batch 3 – Group 2 Page 8
Assumption #1All Nurses are
attached to some location
Assumption #2A single location may have 0 or many nurses
Assumption #3There may be some clinics
which have not held any
sessions yet.
N-nary relationshipN-nary relationship
Semester 1 - Assignment: Fundamentals of Database Systems
Masters Programme in Biomedical Informatics Batch 3 – Group 2 Page 9
Assumption #4There may be some clinic
doctors who have not participated any clinic
session yet.
Assumption #5Each clinic session at least one allocated
nurse
M:N relationshipM:N
relationship
Semester 1 - Assignment: Fundamentals of Database Systems
c. ER / EER Schema after resolving M..N relationships
d. Constraints
Maximum and minimum cardinality constraints are stated in ER/EER schema in section 4.c
Masters Programme in Biomedical Informatics Batch 3 – Group 2 Page 10
Semester 1 - Assignment: Fundamentals of Database Systems
e. Assumptions
In preparing the ER/EER schema, we made following assumption. They are also stated in relevant places of ER/EER schema at sections 4.a and 4.b
1. All Nurses are attached to some location2. A single location may have 0 or many nurses3. There may be some clinics registered in the system which have not held any
clinic sessions yet4. There may be some clinic doctors who have not participated any clinic
session yet5. Each clinic session at least one allocated nurse
5. Relational Schema
a. EER to Relational Mapping
i. Strong / Regular Entities
ii. Weak Entities
iii. 1:1 Relationships
iv. 1:N Relationships
v. M:N Relationships
vi. Recursive Relationships
b. Relational Schema Diagram
6. Data Dictionary
Abbreviations: (FL – Field Length, Req. – Required, PK – Primary Key, CPK – Composite Primary Key, PaK – Partial Key, FK – Foreign Key)
Relation: EMPLOYEE
Attribute Name
Data Type
FL Key Req. Description Sample
Emp_No String 10 PK Yes Employee Number ABC12345F_Name String 40 Yes First Name Saman
L_Name String 40 Yes Last Name Perera
Masters Programme in Biomedical Informatics Batch 3 – Group 2 Page 11
Semester 1 - Assignment: Fundamentals of Database Systems
Gender String 8 Yes Gender of the employee Male
DOB Date 12 Yes Date of birth 23/09/1995
H_No String 10 No House number 123/5A
Street String 40 No Street name Main Street
City String 30 No City name Colombo
Post_Code String 10 No Postal code 10100
Job_Category String 15 Yes Job category Doctor
Relation: PHONE_NO
Attribute Name
Data Type
FL Key Req. Description Sample
Emp_No String 10 FK Yes Employee Number (PK in Relation: Employee)
ABC12345
Phone_No String 12 Yes Telephone number 0777123456
Type String 10 Yes Type of telephone number mobile
Relation: DOCTOR
Attribute Name
Data Type
FL Key Req. Description Sample
Emp_No String 10 PK Yes Employee Number ABC12345Designation String 25 Yes Designation General Surgeon
Relation: DOCTOR_QUALIFICATION
Attribute Name
Data Type
FL Key Req. Description Sample
Emp_No String 10 FK Yes Employee Number(PK in Relation: Doctor)
ABC12345
Qualification String 25 Yes Professional qualifications MS
Relation: NURSE
Attribute Name
Data Type
FL Key Req. Description Sample
Emp_No String 10 PK Yes Employee Number ABC12345Designation String 25 Yes Designation Nursing Officer
Relation: NURSE_QUALIFICATION
Masters Programme in Biomedical Informatics Batch 3 – Group 2 Page 12
Semester 1 - Assignment: Fundamentals of Database Systems
Attribute Name
Data Type
FL Key Req. Description Sample
Emp_No String 10 FK Yes Employee Number(PK in Relation: Doctor)
ABC12345
Qualification String 25 No Professional qualifications NTS Training
Relation: CLINIC
Attribute Name
Data Type
FL Key Req. Description Sample
Clinic_ID String 10 PK Yes Clinic Identification Number Med2Clinic_Name String 25 Yes Name of the Clinic Medical Clinic 2
Relation: CLINIC_DOCTOR
Attribute Name
Data Type
FL Key Req. Description Sample
Emp_No String 10 FK Yes Employee Number ABC12345Clinic_ID String 10 FK Yes Clinic Identification Number Med2
Relation: LOCATION
Attribute Name
Data Type
FL Key Req. Description Sample
Location_ID String 10 PK Yes Location Identification Number R25Loc_Name String 25 Yes Location Name Room 25
Ext String 6 No Telephone extension Number 1234
Seat_Capacity Integer No Seating Capacity 50
Relation: LOCATION_NURSE
Attribute Name
Data Type
FL Key Req. Description Sample
Emp_No String 10 FK Yes Employee Number ABC12345Location_ID String 10 FK Yes Location Identification Number R25
Relation: CLINIC_SESSION
Attribute Name
Data Type
FL Key Req. Description Sample
Date Date 12 PaK Yes Date of the clinic session 15/11/2011Start_Time Time 12 PaK Yes Starting time of the clinic session 08:30
Masters Programme in Biomedical Informatics Batch 3 – Group 2 Page 13
Semester 1 - Assignment: Fundamentals of Database Systems
End_Time Time 12 Yes Ending time of the clinic session 12:00
No_of_Pts Integer No Maximum number of patient for the clinic session
75
Min_per_Pt Time 6 Yes Number of minutes per patient 10
Clinic_ID String 10 FK Yes Clinic Identification Number Med2
Location_ID String 10 FK Yes Location Identification Number R25
Relation: CLINIC_DOCTOR_SESSION
Attribute Name
Data Type
FL Key Req. Description Sample
Emp_No String 10 FK Yes Employee Number ABC12345Clinic_ID String 10 FK Yes Clinic Identification Number Med2
Location_ID String 10 FK Yes Location Identification Number R25
Date Date 12 FK Yes Date of the clinic session 15/11/2011
Start_Time Time 12 FK Yes Starting time of the clinic session 08:30
Relation: LOCATION_NURSE_SESSION
Attribute Name
Data Type
FL Key Req. Description Sample
Emp_No String 10 FK Yes Employee Number ABC12345Location_ID String 10 FK Yes Location Identification Number R25
Clinic_ID String 10 FK Yes Clinic Identification Number Med2
Date Date 12 FK Yes Date of the clinic session 15/11/2011
Start_Time Time 12 FK Yes Starting time of the clinic session 08:30
Masters Programme in Biomedical Informatics Batch 3 – Group 2 Page 14
Semester 1 - Assignment: Fundamentals of Database Systems
7. Consolidated ER/EER Schema
8. Limitations and Further Development
9. Acknowledgement
10. Our Team Spirit
Group Member PGIM Roll No.
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
(List of Responsible areas – to be deleted from original report)
Responsibility
Cover Page1. Introduction Gumindu2. Mini World – Description OK3. Mini World - Analysis OK
Masters Programme in Biomedical Informatics Batch 3 – Group 2 Page 15
Semester 1 - Assignment: Fundamentals of Database Systems
a. Entities OKi. Identify Nouns OKii. Filter Synonyms / Aliases OKiii. Identify Entities OKiv. Final Entities OKv. Entity Relationships OK
b. Attributes OKi. Identify Attributes OKii. Key Attributes OK
4. Entity Relationship / Extended Entity Relationship Schema
Priiyanga
a. Primary ER / EER Schemab. ER / EER Schema after resolving N-nary
relationshipsc. ER / EER Schema after resolving M..N
relationshipsd. Constraintse. Assumptions
5. Relational Schema
Pramil
a. EER to Relational Mappingi. Strong / Regular Entitiesii. Weak Entitiesiii. 1:1 Relationshipsiv. 1:N Relationshipsv. M:N Relationshipsvi. Recursive Relationships
b. Relational Schema Diagram6. Data Dictionary Priyanga7. Consolidated ER/EER Schema
8. Limitations and Further DevelopmentGumindu/
Pramil9. Acknowledgement
Gumindu10. Our Team Spirit
Masters Programme in Biomedical Informatics Batch 3 – Group 2 Page 16