What is an
Entity Relationship Diagram (ERD)?
Entity relationship diagrams are
a way to represent the structure and layout of a
database. It is used frequently to describe the
database
schema. ER diagrams are very useful as the
provide a good conceptual view of any database,
regardless of the underlying hardware and
software.
An ERD is a model that identifies the concepts
or entities that exist in a system and the
relationships between those entities. An ERD is
often used as a way to visualize a relational
database: each entity represents a database
table, and the relationship lines represent the
keys in one table that point to specific records
in related tables. ERDs may also be more
abstract, not necessarily capturing every table
needed within a database, but serving to diagram
the major concepts and relationships. This ERD is
of the latter type, intended to present an
abstract, theoretical view of the major entities
and relationships needed for management of
electronic resources. It may assist the database
design process for an e-resource management
system, but does not identify every table that
would be necessary for an electronic resource
management database.
Objects
There are three main objects on an ER Diagram:
entities, relations and attributes. These are
joined together with lines.
1.Entities:
An entity is a concept or object
in the database. Entities are concepts within the
data model. Each entity is represented by a box
within the ERD. Entities are abstract concepts,
each representing one or more instances of the
concept in question. An entity might be
considered a container that holds all of the
instances of a particular thing in a system.
Entities are equivalent to database tables in a
relational database, with each row of the table
representing an instance of that entity.
Each entity represents a container for instances
of the thing in question. The diagram below has
an entity for “student” and another for “school.”
This indicates that the system being modeled may
contain one or more students and one or more
schools.
2.Relationships:-
Relations are the connections between
two or more entities. Relationship lines indicate
that each instance of an entity may have a
relationship with instances of the connected
entity, and vice versa.






The diagram above now
indicates that Employees
may have some relationship with
company. More specifically, there may be a
relationship between a particular Employee
and a particular company. Relations also have
cardinality and degrees. The degree of a
relationship is how many entities it connects to.
For example, there might be a
relationship OWNS between entities PERSON
and VEHICLE. Other types of relationships
are:
ISA relationships are for when one
entity is also a particular type of another
entity.
For example DOG <ISA> ANIMAL. All the attributes
of the entity ANIMAL are automatically given to
DOG.
<>