0% found this document useful (0 votes)
66 views8 pages

COM736

This document describes an entity relationship (ER) diagram for a hospital database called SMH. It includes entities like patients, staff, admissions, wards, operations and observations. The ER diagram was improved by adding two new departments, optic care and dental, and their related doctors, assistants and staff as a specialization relationship under the staff entity. The document defines each entity's attributes and primary keys. It also outlines the various one-to-one, one-to-many and many-to-many relationships that exist between entities like staff to admissions, operations and observations. Finally, it provides the schema for implementing the database with the defined entities, attributes, primary keys and relationships.

Uploaded by

SujiKrishnan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
66 views8 pages

COM736

This document describes an entity relationship (ER) diagram for a hospital database called SMH. It includes entities like patients, staff, admissions, wards, operations and observations. The ER diagram was improved by adding two new departments, optic care and dental, and their related doctors, assistants and staff as a specialization relationship under the staff entity. The document defines each entity's attributes and primary keys. It also outlines the various one-to-one, one-to-many and many-to-many relationships that exist between entities like staff to admissions, operations and observations. Finally, it provides the schema for implementing the database with the defined entities, attributes, primary keys and relationships.

Uploaded by

SujiKrishnan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 8

1

Contents
Improved ER Diagram............................................................................................................................3
ENTITIES.................................................................................................................................................4
ATTRIBUTES...........................................................................................................................................5
RELATIONSHIP BETWEEN ENTITIES........................................................................................................6
SCHEMA.................................................................................................................................................7
References.............................................................................................................................................8

2
Improved ER Diagram

The newly added part here is the new departments Optic Care and Dental. The only thing added in
this ER diagram is the Doctors, Assistants and staffs of this new department. Hence they are added
to the Staff as specialization relationship where every staff of dental and optic care department is
the staff of SMH. Hence their details are common for all the staffs of SMH. This is the newly added
part in this ER diagram

3
ENTITIES

Following are the entities of SMH database:

1. PERSON

This entity is used to store details of the patients

2. ADMISSION

This entity is used to store the details about the admission of patients such as admitted date,
ward allotted and so on.

3. WARD

This entity is used to store the details about the wards such as number of rooms, ward name and
so on.

4. STAFF

This entity is used to store the staff details of SMH.

5. GENERAL

This entity is used to store the details of the general physicians, assistants and admin staffs.

6. DENTAL

This entity is used to store the details of the doctors and technicians of Dental department.

7. OPTICCARE

This entity is used to store the details of the doctors and technicians of Optic Care department.

8. OPERATION

This is used to store details about the operation such as patient details, doctors, nurses and
medical details.

9. OPTYPE

This is used to store the types of operation with the cost details of SMH.

10. OBSERVATION

This is used to store observation details of the patients done during each day and time by health
care assistants.

4
ATTRIBUTES
Following are the attributes of each entity with primary key:

S.No. Entity Primary Key Foreign Key Attributes


1. PERSON PID - Name
Sex
Address
DOB
Phone
2. ADMISSION AID WardID AdDate
PID AmountPaid
RoomNo
3. WARD WardID - WardName
WardType
NumOfRooms
4. STAFF StaffID - Name
Sex
DOB
Qualification
Experience
Joineddate
Address
Phone
Email
5. GENERAL - StaffID Stafftype
6. DENTAL - StaffID Specialization
7. OPTICCARE - StaffID Specialization
8. OPERATION OPID PID OpDate
StaffID OpDetails
TypeID
9. OPTYPE TypeID OperationName
Cost
10. OBSERVATION ObID PID ObservedDate
StaffID ObservedDetails
ObservedTime

5
RELATIONSHIP BETWEEN ENTITIES
Relationship Entity1 Entity2 Description

One to One PERSON STAFF Every Patient is treated by a doctor

One to ADMISSION PERSON Each Patient May admitted many times

Many STAFF ADMISSION Each Staff can make many admissions

STAFF OPERATION Each Staff can work in many operations

STAFF OBSERVATION Each Staff can make many patient observations

ADMISSION OPERATION Each admitted patient may undergo one or more


operations
ADMISSION OBSERVATION Each admitted patient may be observed many
times
OPTYPE ADMISSION Each operation type can be done for one or more
admitted patients
OPTYPE OPERATION Each Operation type can be done many times

WARD ADMISSION Each Ward may have many admitted patients

6
SCHEMA
PERSON (PID, Name, Sex, Address, DOB, Phone)

ADMISSION (AID, AdDate, AmountPaid, RoomNo, WardID References WARD(WardID), PID


References PERSON(PID))

WARD (WardID, WardName, WardType, NumOfRooms)

STAFF (StaffID, Name, Sex, DOB, Qualification, Experience, Joineddate, Address, Phone, Email)

GENERAL (StaffID References STAFF(StaffID), StaffType)

DENTAL (StaffID References STAFF(StaffID), Specialization)

OPTICCARE (StaffID References STAFF(StaffID), Specialization)

OPERATION (OPID, OpDate, OpDetails, StaffID References STAFF(StaffID), PID References


PERSON(PID), TypeID References OPTYPE(TypeID))

OPTYPE (TypeID, OperationName, Cost)

OBSERVATION (ObID, ObservedDate, ObservedDetails, ObservedTime, PID References PERSON(PID),


StaffID References STAFF(StaffID))

7
References
geeksforgeeks, 2023. Introduction of ER Model. https://www.geeksforgeeks.org/introduction-of-er-
model/, pp. 1-1.

ibm, 2023. Database relationships. https://www.ibm.com/docs/en/mam/7.6.0?topic=structure-


database-relationships, pp. 1-1.

Peterson, R., 2023. Entity Relationship (ER) Diagram Model with DBMS Example.
https://www.guru99.com/er-diagram-tutorial-dbms.html, pp. 1-1.

You might also like