Submitted to:
Dr. Tinnakornsrisuphap
Prepared by:
Crystal Liang
8/27/2018
Executive Summary
Databases and Database Management Systems (DBMSs) are critical to the success of any
business or organization. The purpose of an efficient and effective database is to provide fast and
productivity, minimize inconsistency, and much more. In this report, a sample Hospital Database
relationship in a hospital or medical facility. Having this database can allow quick information
retrieval in determining the affiliation each patient has with the physicians in the hospital, and
vice-versa, where the patients of any physician can be easily defined. In addition to this, any
specific information pertaining to a patient in the hospital database such as PatientID, Name,
Date of Birth, and SSN can be retrieved and any information pertaining a physician, such as
Hospital ID, Name, Title, Specialty, Department, and NPI Number can be obtained.
1.0 Introduction
information and about the relationships between those categories (Pratt & Last, 2016). Databases
must be properly structured to provide quick and efficient access to all of the organization’s
information necessary to run it successfully. This report will demonstrate a database with tables
that have many-to-many relationships between Patients and Physicians. It will illustrate an
example of how patients can be affiliated with multiple physicians, while physicians can have
multiple patients in their patient-base. Within this sample hospital database, specific information
will be manipulated to show the efficiency and effectiveness of proper database utilization and
management.
2.0 Methodology
Tables
The Sample Hospital Database created for this report contains three separate tables: the
Patient table, Physician table, and finally a joint (or junction) table of the two: PatientPhys. Each
individual table contains columns, or attributes that are data items stored in the database. In the
example, the Patient table contains the Patient ID, Patient’s First Name, Patient’s Last Name,
Date of Birth, and Social Security Number. Within this table, the primary key—a column that
uniquely identifies a record, is the Patient ID, as each individual patient has his/her unique ID
number within the hospital database system. This is identified in Database Design Language
format (DBDL) by the underline, as shown below. The alternate key (AK)—a column that could
have been chosen as the primary key, is the SSN, as it is a unique non-primary key that can be
used to identify a row in the table. The secondary key (SK)—a column that is of interest strictly
for the purpose of retrieval is the patient’s date of birth (DOB), as this is an item often used to
The second table is the Physician table, in which its columns contain the physician’s
hospital ID, Physician Name, Title, Specialty, Department, and NPI Number. The primary key
for this table is the PhysHospID, as it uniquely identifies each physician in the database, while
the AK is the NPI Number. Furthermore, the SK is the PhysName, as it is often indexed for
faster retrievals and searches. Finally, the third and last table in this sample hospital database is a
joint/junction table created between the first two tables to allow the occurrence of many-to-many
relationships between patients and physicians. By creating a new table called PatientPhys, in
which the primary key is a combination of PatientID and PhysHospID, this then provides a one-
to-many relationship between Patient and PatientPhys, and a one-to-many relationship between
Hospital Database
1 Patient (PatientID, FirstName, Lastname, DOB, SSN)
AK SSN
SK DOB
2. Physician (PhysHospID, PhysName, Title, Specialty, Department, NPINum)
AK NPINum
SK PhysName
3. PatientPhys (PatientID, PhysHospID)
FK PatientID, PhysHospID à Patient & Physician
Forms
In the Sample Database, a form is created for each table, with the specific intent for users
that do not have access to the tables directly. The forms are interfaces that allow users to enter
Patient Form, Physician Form, and PatientPhys Form, which allows authorized end users to enter
a new patient or physician if needed. In addition, forms tend to be more user friendly than
generating queries.
Queries
The following queries were created to manipulate specific information pertaining to the
relationship between patients and doctors. The first query, “PatientQuery,” was written to
retrieve information pertaining to patient Holly Jones. In doing so, this query required pulling
information from both the Patient table, as well as the Physician table, meanwhile the
PatientPhys table played the role of conjoining the two tables (relationship) together. In this
query, I wanted to see which physicians patient Holly Jones was affiliated with, using the
PatientQuery
PatientID FirstName LastName DOB PhysName Specialty
200001 Holly Jones 3/1/1921 Barry Kendrick Internal Medicine
200001 Holly Jones 3/1/1921 Randal Redd Orthopedic Surgery
As depicted in the table result, patient Holly Jones is affiliated with two physicians: Dr. Barry
Kendrick, and Dr. Randal Redd. Utilizing this query can be beneficial when obtaining such
pertaining to physician Randal Redd. I wanted to know which patients Dr. Randal Redd was
treating, therefore, with a similar query from the previous, the following SQL was written like
PhysicianQuery
PhysHospID PhysName PatientID FirstName LastName DOB
1002 Randal Redd 200001 Holly Jones 3/1/1921
1002 Randal Redd 200002 Lloyd Perez 8/12/1933
As shown in the table above, Dr. Randal Redd (PhysHospID: 1002) is treating two patients:
3.0 Results
Reports
After conducting the two queries in the Sample Hospital Database, the final reports
contain all the information required to proceed. The PatientQuery was used to create the final
Patient report, which reflects the exact information listed from the table results. The
“PatientHollyJones” Report states that patient Holly Jones has a PatientID of 200001, DOB:
3/1/1921, and is affiliated with Dr. Randal Redd who specializes in orthopedic surgery, and Dr.
Barry Kendrick, who specializes in internal medicine. For the second report, the PhysicianQuery
was used to determine Dr. Randal Redd’s patients. According to the “PhysicianRandalRedd”
Report, Dr. Redd’s patients include Holly Jones (patient ID: 200001, DOB: 3/1/1921), and Lloyd
As demonstrated with this sample database, proper utilization of a database is vital in any part of
a business’ operations in today’s modern computing as it provides fast, accurate, pertinent, and
valuable information. The examples in this report show that information like so can be easily
retrieved if the data is stored properly, applied properly, and accessed by the right people.
Additionally, using such databases, especially with larger databases with multiple tables, is much
more beneficial than using spreadsheets, where there will be higher risks associated with the
integrity of the data and risks of errors occurring. Inevitably, the more complex hospital database
are, the more challenging, however, with appropriate usage and execution of these
Pratt, P.J. & Last, M.Z. (2016). Concepts of Database Management (8th ed.). Boston, MA:
Cengage Learning