An entity relationship diagram (ERD) or entity relationship model, is a visual representation of people, items and events in an information technology (IT) system.
The ERD uses data modeling techniques to describe business processes and act as the basis for a relational database.
What is ERDs used for ?
Entity relationship diagrams are used to understand the requirements that would be used to design the enterprise relationship database.
How do you create an ERD ?
ERDs usually include one of the following models :
- Conceptual data model : This model is used to define business concepts and rules. It provides an overview of the scope of the project and how the data sets are related.
- Logical data model: this is used to describe how the system should be implemented. It is used to create a map of rules and data structures., which show specific attributes and the relationships among various data points.
- Physical data model: this is a model of the logical data model. A physical data model is based on a logical data model so it is usually created after the logical data model is designed.
There are five basic components of an entity relationship diagram and they are :
- Entities: these are objects that can be used to store data. Examples include tables in a database.
- Attributes: these are characteristics of entities. Examples of attributes include primary keys which are used to identify a unique characteristics of records in a table.
- Relationships : these are the connections between entities.
- Actions: this is how information is shared in the database.
- Connectors : these are used to represent the connections between various entities.
For example, an ERD used to represent the information system for an auto company’s purchasing department would start with representations of entities such as the purchasing representative’s employee ID, the vendor ID, the vendor’s address, the purchase order header and lines and the parts ID.
Then lines would drawn to show the relationship between the entities, and text can be used to label these relationships.
What are Cardinalities ?
Cardinalities are used to represent the relationships between entities. For example, a purchasing assistant could have no vendors that they are working with or they could have many vendors that they are working with.
There are three types of cardinalities and they are :
- A one-to-one relationship (1:1) : For example, if each vendor in a database has only one mailing address.
- A one-to-many relationship (1:M): For example, a single vendor might sell multiple auto parts. The vendor is connected to multiple entities, but all those entities have a single connection back to the same vendor.
- A many-to-many relationship (M:N). For example, at the auto company where the purchasing assistants works with multiple vendors and multiple vendors might also be work to multiple purchasing assistants.
ERD models can be drawn with a pen and paper or drawn using specialized software’s such as Lucid chart, Smartdraw and Edraw Max.