Good evening, my friend. I have this task that one of the teachers solved, but he asked to change the values so that there is no similarity. Can you do that?
تم عمل هذه النسخة لمشتركين موسى اكاديمي فقط وغير مسموح بتوزيعها
ارجو عمل التعديالت الالزمة وفقا لشرح الفيديو
College of Computing and Informatics
Project
Deadline: Thursday 07/12/2023@ 23:59
[Total Mark for this Project is 14]
Stuent Details:
Name:
Name:
Name:
Name:
ID:
ID:
ID:
ID:
Instructions:
• You must submit two separate copies (one Word file and one PDF file) using the Assignment Template on
Blackboard via the allocated folder. These files must not be in compressed format.
• It is your responsibility to check and make sure that you have uploaded both the correct files.
• Zero mark will be given if you try to bypass the SafeAssign (e.g., misspell words, remove spaces between
words, hide characters, use different character sets, convert text into image or languages other than English
or any kind of manipulation).
• Email submission will not be accepted.
• You are advised to make your work clear and well-presented. This includes filling your information on the cover
page.
• You must use this template, failing which will result in zero mark.
• You MUST show all your work, and text must not be converted into an image, unless specified otherwise by
the question.
• Late submission will result in ZERO mark.
• The work should be your own, copying from students or other resources will result in ZERO mark.
• Use Times New Roman font for all your answers.
Project Instructions
Pg. 01
Project Instructions
• You can work on this project as a group (minimum 3 and maximum 4 students).
Each group member must submit the project individually with all group member
names mentioned in the cover page.
• This project worth 14 marks and will be distributed as in the following:
a) Identify the entity types, attributes, keys.
b) Identify the relationship and cardinalities.
c) Draw the ERD.
d) Schemas before Normalization.
e) Schemas after Normalization.
f) Create the tables.
g) Populate your tables with at least 5 rows.
h) Execute the requested sample queries.
(2 marks)
(2 marks)
(2 marks)
(1.5 marks)
(1.5 marks)
(1.5 marks)
(1.5 marks)
(2 marks)
• Each student must submit one report about his/her chosen Project via the Blackboard
(Email submission will not be accepted which will be awarded ZERO marks)
• Screenshots for answering SQL questions (f, g, and h).
• You are advised to make your work clear and well presented; marks may be reduced
for poor presentation. This includes filling your information on the cover page.
• You MUST show all your work, and text must not be converted into an image, unless
specified otherwise by the question.
A) Late submission will result in ZERO marks being awarded.
B) The work should be your own, copying from students or other resources will
result in ZERO marks.
Hospital Management System
Pg. 02
Learning
Outcome(s):
Hospital Management System
Year 2030, you are hired as a database developer in local hospital. The top
management of the hospital is interested to design a new database to manage their
daily routine work. In the requirement identification phase, you have identified five
core elements in the hospital
LO 4
Design a
database starting
from the
conceptual
design to the
implementation
of database
schemas.
•
Patients: The hospital stores crucial patient data, including their
personal information (first name, last name, date of birth, gender), contact
details (phone number, address), insurance information, and their medical
history.
•
Doctors: Hospital also maintains records of the medical
professionals, including their specialization, contact information, license
number, office hours, and email addresses.
•
Appointments: For efficient management of the patients visits to
the hospitals, the data about each appointment is stores as it connects
LO 3
patients with specific doctors. The appointment date and time, the reason
for the visit, and the appointment status (e.g., scheduled, canceled,
Create EntityRelationship
model, Relational
model, and write
SQL queries.
completed) is also stored.
•
Medical Records: A comprehensive record of patients’ medical
histories is maintained. It includes diagnosis details, treatment plans,
prescriptions, test results, and the date of each medical visit. These records
are associated with both patients and doctors.
•
Medical Staff: Data related to hospital staff members, such as
nurses, receptionists, and administrators is also stored. Information like
their roles, contact details, shift timings, and salary is recorded for proper
staff management.
Hospital Management System
Pg. 03
Hospital Management System
a) Fill the table below with all the Entities based on the given requirements:
Entity Type
Patient
Attributes of the Entity
Patient_ID (Primary Key)
Key
Patient_ID (Primary Key)
First_name
Last_name
DOB
Gender
Phone_number
Address
Insurance_info
Medical_history
Doctor
Doctor_ID (Primary Key)
Doctor_ID (Primary Key)
First_name
Last_name
Specialization
Contact_info
License_number
Office_hours
Email
Appointment
Appointment_ID (Primary Key)
Appointment_date_time
Visit_reason
Appointment_status
Appointment_ID (Primary
Key)
Hospital Management System
Pg. 04
Medical_Record
Record_ID (Primary Key)
Record_ID (Primary Key)
Diagnosis_details
Treatment_plans
Prescriptions
Test_results
Date_of_each_visit
Medical_Staff
Staff_ID (Primary Key)
Role
First_name
Last_name
Contact_details
Shift_timing
Salary
Staff_ID (Primary Key)
Hospital Management System
Pg. 05
b) Fill the table below with all the relationship type based on the given requirements.
Relationship Type
Entities
connected by
the relationship
type
Treats
Patient
(Degree is Binary
relationship)
Doctor
Schedules
Doctor
(Degree is Binary
Relationship)
Appointment
Attends
Patient
(Degree is Binary
Relationship)
Appointment
Manages_Records
Doctor
Relationship
attribute
Cardinality
Many-to-Many (M:M)
–
One-to-Many (1:M)
–
One-to-Many (1:M)
–
Many-to-Many (M:M)
–
One-to-One (1:1)
–
One-to-Many (1:M)
–
Medical_Record
Owns_Record
Patient
Medical_Record
Manages
Medical_Staff
Doctor
Explanation:
•
Treats: A doctor can treat many patients, also, many patients may be treated by
many different doctors in the same hospital.
•
Schedules: A doctor manages his appointment(s) times and dates for each
patient, and each appointment can only have one doctor in the appointment.
•
Attends: A patient can have multiple appointments he must attend to, but each
appointment is for one patient only.
Hospital Management System
Pg. 06
•
Manages_Records: A doctor can manage the overall medical record of many
patients that he treats, moreover, the same medical record can be managed by
many doctors, as the patient may be getting treatment from many different
doctors (such as in Treats relationship type)
•
Owns_Record: Each single patient in the hospital has ONE medical record that
has all the details of the patient medical history, and each medical record is
associated with only ONE patient.
•
Manages: Each doctor has ONE administrative manager that is responsible for
the Doctor, contacts, salary, personal clinic and his work related documents. A
Medical_Staff can manage MANY Doctors at a time.
مسئولي، مثل مسئولي العيادات،تمثل هنا المسئولين في المستشفى الذين ليسوا بالطاقم الطبي
. الخ..، االستقبال، المديرين،التواصل مع األطباء
Hospital Management System
Pg. 07
c) Draw the ER diagram
Hospital Management System
Pg. 08
d) Fill the table below with all schemas before normalization.
Schema Name
Patient
Schema Attribute
Patient_ID (Primary Key)
Key
Patient_ID (Primary Key)
First_name
Last_name
DOB
Gender
Phone_number
Address
Insurance_info
Medical_history
Doctor
Doctor_ID (Primary Key)
Doctor_ID (Primary Key)
Staff_ID (Foregin Key)
First_name
Last_name
Specialization
Contact_info
License_number
Office_hours
Email
Patient_Doctor
Appointment
Patient_ID (Primary Key + Foreign Key)
Patient_ID (Primary Key)
Doctor_ID (Primary Key + Foreign Key)
Doctor_ID (Primary Key)
Appointment_ID (Primary Key)
Appointment_ID (Primary Key)
Patient_ID (Foregin Key)
Doctor_ID (Foregin Key)
Appointment_date_time
Visit_reason
Appointment_status
Hospital Management System
Pg. 09
Medical_Record
Record_ID (Primary Key)
Record_ID (Primary Key)
Patient_ID (Foregin Key)
Diagnosis_details
Treatment_plans
Prescriptions
Test_results
Date_of_each_visit (multi-valued)
Doctor_Medical_Record
Medical_Staff
Record_ID (Primary Key + Foreign Key)
Record_ID (Primary Key)
Doctor_ID (Primary Key + Foreign Key)
Doctor_ID (Primary Key)
Staff_ID (Primary Key)
Staff_ID (Primary Key)
Role
First_name
Last_name
Contact_details
Shift_timing
Salary
Pg. 10
Hospital Management System
Hospital Management System
Pg. 11
Step 1: 1NF
We must map the multivalued attribute into a relation of its own.
Medical_Record
Record_ID (Primary Key)
Record_ID (Primary Key)
Patient_ID (Foregin Key)
Diagnosis_details
Treatment_plans
Prescriptions
Test_results
Visit_Dates
Record_ID (Primary Key + Foreign Key)
Date_of_each_visit (Primary Key)
Record_ID (Primary Key + Foreign
Key)
Date_of_each_visit (Primary Key)
Step 2: 2NF
Relation already in 2NF because no partial functional dependency exists, as in, no nonkey (non-prime) attribute is determined by a subkey (part of primary key). Hint: If we
have non-composite primary key (There is only one attribute that is a primary
key), we can NEVER have a partial functional dependency.
Hospital Management System
Pg. 12
Step 3: 3NF
To be in 3NF, no nonprime attribute of R is transitively dependent on the primary key,
as in it has no transitive dependencies. In other words, No non-key attribute determines
another non-key attribute. This is violated in the following transitive dependency:
Record_ID -> Patient_ID -> { Diagnosis_details, Treatment_plans, Prescriptions,
Test_results, Medical_history}
To solve this, we remove the dependent attributes from the relation and move these
attributes ({ Diagnosis_details, Treatment_plans, Prescriptions, Test_results,
Medical_history}) to a separate table with its determinant (Patient_ID) and keep the
determinant (Patient_ID) in the relation as a foreign key
Patient
Patient_ID (Primary Key)
Patient_ID (Primary Key)
First_name
Last_name
DOB
Gender
Phone_number
Address
Insurance_info
Diagnosis_details
Treatment_plans
Prescriptions
Test_results
Medical_history
Medical_Record
Record_ID (Primary Key)
Patient_ID (Foregin Key)
Record_ID (Primary Key)
Hospital Management System
Pg. 13
e) Fill the table below with all schemas after normalization up to the 4NF.
Schema Name
Patient
Schema Attribute
Patient_ID (Primary Key)
Key
Patient_ID (Primary Key)
First_name
Last_name
DOB
Gender
Phone_number
Address
Insurance_info
Diagnosis_details
Treatment_plans
Prescriptions
Test_results
Medical_history
Doctor
Doctor_ID (Primary Key)
Doctor_ID (Primary Key)
First_name
Last_name
Specialization
Contact_info
License_number
Office_hours
Email
Patient_Doctor
Patient_ID (Primary Key + Foreign Key)
Patient_ID (Primary Key)
Doctor_ID (Primary Key + Foreign Key)
Doctor_ID (Primary Key)
Hospital Management System
Pg. 14
Appointment
Appointment_ID (Primary Key)
Patient_ID (Foregin Key)
Appointment_ID (Primary Ke
y)
Doctor_ID (Foregin Key)
Appointment_date_time
Visit_reason
Appointment_status
Medical_Record
Record_ID (Primary Key)
Record_ID (Primary Key)
Patient_ID (Foregin Key)
Doctor_Medical_Record
Visit_Dates
Record_ID (Primary Key + Foreign Key)
Record_ID (Primary Key)
Doctor_ID (Primary Key + Foreign Key)
Doctor_ID (Primary Key)
Record_ID (Primary Key + Foreign Key)
Record_ID (Primary Key + Foreign
Key)
Date_of_each_visit (Primary Key)
Date_of_each_visit (Primary Key)
Medical_Staff
Staff_ID (Primary Key)
Role
First_name
Last_name
Contact_details
Shift_timing
Salary
Staff_ID (Primary Key)
Pg. 15
Hospital Management System
f) Write the necessary SQL statements to create the tables.
Pg. 16
Hospital Management System
Pg. 17
Hospital Management System
g) Insert at least five rows into each table.
Hospital Management System
Pg. 18
h) Write SQL queries to find the following:
1) List of Doctors who have performed more than 10 surgeries.
2) List of Patients admitted for surgery between 1/9/2023 and 31/9/2023.
3) List of all the Patients who have not paid their bills till today.
4) List of Doctors on leave in a particular month.
5) List of Appointments with each Doctor with Patient name for a particular
day.
Pg. 19
Hospital Management System
Hospital Management System
Pg. 20
ASSUME there is bill_paid column in Patient table, this will be the query.
However, this query will give an error because there is no bill_paid field.
ASSUME there is on_leave column nor leave_month in Doctor table, this will be
the query. However, this query will give an error because there is no on_leave
column nor leave_month field.
Essay Writing Service Features
Our Experience
No matter how complex your assignment is, we can find the right professional for your specific task. Achiever Papers is an essay writing company that hires only the smartest minds to help you with your projects. Our expertise allows us to provide students with high-quality academic writing, editing & proofreading services.Free Features
Free revision policy
$10Free bibliography & reference
$8Free title page
$8Free formatting
$8How Our Dissertation Writing Service Works
First, you will need to complete an order form. It's not difficult but, if anything is unclear, you may always chat with us so that we can guide you through it. On the order form, you will need to include some basic information concerning your order: subject, topic, number of pages, etc. We also encourage our clients to upload any relevant information or sources that will help.
Complete the order formOnce we have all the information and instructions that we need, we select the most suitable writer for your assignment. While everything seems to be clear, the writer, who has complete knowledge of the subject, may need clarification from you. It is at that point that you would receive a call or email from us.
Writer’s assignmentAs soon as the writer has finished, it will be delivered both to the website and to your email address so that you will not miss it. If your deadline is close at hand, we will place a call to you to make sure that you receive the paper on time.
Completing the order and download