Entity Relationship Diagram (ERD)
Terminologies
Entity
Anything about which we want to keep data is known as an entity.
For Example;
- Student, teacher, course
- A/C holder, A/C, withdrawal info
Attributes
Features or characteristics of an entity that is of interest for an organization is known as an
attributes.
For example;
- (reg #, Name, Class)
- (Teacher ID, Teacher name, Teacher Field)
- (Course Code, Course Title, Credit Hours)
- (A/C Title, Full Name, Address)
- (A/C No, A/C Title, Balance)
- (A/C no, Date/ Time, Amount Withdrawal)
Entity Classes
Entities having the same attributes form or belong to an entity class.
For example;
- ‘Building’ is an entity class whereas ‘Saudi Pak Tower’ is an entity.
- Entity is an individual
- ‘Mess Member’ is an entity class and ‘Hamid, Ahmad’ etc are the entities
DBMS
www.techtilldate.blogspot.com www.bscs15.blogspot.com
Entity Instance
A single occurrence of an entity class is known as entity instance or a record or row or tuple.
Attributes
Student (Entity Class)
Roll no Name Class
1589 Ali BSCS
1599 Ahmad BSCS
1555 Umair BSCS
Entities
Entity instance
DBMS
www.techtilldate.blogspot.com www.bscs15.blogspot.com
Relationship
It is the logical association between instances of different entity classes.
Roll no Name Class
1589 Ali BSCS
1599 Ahmad BSCS
1555 Umair BSCS
Registe
Course code Course Title Credit Hours
rs
CS-241 DBMS 3
CS-141 OS 3
Teacher Name Subject Teaches
Sir Imran Saeed DBMS
Sir OS
DBMS
www.techtilldate.blogspot.com www.bscs15.blogspot.com