ER Diagram in DBMS
ER Diagram in DBMS
ER Diagram in DBMS
One-to-one:
• One entity from entity set X can be associated with at
most one entity of entity set Y and vice versa.
Example: One student can register for numerous
courses. However, all those courses have a single line
back to that one student.
Attributes One-to-many
• It is a single-valued property of either an entity-type • One entity from entity set X can be associated with
or a relationship-type. multiple entities of entity set Y, but an entity from
• For example, a lecture might have attributes: time, entity set Y can be associated with at least one entity.
date, duration, place, etc. For example, one class is consisting of multiple
• An attribute is represented by an Ellipse students.
Many to One
• More than one entity from entity set X can be
associated with at most one entity of entity set Y.
However, an entity from entity set Y may or may not be
associated with more than one entity from entity set X.
For example, many students belong to the same class.
Many to Many
• One entity from X can be associated with more than
one entity from Y and vice versa.
For example, Students as a group are associated with
multiple faculty members, and faculty members can be
associated with multiple students.