Entity Relationship Diagram (Data Modeling)

Entity Relationship Diagram (E-R diagram or ERD) describes types of a data domain and how they are interconnected. It is used to design data models, especially for database systems.

This diagram type provides 2 basic kinds of elements:

  • Entity - represents a data type or a database table
  • Relationship - connects entities, it expresses how they are related each other

An entity is specified by its attributes. It may also include its indexes. Except for a standard documentation, the entity may provide its description. An attribute is defined by these parameters:

  • Name
  • Primary key
  • Foreign key
  • Nullability - NULL or NOT NULL
  • Default Value
  • Type
  • Description
  • Auto Increment

A relationship shows which entity is associated with which. It also specifies cardinality (or multiplicity) of each end. These options are available:

  • One (1)
  • Zero to One (0..1)
  • Many (N)
  • Zero to Many (0..N)
  • One to Many (1..N)
ER Diagram Overview
ER Diagram Overview

Diagram Variations

You may set various styles for keys, cardinality and attribute layout to adjust the diagram style to fit your preferences.

The keys may be rendered as:

  • Plus, Hash (+#)
  • PK, FK
  • Icons

The cardinality may be represented as:

  • Crows Foot (visual style)
  • Min-Max (numeric style)

There are two available layouts for attributes:

  • Flow - the parts of attributes flow one by one
  • Columns - the parts of attributes are aligned to a table

New Comment

Comment