Professional Documents
Culture Documents
COMPANY LOGO
E-R MODEL
COMPANY LOGO
Widely used conceptual level data
model
proposed by Peter P. Chen in 1970s
A database can be modeled as:
a collection of entities,
relationship among entities.
COMPANY LOGO
CONCEPTS OF E-R MODEL
COMPANY LOGO
Entity types
Attributes
Relationship types
COMPANY LOGO
ENTITY TYPE
COMPANY LOGO
Entity
COMPANY LOGO
Entity Type
COMPANY LOGO
ATTRIBUTES
COMPANY LOGO
Attributes
COMPANY LOGO
Types of Attributes
Simple Attributes
having atomic or indivisible values.
examples:
• Dept – a string
• PhoneNumber – an eight digit number
COMPANY LOGO
Types of Attributes
Composite Attributes
having several components in the value.
example:
• Qualification with components (DegreeName,
Year, UniversityName)
COMPANY LOGO
Types of Attributes
Derived Attributes
Attribute value is dependent on some other
attribute.
example:
• Age depends on DateOfBirth. So age is a derived
attribute.
COMPANY LOGO
Types of Attributes
Single-valued
having only one value rather than a set of
values.
Example:
• PlaceOfBirth – single string value.
COMPANY LOGO
Types of Attributes
Multi-valued
having a set of values rather than a single
value.
Examples:
• CoursesEnrolled attribute for student
• EmailAddress attribute for student
• PreviousDegree attribute for student.
COMPANY LOGO
Types of Attributes
COMPANY LOGO
Diagrammatic Notation for Entities
entity
rectangle
attribute
ellipse connected to rectangle
multi-valued attribute
double ellipse
composite attribute
ellipse connected to ellipse
derived attribute
dashed ellipse
COMPANY LOGO
Diagrammatic Notation for Entities
COMPANY LOGO
Key Attributes
Key
an attribute or a collection of attributes whose
value(s) uniquely identify an entity in the entity
set.
Examples:
• RollNumber - Key for Student entity set
• EmpID - Key for Faculty entity set
• HostelName, RoomNo - Key for Student entity set
(assuming that each student gets to stay in a
single room)
COMPANY LOGO
Key Attributes
COMPANY LOGO
Key Attributes
Primary Key:
One attribute whose value can uniquely
identify a complete record (one row of data)
within an entity.
COMPANY LOGO
Key Attributes
COMPANY LOGO
Key Attributes
Foreign Key
A copy of a primary key that exists in another
entity for the purpose of forming a relationship
between the entities involved.
COMPANY LOGO
Entity Categories
COMPANY LOGO
Entity Categories
COMPANY LOGO
Examples:
COMPANY LOGO
Relationships
COMPANY LOGO
Examples:
COMPANY LOGO
Degree of Relationship
COMPANY LOGO
Degree of Relationship
Binary Relationship
COMPANY LOGO
Degree of Relationship
Ternary Relationship
COMPANY LOGO
Degree of Relationship
Quaternary Relationship
COMPANY LOGO
Binary Relationships and Cardinality Ratio
COMPANY LOGO
Binary Relationships and Cardinality Ratio
Cardinality
Describes maximum number of possible
relationship occurrences for an entity
participating in a given relationship type.
Four possibilities are usually
specified:
one-to-one (1:1)
one-to-many (1:N)
many-to-one (N:1)
many-to-many (M:N)
COMPANY LOGO
Binary Relationships and Cardinality Ratio
one-to-one (1:1)
COMPANY LOGO
Binary Relationships and Cardinality Ratio
COMPANY LOGO
Binary Relationships and Cardinality Ratio
many-to-many (N:M)
COMPANY LOGO
ERD Development Process
COMPANY LOGO
ERD Development Process –Example
COMPANY LOGO
ERD Development Process – Example
COMPANY LOGO
ERD Development Process – Example
COMPANY LOGO
Identify the entities
Student
Department
Course
Professor
Project
Section
COMPANY LOGO
Determine the attributes for each entity
and Select the primary key for each entity
Student
COMPANY LOGO
Determine the attributes for each entity
and Select the primary key for each entity
COMPANY LOGO
Determine the attributes for each entity
and Select the primary key for each entity
COMPANY LOGO
Establish the relationships between the
entities and Draw an entity model
COMPANY LOGO
Thank you…
END OF PRESENTATION
COMPANY LOGO
Conference centre booking system
The centre contains a number of facilities which may be required by clients making
bookings as follows:
A. There are 400 bedrooms for clients who will be resident during the Course or
conference.
B. A maximum of 250 catered people can be handled at any one time.
C. Six main lecture theatres providing seating for 200 people.
D. Twenty seminar rooms each able to accommodate 25 people.
E. Video conference facilities. The video conference facilities consist of four separate
Video conference networks. Each video conference network has a large screen based
in one of the main lecture theatres, along with 3 satellite screens each of which is
based in one of the seminar rooms.
Draw an entity relationship diagram for the case, stating any assumptions you deem
necessary.
COMPANY LOGO