⛓ Entity Relationship modelling (ERD)
A type of diagram that lets you see how different entities (e.g. people, customers, or other objects) relate to each other in an application or a database.
It's used to represent the data given scenario. Entity relationship models have 3 components:
-
Entities
-
Attributes
-
Relationships
Entity
An entity is something on the real world that can be represented in the system. These could be: Books, People, A bag
Each entity is represented by a rectangular box with its name written inside it.
The information held on an entity is the set of characteristics that define the entity. These are known as attributes
The degree of a relationship
1:1
One to One
This is when something is directly linking to something else.
Example
1:M
One to Many
When something is linking to multiple other things
Example
M:M
Many to Many
This is where many things link with many things