DATA SCENE INVESTIGATION
The Case of the Physician-Patient-Nurse Care Triangle
Let's investigate the data collected at a local physician clinic, looking for entities and their relationships.
The process is completed using these steps:
1. We will identify each entity using the clues below.
2. We will identify the relationships between those entities.
3. We will look for clues that describe those entities (e.g., attributes).
4.
We will put together the pieces by using Unified Modeling Language (UML) and drawing a class
diagram (example view below).
Note: YOU will need to refer to the course lecture notes and/or eBook for the rules when creating the
class diagram.
Believe it or not, this is the process knowledge experts/users and systems analysts/database designers
follow to create data and system models. They build a narrative much like the one below based on
reviewing current procedures and documents, observing processes, and interviewing the participants.
That narrative is then used in the specifications of the new system. Note: The italicized statements do
not directly impact design - just a few thoughts conjured up during investigation.
The Clues: Remember to look for the following clues:
A noun (person, place, event, or object) suggests an entity. Circle the nouns...
•
A verb describes how two entities interact (so it will be used to label a relationship and thus goes
on top of the line between the two entities). Underline the verbs...
•
A property, trait, or characteristic of an entity, relationship, or another characteristic suggests an
attribute. Place a rectangle around attributes...
•
Multiplicity describes whether a relationship is optional or mandatory and the maximum number
of times an instance of one entity, e.g., doctor, can be associated with instances in the related
entity, e.g., patient. Double underline cardinality clues.../nThe Scenario:
A physician can provide primary care to zero or more patients. The physician has a unique employee id,
first name, and last name. A patient also has a unique patient ID, first name, and last name. A patient must
have only and only one primary care physician. A patient may or may not occupy a room (at the clinic)
which is staffed by at least one nurse but may be staffed by many nurses. A room is simply identified by
a room number. A nurse can staff one and only one room. Like the physician, a nurse is described by an
employee id, first name, and last name. A room may be occupied by many patients (throughout the day -
let's hope there aren't multiple patients in the same room) or may not be used at all during the day. A
nurse may or may not be supervised by another nurse. A nurse may supervise zero or many other nurses.
The physician writes one or more prescriptions (they are taught to address symptoms with drugs and they
are certified to prescribe drugs). A prescription is simply identified by a prescription id. A prescription is
written by zero or one physician (hmmm...does this imply fraud?). A prescription contains one and only
one controlled drug(s). A drug can be specified for one or many prescriptions (so a drug isn't included in
the database if it isn't used in a prescription for the clinic). A drug is described by a drug id and a drug
name. A prescription is provided to zero or one patient (hmmm...again, there is no accountability unless a
specific prescription is designated as "void"). A patient receives one or many prescriptions (once again, a
patient must be given drugs?)./nData Scene Investigation Clue Worksheet
1st - The Entities (Who Done It?):
1.
2.
3.
4.
5.
6.
2nd - The Relationships (between entities) (What happened?). Draw relationships with verb labels &
specify cardinality./nClass Diagram for Hotel Management System
This hotel management class diagram carefully links all classes joining them together throug
arrows to show the relationship between them. You can easily customize this hotel
management class diagram and add more classes if you like.
Namestring
+id: int
Manager
PhoneNo int
Purchaseinventry public
+RecordComplain
ManageSta
+10: Int
Name: String
-PhoneNo: Int
1.1
Owner
View Complains():
View Quest():
View Roomia)
-View Bibo
-View Foodtemal
1.1
1.1
1,1
1,1
din
-Name ring
Food items
L
Updatefoodhes) public
-Type: string
0Status string
1.A +D int
Inventory
Updateinventory public
Customer
Name string
+Tel No: int
+Address string
+Room No: int
0,1
+Guestinfo) public
+Checkin public
+CheckOut) public
+Pays Bill public
+OrderFoodtem public
Ded
-1.1-
11
-1.1
Receptionist
+ int
Name string
Tel No: int
+Address string
+CheckRoomAvailibility)) public
+BookRoom: public
Generat) publ
AcceptCustomer Feedback
Rooms
-Room No: int
Location string
-Questinfo puble
update Room) public
Bill
+Blon
CustomerName string
+Generate public