Entity-Relationship Model
In this tutorial, we will learn about relational database design using the most common entity-relationship model. An Entity-relationship Model (in short, ER model) describes the structure of a database using a diagram known as an Entity Relationship Diagram(ER Diagram). An ER model is a design or blueprint for a database that can later be implemented.
This Model uses a top-down method to model a relational database. It starts with an overall black box view and then adds detail as the process is refined. The product of this modeling process is an Entity-Relationship Diagram (ERD).
Entities and Relationships
The main components of an E-R model are as follows:
- Entity set ( Entities )
- Relationship set. ( Relationships )
Entity Relationship Diagram
An ER diagram shows the relationship among entity sets. An entity set is a group of similar entities, and these entities can have attributes. In terms of DBMS, an entity is a table or attribute of a table in a database, so by showing the relationship among tables and their attributes, an ER diagram shows the complete logical structure of a database.
The outcome or product of the database modeling process is a diagram called an Entity-Relationship Diagram(ER Diagram, or in short, ERD ). The Entity-Relationship Diagram is a high-level graphical description of a data model. We can use this model diagram to assist in the database design.
There are multiple ERD types, and they are used at different stages of database modeling. Popular ER model notations are as follows:
- Chen Model
- Crow’s Foot Model
- UML Model
Crow’s foot notation is one of the most intuitive ER diagram styles.
Features of ER-Model
The main features of the model are as follows:
- The Entity-Relationship model is a high-level conceptual model.
- The model allows us to describe the data involved in the real world regarding objects and their relationships. It is widely used to develop an initial design of a database.
- The model describes data as a collection of entities, relationships, and attributes.
MySQL world database ER Diagram
In this example, we will use the MySQL world database. The database consists of three tables.
- Country
- City
- CountryLanguage
—
MySQL Tutorials
MySQL Tutorials on this website:
https://www.testingdocs.com/mysql-tutorials-for-beginners/