The entity-relationship (E-R) diagram is a diagram that helps visualize relational data models and shows relationships between relation (ie the entities)
ER modeling technique was first developed by Peter Chen in 1976 and described in two papers
A lot of graphical variation has been developed but they resolve all around the same entity-relationship concept..
The building blocks of the ERD in a relational model are:
Chen definition:
With the growth of the machine power, this point of view is now not always true
Typically, E-R schemas have many tables, sometimes hundreds or even thousands. There are many tables because the data has been carefully taken apart—normalized, in database terminology—with the primary goal of:
E-R models are very efficient for OLTP databases. When E-R databases are queried, joins are usually predetermined and can be optimized. E-R databases are usually queried by applications that know exactly where to go and what to ask. These applications typically query small units of information at a time, such as a customer record, an order, or a shipment record.
E-R schemas generally do not work well for queries that perform historical analysis due to two major problems—poor performance and difficulty in posing the question in SQL:
Alternative Notations
This sections shows the different Entity-Relationship graphical variations in terms of cardinality
FYI:
Mermaid offers a simple markup syntax to create ERD that you can create with their live editor or embed in your web application
Example:
erDiagram
CUSTOMER ||--o{ ORDER : places
ORDER ||--|{ LINE-ITEM : contains
CUSTOMER }|..|{ DELIVERY-ADDRESS : uses