0% found this document useful (0 votes)
56 views46 pages

Shahnawaz Alam

This document is Shahnawaz Alam's coursework submission for the module CC4057NI Introduction to Information Systems at London Metropolitan University. The coursework covers modeling a hospital management system using tables, entities, relationships, and queries. It includes the creation of 5 tables, an entity relationship diagram, relational diagram, data dictionaries for each table, and examples of different types of queries including joins, filters, sorting and aggregations. The coursework is submitted on June 15, 2020.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
56 views46 pages

Shahnawaz Alam

This document is Shahnawaz Alam's coursework submission for the module CC4057NI Introduction to Information Systems at London Metropolitan University. The coursework covers modeling a hospital management system using tables, entities, relationships, and queries. It includes the creation of 5 tables, an entity relationship diagram, relational diagram, data dictionaries for each table, and examples of different types of queries including joins, filters, sorting and aggregations. The coursework is submitted on June 15, 2020.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 46

CC4057NI INTRODUCTION TO INFORMATION TO SYSTEMS

Module Code & Module Title

CC4057NI Introduction to Information Systems

Assessment Weightage & Type

50% Individual Coursework

Year and Semester

2020 Spring

Student Name: Shahnawaz Alam

Group: L1N9

London Met ID: 19033799

College ID: NP01NT4S200025

Assignment Due Date: 15 June 2020

Assignment Submission Date: 15 June 2020

I confirm that I understand my coursework needs to be submitted online via Google Classroom under the
relevant module page before the deadline in order for my assignment to be accepted and marked. I am
fully aware that late submissions will be treated as non-submission and a mark of zero will be awarded.

SHAHNAWAZ ALAM 1
CC4057NI INTRODUCTION TO INFORMATION TO SYSTEMS

Table of Content
Chapter 1 Introduction ..................................................................................................... 6
1.1 Why is there need of database system for the organization you have selected.
6
1.2 What are the aims and objectives? .................................................................... 7
Chapter 2 Model .............................................................................................................. 8
2.1 Table (Entity) Description ...................................................................................... 8
Doctor Table (Entity). ................................................................................................. 10
Medical report Table (Entity). ..................................................................................... 13
Patient Table (Entity). ................................................................................................ 16
Staff Table (Entity). .................................................................................................... 19
Hospital Table (Entity). .............................................................................................. 22
2.2 ENTITY RELATIONSHIP DIAGRAM. .................................................................. 25
Hospital Management System entities and their Attributes. ....................................... 26
2.3 REALATIONAL DIAGRAM. ................................................................................. 27
Chapter 3 Data Dictionary ............................................................................................. 29
Data dictionary of Doctor Table (Entity). .................................................................... 30
Data dictionary of Medical report Table. .................................................................... 31
Data Dictionary of Patient. ......................................................................................... 32
Data Dictionary of Staff. ............................................................................................. 33
Data Dictionary of Hospital. ....................................................................................... 34
Chapter 4 Queries ......................................................................................................... 35
4.1 Show Right join query. ......................................................................................... 36
4.2 Show the Distinct query. ...................................................................................... 37
4.3 Show the Order by query. .................................................................................... 38
4.4 Show the Count query. ........................................................................................ 39
4.5 Show the Limit query. .......................................................................................... 40

SHAHNAWAZ ALAM 2
CC4057NI INTRODUCTION TO INFORMATION TO SYSTEMS

4.6 Show the WHERE query. .................................................................................... 41


4.7 Show the Between query. .................................................................................... 42
4.9 Show the Like query. ........................................................................................... 44
4.10 Show Left Join query. ........................................................................................ 45
Chapter 5 Conclusion .................................................................................................... 46
Chapter 6 References ................................................................................................... 46

SHAHNAWAZ ALAM 3
CC4057NI INTRODUCTION TO INFORMATION TO SYSTEMS

List of Figures
Figure 1: Create statement of Doctor. ........................................................................... 10
Figure 2: Insert Statement of doctor values................................................................... 11
Figure 3: Insert statement of Doctor. ............................................................................. 12
Figure 4: Create statement of Medical report. ............................................................... 13
Figure 6: Select statement of Medical report. ................................................................ 15
Figure 8: Insert statement of Patient. ............................................................................ 17
Figure 9: Select statement of Patient. ........................................................................... 18
Figure 10: Create statement of Staff. ............................................................................ 19
Figure 11: Insert statement of Staff. .............................................................................. 20
Figure 12: Select statement of Staff. ............................................................................. 21
Figure 13: Create statement of Hospital. ....................................................................... 22
Figure 15: Select statement of Hospital......................................................................... 24
Figure 16: ERD of Hospital management system.......................................................... 25
Figure 17: Relational diagram of hospitals management system. ................................. 27
Figure 18: Right Join Query. ......................................................................................... 36
Figure 19: Distinct Query............................................................................................... 37
Figure 20: Order by Query. ........................................................................................... 38
Figure 21: Count Query. ................................................................................................ 39
Figure 22: Limit Query. .................................................................................................. 40
Figure 23: Where Query. ............................................................................................... 41
Figure 24: Between Query. ........................................................................................... 42
Figure 25: IN Query. ...................................................................................................... 43
Figure 26: Like Query. ................................................................................................... 44
Figure 27: Left Join Query. ............................................................................................ 45

SHAHNAWAZ ALAM 4
CC4057NI INTRODUCTION TO INFORMATION TO SYSTEMS

List of Table
Table 1: Hospital ............................................................................................................. 8
Table 2: Patient ............................................................................................................... 8
Table 3: Doctor ............................................................................................................... 8
Table 4: Staff ................................................................................................................... 9
Table 5: Medical report.................................................................................................... 9
Table 6: Data dictionary of Doctor. ................................................................................ 30
Table 7: Data Dictionary of Medical report. ................................................................... 31
Table 8: Data Dictionary of Patient. ............................................................................... 32
Table 9: Data Dictionary of Staff.................................................................................... 33
Table 10: Data Dictionary of Patient. ............................................................................. 34

SHAHNAWAZ ALAM 5
CC4057NI INTRODUCTION TO INFORMATION TO SYSTEMS

Chapter 1 Introduction
The project is about “Hospitals management system”.

Hospitals are the essential part of our lives. Providing first-class medical services to
people suffering from various ailments, which can also additionally be due to alternate in
local weather, multiplied work-load, emotion trauma stress etc. hospitals are the group
imparting clinical and surgical cure and nursing care for any unwell or human beings.

It is an imperative part of social and medical organization, the features of which is to


grant complete care to the needy one, each healing and preventive. It is also core for
supplying coaching to health workers and center for biosocial research (WHO).

Hospitals are the section of social system which one more have subsystem like medical
services. Diagnostic service, therapeutic service, supportive and utility services with
heterogeneous team of people like Doctors, Nurse, Paramedics, Administration staffs all
working together to supply scientific care to patients..(“Introduction to hospital & its
challenges,” n.d.)

1.1 Why is there need of database system for the organization you have
selected.

It is necessary for the hospitals to maintain records of its day-to-day activities and
documents of its patients, doctors, nurse, ward boys and other staff personals that
maintain the hospital walking smoothly and successfully. Database management
system is used in every hospital, clinic or dispensary for maintaining patient details and
their results.
All the large enterprises need the database systems for handing the information. One of
those enterprises in the hospital. Because of large number of patients, doctors, and staff
in hospitals, data processing becomes more crucial. Data management in hospital in
hospital can be used for achieving and accounting business. Doctors should access the
patients. On the other hands patient can access their lab results and all kinds of

SHAHNAWAZ ALAM 6
CC4057NI INTRODUCTION TO INFORMATION TO SYSTEMS

information that doctors indicate. Database hospital help to control the accounting
business easily.
In the database management system all information including prescription, survey,
diagnosis of patients can be carried out. The patients and the doctor can take care of all
information. Patients can take appointment time for visiting and can access their
information via interested if the organization is online. Administration can access the
statistics about the hospitals such as patient capacity, numbers of employees etc.
(Amaechi James C., Agbasonu Valerian C., and Nwawudu Sixtus E., February 2018)
Hospital records are available from a myriad of source, such as a person hospitals and
clinic association, state and regional data organization, health planning or health data
organization at the state level, departments of health and federal agencies. Many
hospital quality measures are created using hospitals administrative discharge
data.(“Databases Used for Hospital Quality Measures,” n.d.)

1.2 What are the aims and objectives?

The project “Hospitals management system” is aimed to develop to maintain the day-to
day ‘state of admission/discharge of patients’, list of doctors, reviews generation, and
etc. it is designed to attain following targets.

1. To computerize all the details regarding patient details and hospital details.

2. Scheduling the services of specialized medical doctors and emergency exacts so


that facilities provided by hospitals are completely utilized in advantageous and
efficient manner.

3. If the medical store issues medicines to patient, it should reduce the stock status
of the medical store and vice-versa.

4. It should be able to handle the test reports of patients conducted in the pathology
lab of the hospital.

5. Scheduling the appointment of patient with doctors to make it convenient for


both.(Himani Chopra, 06:50:37 UTC)

SHAHNAWAZ ALAM 7
CC4057NI INTRODUCTION TO INFORMATION TO SYSTEMS

Chapter 2 Model

2.1 Table (Entity) Description


Entity is the things which we want to store information. It is a fundamental basic
constructing block of storing facts about business process. An entity represents an
object described within the information system about which you want to store data.
(Einstein, n.d.). entity store any kind of information that an organization want to store.
There are five Entity(table). Each entity(table) represent as,

1. Hospitals entity: The attributes of hospitals are hospital-id, name, city, address
and phone.

Hospital- Name City Address phone Patient Doctor Staff


ID
1 NorvicHospital Kathmandu Thapathali 9805937377 1 1 1
2 EverestHospital Chitwan Gairigao 9805935355 2 2 2
3 CivilHospital Janakpur Sarlahi 9807785065 3 3 3
4 KantipurHospital Biratnagar Parsa 9866262165 4 4 4
5 BirHospital Lahan Siraha 9825775688 5 5 5
Table 1: Hospital

2. Patient entity: The attributes of patients are patient-id, name, address, dob and
phone.

Patient-ID Name Address Phone DOB Doctor Record


1 Amit Siraha 9807765678 2007-04-09 1 1
2 Dipak Madar 9866765434 2005-05-02 2 2
3 Roshan Makhnaha 9876543212 2000-01-08 3 3
4 Seema Lahan 9809876543 2010-11-12 4 4
5 Rijan Janakpur 9843124345 2009-12-10 5 5
Table 2: Patient
3.Doctor entity: the attributes of doctor are doctor-id, name, address, qualification,
dob and salary.

Doctor-ID Name Address Salary Qualification DOB


1 Sujan Kathmadu 50000 Mbbs 1990-01-02
2 Sampada Pokhara 40000 Dentist 1991-05-12
3 Aalok Chitwan 85000 Surgeon 1995-07-20
4 Suyoban Bitatnagar 90000 Cardiologist 1985-11-25
5 Binit Janakpur 60000 Gastroenterologists 1994-04-18
Table 3: Doctor

SHAHNAWAZ ALAM 8
CC4057NI INTRODUCTION TO INFORMATION TO SYSTEMS

4.Staff entity: the attributes of staff are staff-id, name, address, salary and Dob.

Staff-ID Name Address Salary DOB


1 Mukesh Banepa 10000 2002-01-03
2 Suresh Tinkune 9000 1998-05-15
3 Rajan Sarlahi 13000 1995-10-18
4 Modi Hetauda 20000 2000-08-12
5 Arnab Bagbazar 15000 1999-06-06

Table 4: Staff
5. Medical report entity: the attributes of medical report are report-id, problems and
date of examination.

Record-ID Problem Date of


examination
1 Cancer 2020-01-10
2 Corona 2020-03-25
3 Typhoid 2020-01-05
4 Cholera 2020-2-18
5 Malaria 2020-04-09
Table 5: Medical report

SHAHNAWAZ ALAM 9
CC4057NI INTRODUCTION TO INFORMATION TO SYSTEMS

Doctor Table (Entity).


CREATE STATEMENT.
CREATE TABLE Doctor
(Doctor_ ID INT PRIMARY KEY AUTO_INCREMENT,
Name VARCHAR (225) NOT NULL,
Address VARCHAR (225) NOT NULL,
Salary INT NOT NULL,
Qualification VARCHAR (255) NOT NULL,
DOB DATE NOT NULL);

Figure 1: Create statement of Doctor.

SHAHNAWAZ ALAM 10
CC4057NI INTRODUCTION TO INFORMATION TO SYSTEMS

INSERT STATEMENT.
INSERT INTO Doctor VALUES(1,"Sujan","Kathmadu",50000,"Mbbs",1990-01-02);
INSERT INTO Doctor VALUES(2,"Sampada","Pokhara",40000,"Dentist",1991-05-12);
INSERT INTO Doctor VALUES(3,"Aalok","Chitwan",85000,"Surgeon",1995-07-20);
INSERT INTO Doctor VALUES(4,"Suyoban","Bitatnagar",90000,"Cardiologist",1985-11-
25);
INSERT INTO Doctor VALUES(5,"Binit","Janakpur",60000,"Gastroenterologists",1994-
04-18);

Figure 2: Insert Statement of doctor values

SHAHNAWAZ ALAM 11
CC4057NI INTRODUCTION TO INFORMATION TO SYSTEMS

SELECT STATEMENT
SELECT * FROM Doctor;

Figure 3: Insert statement of Doctor.

SHAHNAWAZ ALAM 12
CC4057NI INTRODUCTION TO INFORMATION TO SYSTEMS

Medical report Table (Entity).


CREATE STATEMENT.
CREATE TABLE Medical report
(Record_ ID INT PRIMARY KEY AUTO_INCREMENT,
Problem VARCHAR (255) NOT NULL,
Date_ of_ examination DATE NOT NULL);

Figure 4: Create statement of Medical report.

SHAHNAWAZ ALAM 13
CC4057NI INTRODUCTION TO INFORMATION TO SYSTEMS

INSERT STATEMENT.
INSERT INTO Medical report VALUES(1,"Cancer","2020-01-10");
INSERT INTO Medical report VALUES(2,"Corona","2020-03-25");
INSERT INTO Medical report VALUES(3,"Typhoid","2020-01-05");
INSERT INTO Medical report VALUES(4,"Cholera","2020-2-18");
INSERT INTO Medical report VALUES(5,"Malaria","2020-04-09");

Figure 5: Insert statement of Medical report.

SHAHNAWAZ ALAM 14
CC4057NI INTRODUCTION TO INFORMATION TO SYSTEMS

SELECT STATEMENT.
SELECT * FROM Medical report.

Figure 6: Select statement of Medical report.

SHAHNAWAZ ALAM 15
CC4057NI INTRODUCTION TO INFORMATION TO SYSTEMS

Patient Table (Entity).


CREATE STATEMENT.
CREATE TABLE Patient
(Patient_ ID INT PRIMARY KEY AUTO_INCREMENT,
Name VARCHAR (255) NOT NULL,
Address VARCHAR (255) NOT NULL,
Phone VARCHAR (255) NOT NULL,
DOB DATE NOT NULL,
Doctor INT,
Record INT,
FOREIGN KEY (Doctor) REFERENCES Doctor (Doctor_ ID),
FOREIGN KEY (Record) REFERENCES medical report (Record_ ID));

Figure 7: Create statement of Patient.

SHAHNAWAZ ALAM 16
CC4057NI INTRODUCTION TO INFORMATION TO SYSTEMS

INSERT STATEMENT.
INSERT INTO Patient VALUES(1,"Amit","Siraha","9807765678","2007-04-09",1,1);
INSERT INTO Patient VALUES(2,"Dipak","Madar","9866765434","2005-05-02",2,2);
INSERT INTO Patient VALUES(3,"Roshan","Makhnaha","9876543212","2000-01-
08",3,3);
INSERT INTO Patient VALUES(4,"Seema","Lahan","9809876543","2010-11-12",4,4);
INSERT INTO Patient VALUES(5,"Rijan","Janakpur","9843124345","2009-12-10",5,5);

Figure 8: Insert statement of Patient.

SHAHNAWAZ ALAM 17
CC4057NI INTRODUCTION TO INFORMATION TO SYSTEMS

SELECT STATEMENT.
SELECT * FROM Patient.

Figure 9: Select statement of Patient.

SHAHNAWAZ ALAM 18
CC4057NI INTRODUCTION TO INFORMATION TO SYSTEMS

Staff Table (Entity).


CREATE STATEMENT.
CREATE TABLE Staff
(Staff_ ID INT PRIMARY KEY AUTO_INCREMENT,
Name VARCHAR (255) NOT NULL,
Address VARCHAR (255) NOT NULL,
Salary INT NOT NULL,
DOB DATE NOT NULL);

Figure 10: Create statement of Staff.

SHAHNAWAZ ALAM 19
CC4057NI INTRODUCTION TO INFORMATION TO SYSTEMS

INSERT STATEMENT.
INSERT INTO Staff VALUES(1,"Mukesh","Banepa",10000,"2002-01-03");
INSERT INTO Staff VALUES(2,"Suresh","Tinkune",9000,"1998-05-15");
INSERT INTO Staff VALUES(3,"Rajan","Sarlahi",13000,"1995-10-11");
INSERT INTO Staff VALUES(4,"Modi","Hetauda",20000,"2000-08-12");
INSERT INTO Staff VALUES(5,"Arnab","Bagbazar",15000,"1999-06-06");

Figure 11: Insert statement of Staff.

SHAHNAWAZ ALAM 20
CC4057NI INTRODUCTION TO INFORMATION TO SYSTEMS

SELECT STATEMENT.
SELECT * FROM Staff.

Figure 12: Select statement of Staff.

SHAHNAWAZ ALAM 21
CC4057NI INTRODUCTION TO INFORMATION TO SYSTEMS

Hospital Table (Entity).


CREATE STATEMENT.
CREATE TABLE Hospital
(Hospital_ ID INT PRIMARY KEY AUTO_INCREMENT,
Name VARCHAR (255) NOT NULL,
City VARCHAR (255) NOT NULL,
Address VARCHAR (255) NOT NULL,
Phone VARCHAR (255) NOT NULL,
Patient INT,
Doctor INT,
Staff INT,
FOREIGN KEY (Patient) REFERENCES Patient (Patient_ ID),
FOREIGN KEY (Doctor) REFERENCES Doctor (Doctor_ ID),
FOREIGN KEY (Staff) REFERENCES Staff (staff_ ID));

Figure 13: Create statement of Hospital.

SHAHNAWAZ ALAM 22
CC4057NI INTRODUCTION TO INFORMATION TO SYSTEMS

INSERT STATEMENT.
INSERT INTO Hospital
VALUES(1,"NorvicHospital","Kathmandu","Thapathali","9805937377",1,1,1);
INSERT INTO Hospital
VALUES(2,"EverestHospital","Chitwan","Gairigao","9805935355",2,2,2);
INSERT INTO Hospital
VALUES(3,"CivilHospital","Janakpur","Sarlahi","9807785065",3,3,3);
INSERT INTO Hospital
VALUES(4,"KantipurHospital","Biratnagar","Parsa","9866262165",4,4,4);
INSERT INTO Hospital VALUES(5,"BirHospital","Lahan","Siraha","9825775688",5,5,5);

Figure 14: Insert statement of Hospital.

SHAHNAWAZ ALAM 23
CC4057NI INTRODUCTION TO INFORMATION TO SYSTEMS

SELECT STATEMENT.
SELECT * FROM Hospital.

Figure 15: Select statement of Hospital.

SHAHNAWAZ ALAM 24
CC4057NI INTRODUCTION TO INFORMATION TO SYSTEMS

2.2 ENTITY RELATIONSHIP DIAGRAM.


Entity Relationship Diagram (ERD) displays the relationships of entity set stored in a
database. In the words, we can say that ER diagrams help you to explain the logical
structure of databases. Helps to describe entities, attributes, relationship.ER diagram
can be used by database designers as a blueprint for implementing data in specific
software applications. The database designers gain a better understanding of the
information to be contained in the database with the help of ER diagram. ER diagram is
allowed you to communicate with the logical structure of the database users.

Figure 16: ERD of Hospital management system.

SHAHNAWAZ ALAM 25
CC4057NI INTRODUCTION TO INFORMATION TO SYSTEMS

This ERD (Entity Relationship Diagram) represents the model of Hospital Management
System Entity. The entity-relationship diagram of Hospital Management System shows
all the visual instrument of database entity (table) and the relation between patient,
doctor, hospitals, medical report and staff etc. it used structured data groups of Hospital
Management System functionalities. The main entities of the Hospital Management
System are Hospitals, Patient, Doctors, staff and Medical report.

Hospital Management System entities and their Attributes.


• Hospitals entity: The attributes of hospitals are hospital-id, name, city, address
and phone.
• Patient entity: The attributes of patients are patient-id, name, address, dob and
phone.
• Doctor entity: the attributes of doctor are doctor-id, name, address, qualification,
dob and salary.
• Medical report entity: the attributes of medical report are report-id, problems and
date of examination.
• Staff entity: the attributes of staff are staff-id, name, address, salary and Dob.
• The detail of hospitals is store into the hospital tables respective with all tables
• Each entity (hospital, patient, doctors, staff and medical report) contains primary
key and unique keys.
• The entity hospital, patients, doctor, staff and medical report entities with foreign
key.
• This is one-to-one and one-to-many relationships available between hospital,
patient, doctor, staff and medical report.
• All the entities hospital, patient, doctor, staff and medical report are normalized
and reduce duplicate record.

SHAHNAWAZ ALAM 26
CC4057NI INTRODUCTION TO INFORMATION TO SYSTEMS

2.3 REALATIONAL DIAGRAM.


A relational diagram refers to a visual representation of the relational database’s
entities, the relationship between those entities, and the attributes within those entities.
Therefore, it makes it easy to understand what the entities represent, what types of
relationship exist and how these relationships are implemented.

Figure 17: Relational diagram of hospitals management system.

SHAHNAWAZ ALAM 27
CC4057NI INTRODUCTION TO INFORMATION TO SYSTEMS

This relational diagram is for ‘hospitals management system’. There are five entities in
this data management system. The entities are patient, hospital, doctor, staff and
medica report. The description of entities is given,

I. Patient Entities: the attributes of patient are patient-ID primary key, name,
address, phone, dob. Doctor and record are attributes with foreign key in the
patient table. So. The relationship between patient, doctor and medical report
one to many.

II. Hospital entities: the attributes of hospital are hospital-ID primary key, name,
address, phone, city and doctor, patient, and staff are attributes with foreign key
in the table. So, the relationship between hospital, doctor, patient and staff are
one to many.

III. Doctor entities: the attributes of doctor are doctor-ID primary key, name, address,
qualification and salary. The relationship between doctor and hospital are one to
many.

IV. Staff entities: the attributes of staff are staff-ID primary key, name address, dob
and salary, the relationship between staff and hospital are one to many.

V. Medical report: the attributes of medical report are record-ID primary key,
problems and date of examination. The relationship between medical report and
patient are one to many.

SHAHNAWAZ ALAM 28
CC4057NI INTRODUCTION TO INFORMATION TO SYSTEMS

Chapter 3 Data Dictionary

A data dictionary contains metadata ex, data about the database. The data dictionary is
very important as it contains information such as what is in the database, who is allowed
to access it, where is the database physically stored etc. The users of the database
normally don't interact with the data dictionary, it is only handled by the database
administrators.

The data dictionary in conventional contains facts about the following,

• Names of all the database tables and their schemas.

• Details about all the tables in the database, such as their owners, their safety
constraints, when they had been created etc.

• Physical information about the tables such as the place they are saved and how.

• Table constraints such as primary key attributes, foreign key data etc.

• Information about the database views that are visible.(“What is Data Dictionary,”
n.d.)

SHAHNAWAZ ALAM 29
CC4057NI INTRODUCTION TO INFORMATION TO SYSTEMS

Data dictionary of Doctor Table (Entity).


Doctor entity: the attributes of doctor are doctor-id, name, address, qualification, dob
and salary.

Entity Entity Column Column Data Length Primary Foreign Nullable Unique Notes
Name Description Name Description Type Key Key
Doctor A doctor is Doctor- Doctor-ID of INT 11 True False False True Auto-Incremented
someone ID the Doctor,
who work for the
in hospital unique
and give identifier of
treatment each
to patient. Doctor.
Name Name of VAR 255 False False False False
Doctor.

Address Address of VAR 255 False False False False


Doctor.

Qualifi- Qualification VAR 255 False False False False


Cation. of Doctor.

DOB Date birth of DATE False False False False


Doctor.

Salary Monthly INT 11 False False False False


income of
Doctor.

Table 6: Data dictionary of Doctor.

SHAHNAWAZ ALAM 30
CC4057NI INTRODUCTION TO INFORMATION TO SYSTEMS

Data dictionary of Medical report Table.


Medical report entity: the attributes of medical report are report-id, problems and date of
examination.
Entity Entity Column Column Data Length Primary Foreign Nullable Unique Notes
Name Description Name Description Type Key Key
Medical Medical Record Record-ID INT 11 True False False True Auto-
report report ID of the Incremented
checked medical
by the report, for
Doctor in the unique
the identifier of
Hospital to medical
see the report.
problems
of Patient.
Problems Problem of VAR 255 False False False False
Patient.

Date of It gives the DATE False False False False


Examination information
of patient,
when was
the patient
admitted in
the
Hospital.
Table 7: Data Dictionary of Medical report.

SHAHNAWAZ ALAM 31
CC4057NI INTRODUCTION TO INFORMATION TO SYSTEMS

Data Dictionary of Patient.


Patient entity: The attributes of patients are patient-id, name, address, dob and phone
and the attributes with foreign key are doctor and medical report.

Entity Entity Column Column Data Length Primary Foreign Nullable Unique Notes
Name Description Name Description Type Key Key
Patient Patient is Patient- Patient-ID INT 11 True False False True Auto-
the person ID Of the Incremented
who Patient, for
admitted in the unique
the identifier of
hospital for Patient.
the
treatment
of
problems,

Name Name of VAR 255 False False False False


patient.
Address Address of VAR 255 False False False False
Patient.
DOB Date birth DATE False False False False
of Patient.
Phone Patient No. VAR 255 False False False True
Doctor Doctor INT 11 False True True False References to
who gives Doctor-ID
treatment column of
to the Doctor table
Patient.
Medical Report of INT 11 False True True False References to
report Patient. Record-ID
column of
Medical report
Table 8: Data Dictionary of Patient.

SHAHNAWAZ ALAM 32
CC4057NI INTRODUCTION TO INFORMATION TO SYSTEMS

Data Dictionary of Staff.


Staff entity: the attributes of staff are staff-id, name, address, salary and Dob.

Entity Entity Column Column Data Length Primary Foreign Nullable Unique Notes
Name Description Name Description Type Key Key
Staff Staff is Staff-ID Staff-ID of INT 11 True False False True Auto-
someone the Staff, Increment
who work for the
in the unique
Hospital identifier of
for helping each Staff
the doctors
and patient
Name Name of VAR 255 False False False False
Staff
Address Address of VAR 255 False False False False
Staff
Salary Monthly INT 11 False False False False
income of
Staff
Dob Date birth DATE False False False False
of Staff
Table 9: Data Dictionary of Staff.

SHAHNAWAZ ALAM 33
CC4057NI INTRODUCTION TO INFORMATION TO SYSTEMS

Data Dictionary of Hospital.


Hospitals entity: The attributes of hospitals are hospital-id, name, city, address and
phone and the attributes with foreign key are Patient, Doctor and Staff.
Entity Entity Column Column Data Length Primary Foreign Nullable Unique Notes
Name Description Name Description Type Key Key
Hospital Hospital is HospitalHospital-ID INT 11 True False False True Auto-Increment
the place ID of the
where Hospital, for
people unique
goes for identification
treatment of each
hospital
Name Name of VAR 255 False False False False
Hospitals
City City of VAR 255 False False False False
Hospital
Address Address of VAR 255 False False False False
Hospital
Phone Contact no VAR 255 False False False True
of Hospital.
Patient Patient is INT 11 False True True False References to
the person Patient-ID
who go to column of
Hospital for Patient table
treatment
Doctor Doctor is INT 11 False True True False References to
the person Doctor-ID
who work in column of
the hospital Doctor table
for
treatment of
Patient
Staff Staff is the INT 11 False True True False References to
person who Staff-ID
work in the column of Staff
Hospital to table
help the
doctors and
patient
Table 10: Data Dictionary of Patient.

SHAHNAWAZ ALAM 34
CC4057NI INTRODUCTION TO INFORMATION TO SYSTEMS

Chapter 4 Queries
A query is a request for facts or information from a database desk or aggregate of
tables. This statistic may additional be generated as effects by using Structured Query
Language (SQL) or as pictorials, graphs or complex results, e.g., style analyses from
data-mining tools.

One of countless one of a kind of query languages might also use to function a range of
easy to complicated database queries. SQL, the most everyday widely-used query
language, is acquainted to most database administrators (DBAs).

The query database characteristics is equal in necessity to data storage capability.


Thus, a wide variety of question have been developed for unique database engines and
purposes, however SQL is by a long way the most ubiquitous and well-known. In fact,
rookie database directors frequently are amazed when they examine about the
existence of different question languages, extremely akin to how native English-
speaking youngster are confused when hearing a overseas language for the first time.
The factors of surprise in both eventualities leads to a better understanding of different
languages.

Query languages generate unique data kinds in accordance to function. For example,
SQL returns data in neat rows and columns and is very similar to Microsoft Excel in
appearance.

Other query languages generate information as graphs or other complicated information


manipulations, e.g., statistic mining, which is the deep analysis of information that
uncovers previously-unknown traits and relationships between awesome or divergent
data. For example, a SQL manufacturing enterprise question may also divulge that
monthly sales top in June and July, or that girl sales representatives continually
outperform male counterparts at some point of excursion months..(“What is Query?,”
n.d.)

SHAHNAWAZ ALAM 35
CC4057NI INTRODUCTION TO INFORMATION TO SYSTEMS

4.1 Show Right join query.


SELECT * FROM Doctor RIGHT JOIN Patient ON Doctor. Doctor_ ID=Patient. Doctor;

Figure 18: Right Join Query.

The query was successful and this query used to join between two tables by Right side.

SHAHNAWAZ ALAM 36
CC4057NI INTRODUCTION TO INFORMATION TO SYSTEMS

4.2 Show the Distinct query.


SELECT DISTINCT(Address) FROM Patient;

Figure 19: Distinct Query.


The query was successful and this query is an aggregate function used to return only
the unique/distinct entries from a column.

SHAHNAWAZ ALAM 37
CC4057NI INTRODUCTION TO INFORMATION TO SYSTEMS

4.3 Show the Order by query.


SELECT * FROM Hospital ORDER BY Hospital_ ID DESC;

Figure 20: Order by Query.


The query was successful and this query is used shots the record in ascending and
descending order according to the specified column.

SHAHNAWAZ ALAM 38
CC4057NI INTRODUCTION TO INFORMATION TO SYSTEMS

4.4 Show the Count query.


SELECT COUNT (*) AS TOTAL_ Hospital FROM Hospital;

Figure 21: Count Query.


The query was successful and this query is used to return the total number of rows in a
table.

SHAHNAWAZ ALAM 39
CC4057NI INTRODUCTION TO INFORMATION TO SYSTEMS

4.5 Show the Limit query.


SELECT * FROM Hospital ORDER BY Hospital_ ID DESC LIMIT 3;

Figure 22: Limit Query.


The query was successful and this query is used to specified the number of records to
show as the result of a queries.

SHAHNAWAZ ALAM 40
CC4057NI INTRODUCTION TO INFORMATION TO SYSTEMS

4.6 Show the WHERE query.


SELECT * FROM Doctor WHERE YEAR(DOB)>='1990' AND YEAR(DOB)<='1995';

Figure 23: Where Query.


The query was successful and this query is used to extract only those records that fulfil
a specifies criteria.

SHAHNAWAZ ALAM 41
CC4057NI INTRODUCTION TO INFORMATION TO SYSTEMS

4.7 Show the Between query.


SELECT * FROM Staff WHERE Address BETWEEN "Banepa" AND "Tinkune";

Figure 24: Between Query.


The query was successful and this query is used to operator select within a range.

SHAHNAWAZ ALAM 42
CC4057NI INTRODUCTION TO INFORMATION TO SYSTEMS

4.8 Show the IN query.


SELECT * FROM Patient WHERE Record IN (1,2,3);

Figure 25: IN Query.


The query was successful and this query is used to allow to specifies multiple values in
a where clause.

SHAHNAWAZ ALAM 43
CC4057NI INTRODUCTION TO INFORMATION TO SYSTEMS

4.9 Show the Like query.


SELECT * FROM Staff WHERE Address like "%ne%";

Figure 26: Like Query.


The query was successful and this query is used in a where clause to search for a
specified pattern.

SHAHNAWAZ ALAM 44
CC4057NI INTRODUCTION TO INFORMATION TO SYSTEMS

4.10 Show Left Join query.


SELECT * FROM Doctor LEFT JOIN Patient ON Doctor. Doctor_ ID=Patient. Doctor;

Figure 27: Left Join Query.


The query was successful and this query used to join between two tables by left side.

SHAHNAWAZ ALAM 45
CC4057NI INTRODUCTION TO INFORMATION TO SYSTEMS

Chapter 5 Conclusion
Taking into account all the mentioned details, we can make the conclusion that the
hospital management system is the inevitable part of the lifecycle of the modern medical
institution. It automates numerous daily operations and enables smooth interactions of
the users. Developing the hospital system software is a great opportunity to create the
distinct, efficient and fast delivering healthcare model. Implementation of hospital
management system project helps to store all the kinds of records, provide coordination
and user communication, implement policies, improve day-to-day operations, arrange
the supply chain, manage financial and human resources, and market hospital services.
This beneficial decision covers the needs of the patients, staff and hospital authorities
and simplifies their interactions. It has become the usual approach to manage the
hospital. Many clinics have already experienced its advantages and continue
developing new hospital management system project modules.

Chapter 6 References

Databases Used for Hospital Quality Measures [WWW Document], n.d. URL
http://www.ahrq.gov/talkingquality/measures/setting/hospitals/databases.html
(accessed 3.9.20).
Einstein, A., n.d. Hospital Management System DATABASE DESIGN.
Himani Chopra, 06:50:37 UTC. Hospital management system project.
Introduction to hospital & its challenges [WWW Document], n.d. URL
https://www.slideshare.net/sharrygajuryalnepal/introduction-to-hospital-its-
challenges (accessed 4.5.20).
What is Data Dictionary [WWW Document], n.d. URL
https://www.tutorialspoint.com/What-is-Data-Dictionary (accessed 4.13.20).
What is Query? - Definition from Techopedia [WWW Document], n.d. . Techopedia.com.
URL https://www.techopedia.com/definition/5736/query (accessed 4.15.20).

SHAHNAWAZ ALAM 46

You might also like