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,
Powerful Google developer tools for immediate impact! (2023-24 C)
Entity Relationship Diagram part9
1. Introdaction to Python
Dr. Mohammed Kassim Page 37
Entity Relationship Diagram
Entity Relationship Diagram
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 system and databases.
ER diagrams is modeling tool used to depict graphically a system and database
design before it is actually implemented.
It has three basic components:
Entity
Is a real-world object unique from other objects. An entity can be a
physical object like employee, student, faculty, customer etc. Or it could
also be conceptual or abstract like transaction, order, course, subjects
etc. It is normally represented by a rectangle shape.
Relationship
Is a way of relating one entity to another. Entities can therefore participate
in a relationship. it is commonly thought as a verb connecting the entities
or nouns. It is normally represented by a diamond shape.
2. Introdaction to Python
Dr. Mohammed Kassim Page 38
Entity Relationship Diagram
Types of Relationship:
Example – Relationships:
A departments in university consists of a number of courses. A number of
modules make up each course. Students enroll in a particular course and take
modules towards the completion of that course. Each module is taught by a
lecturer from the appropriate department, and each lecturer has a group of
students.
Entities: Department, Course, Module, Lecturer, Student
3. Introdaction to Python
Dr. Mohammed Kassim Page 39
Entity Relationship Diagram
Attributes
The characteristic or basic fact or field of an Entity or Relationship.
for example a Student entity could have the following attributes
(ID Number, Last Name, First Name, Address, Birth Date). A relationship
could also have an attribute for example an Entity name Student enrolls
(relationship) to a Course/Program.
4. Introdaction to Python
Dr. Mohammed Kassim Page 40
Entity Relationship Diagram
Example of Attributes:
Entities: Program, Student , Faculty
Attributes: Program (Program ID, Name, Chairperson, Enrollment Date) –
Student (IDNo, Lastname, Firstname, Gender, Address, Birth Date, Email) –
Faculty (IDNo, Name, Chairperson, specialization)