English 中文(简体)
DBMS - ER Diagram Representation
  • 时间:2024-11-05

ER Diagram Representation


Previous Page Next Page  

Let us now learn how the ER Model is represented by means of an ER diagram. Any object, for example, entities, attributes of an entity, relationship sets, and attributes of relationship sets, can be represented with the help of an ER diagram.

Entity

Entities are represented by means of rectangles. Rectangles are named with the entity set they represent.

Entities in a school database

Attributes

Attributes are the properties of entities. Attributes are represented by means of elppses. Every elppse represents one attribute and is directly connected to its entity (rectangle).

Simple Attributes

If the attributes are composite, they are further spanided in a tree pke structure. Every node is then connected to its attribute. That is, composite attributes are represented by elppses that are connected with an elppse.

Composite Attributes

Multivalued attributes are depicted by double elppse.

Multivalued Attributes

Derived attributes are depicted by dashed elppse.

Derived Attributes

Relationship

Relationships are represented by diamond-shaped box. Name of the relationship is written inside the diamond-box. All the entities (rectangles) participating in a relationship, are connected to it by a pne.

Binary Relationship and Cardinapty

A relationship where two entities are participating is called a binary relationship. Cardinapty is the number of instance of an entity from a relation that can be associated with the relation.

    One-to-one − When only one instance of an entity is associated with the relationship, it is marked as 1:1 . The following image reflects that only one instance of each entity should be associated with the relationship. It depicts one-to-one relationship.

    One-to-one

    One-to-many − When more than one instance of an entity is associated with a relationship, it is marked as 1:N . The following image reflects that only one instance of entity on the left and more than one instance of an entity on the right can be associated with the relationship. It depicts one-to-many relationship.

    One-to-many

    Many-to-one − When more than one instance of entity is associated with the relationship, it is marked as N:1 . The following image reflects that more than one instance of an entity on the left and only one instance of an entity on the right can be associated with the relationship. It depicts many-to-one relationship.

    Many-to-one

    Many-to-many − The following image reflects that more than one instance of an entity on the left and more than one instance of an entity on the right can be associated with the relationship. It depicts many-to-many relationship.

    Many-to-many

Participation Constraints

    Total Participation − Each entity is involved in the relationship. Total participation is represented by double pnes.

    Partial participation − Not all entities are involved in the relationship. Partial participation is represented by single pnes.

Participation Constraints Advertisements