Professional Documents
Culture Documents
Entity Relationship Diagram (Erd)
Entity Relationship Diagram (Erd)
Entity Relationship Diagram (Erd)
RELATIONSHIP
DIAGRAM(ERD)
…………………………………………………………………………..
WHAT IS AN ENTITY and ENTITY
RELATIONSHIP DIAGRAM?
In database administration, an entity could be a single thing, a place or an object.
ERD is a design tool that allows database administrators to view the relationship
between two or several entities.
ATTRIBUTES
Entities are represented by the means of their properties called
attributes.
RELATIONSHIP
The association among the entities is known as relationship
CARDINALITY
Cardinality defines the number of entities in one entity set, which can
be associated with the number of entity in other set.
TYPES OF CARDINALITY
One to one
A one-to-one relationship is
a link between the
information in two tables,
where each record in each
table only appears once.
One to many
Types of integrity
Entity integrity
Entity Integrity constraint uniquely identifies each row in table. Primary key
assures the entity integrity constraint is applied to a table.
It also states that value in primary key fields cannot be null.
Referential integrity
Referential integrity constraint refers to relationship between the tables. The relationship between
tables is established by using foreign keys. This constraint states that a foreign key must have a
matching primary key in another table or must be null.
Domain integrity
A domain defines the possible values of an attribute
Book Entity: It has author, book_ID,
title, price, and availability.
Publisher Entity: It has publisher_ID,
publisher_address, and
publisher_name.
Member Entity: It has member_ID,
member_date, member_type,
member_address, member_name, and
expiry_date.
In this example, we can see one-to-one
and one-to-many relationships. A
member can borrow many books, but
only one reader can borrow one book.
So, the relationship is 1: Many.
THANK YOU!