Академический Документы
Профессиональный Документы
Культура Документы
TITLE
PAGE
INTRODUCTION / THEORY
WORKING PROCEDURES
3-5
RESULTS / ANALYSIS
6-9
QUESTION
10 - 13
DISCUSSION
14
CONCLUSION
15
REFERENCES
16
INTRODUCTION / THEORY
Entity Relationship Diagram ( ERD )
An entity relationship diagram (ERD) shows the relationships of entity sets stored
in a database. An entity in this context is a component of data. In other words, ER
diagrams illustrate the logical structure of databases.
At first glance an entity relationship diagram looks very much like a flowchart. It
is the specialized symbols, and the meanings of those symbols, that make it unique.
The History of Entity Relationship Diagrams
Peter Chen developed ERDs in 1976. Since then Charles Bachman and James
Martin have added some slight refinements to the basic ERD principles.
Example Of ERD
WORKING PROCEDURES:
Steps to Develop ER Diagram:
Case Study : A student can borrow one or more books. A book has a supplier and a
supplier can supply many books. The information of students are matric no, student
name, class, semester and phone no. The important data of book are serial no, book title
and year of published. Supplier have id supplier, address and phone no.
Step 2: The attributes, primary key and foreign key for each entity has been
identify.
Entity
Student
Attributes
Matric_no,
Primary Key
matric_no
Foreign Key
serial_no
serial_no
matric_no,
student_name,
class_semester,
Book
phone_no
serial_no, book_title,
Supplier
year_of_publish
id_supplier, address,
id_supplier
id_supplier
phone_no, serial_no
Relationship
Cardinality
Borrow
1:M
Supply
1:M
RESULTS / ANALYSIS:
Company
Supervisor
Employee
Project
Department
Step 2: The attributes, primary key and foreign key for each entity has been
identify.
Entity
Company
Attributes
Primary key
Foreign key
Department
Department_name,
department_number
Supervisor
department_number
Supervisor_name,
supervisor_number
Employee
supervisor_number
Employee_name,
employee_number
Project_number
project
employee_number
Project_number,
Project_number
employee_number
project_name
Relationship
Cardinality
has
1:1
Have
1:M
Assigned
M:1
Assigned
1:M
QUESTION / DISCUSSIONS:
Draw the ERD for the given scenario below. (State any additional assumption if
needed)
Dungun General Hospital has several wards. This hospital has a few types of ward
depends on types of patients. Patient information will be recorded into file that patient
number, patient name, address, phone no., IC no. patients category and group of blood
patient. Each patient is treated by a doctor at one time but one doctor can treats a number
of patients. The information of doctors recorded are : doctor ID, doctor name, address,
phone no, IC no and expertise. The nurses will be assigned to take care of the patients.
Nurses in this hospital are graded based on their experience, qualification and duration of
working in the hospital.
Ward
Patient
Doctor
Nurse
Step 2: The attributes, primary key and foreign key for each entity has been
identify.
10
Entity
Ward
Patient
Attributes
Primary key
Patient_name,
patient_number
Foreign key
patient_number
doctor_id, experienced
doctor_id
patient_number,
patient_number,
address, phone_number,
ic_number,
patient_category,
Doctor
group_of_blood
Expertise, ic_number,
phone_number, address,
Nurse
doctor_name, doctor_id
Duration_of_working,
experienced
experienced
patient_number,
qualification,
doctor_id
experienced
Relationship
Cardinality
11
has
M:N
Take care
M:N
treat
M:1
12
DISSCUSSION
13
For the discussion, I can know how the ERD has been created by Peter Chen in
1976. I can know how the ERD work in process to create a database. To make a complete
ERD diagram, there are 4 most important step that I should follow.
The first step, I need to identify the entities in question. An entity is an object or
concept about which I want to store the information. For example, patient, doctor,
employee.
The second step, I need to find the attributes for each entity that I found. A key
attribute is the unique, distinguishing characteristic of the entity. For example, an
employee's social security number might be the employee's key attribute.
The third step, I need to show the relationship and cardinality in relationship.
There are 3 type of cardinality. One to One ( 1:1 ), One to Many ( 1:M ), and Many to
Many ( M:N ).
The last step to construct an ERD diagram is I need to draw the complete ERD
diagram. This is example for ERD diagram that I draw successfully.
CONCLUSION
14
In the conclusion section, the ERD has been created by Peter Chen 1976. The
ERD was very suitable in process to create a database. The ERD almost look like the
flow chart but it was different because the flow chart do not have a primary key and
foreign key. Lastly, the ERD has their own step to complete it.
15
REFERENCES
Website
http://www.smartdraw.com/entity-relationship-diagram/
https://en.wikipedia.org/wiki/Entity%E2%80%93relationship_model
http://searchcrm.techtarget.com/definition/entity-relationship-diagram
16