Entity Relationship Diagram
Overview​
An Entity-Relationship (ER) model describes how different elements are connected within a specific area. A basic ER model has entity types that group related elements and shows the relationships between these entities.
People who work with ER models usually call entity types simply "entities." For example, the "CUSTOMER" entity type is often just called the "CUSTOMER" entity. Although technically an entity is an instance of an entity type, ER diagrams show these instances and how they relate to each other. This is why entities are always named using singular nouns.
Code​
---
title: Order example
---
erDiagram
CUSTOMER ||--o{ ORDER : places
ORDER ||--|{ LINE-ITEM : contains
CUSTOMER }|..|{ DELIVERY-ADDRESS : uses