What is ER Modeling Learn with Example (1)

What is ER Modeling? Learn with Example

ER Modeling, which stands for Entity-Relationship Modeling, is a database (and software)-design technique that uses data modeling to illustrate information by representing real-world entities and the relationships between them in terms of conceptual data models. In this article, we will discuss the following concepts of ER Modeling:

  • What is ER Modeling?
  • What is ER Diagram?
  • ER Model Example
  • Why use ER Modeling (ERM)?
  • ER modeling vs Dimensional Modeling
  • ER Modeling Advantages

What is ER Modeling?

ER Model or Entity-Relationship Model is a Data Modeling technique. It is used to describe business data requirements in terms of entities, attributes, and relationships. It was first developed at IBM Research in the 1970s by Peter Chen. There are many ER modeling tools. The most popular one is probably ERwin, but there are also open-source ones like JFreeChart.

ER Modeling is a process in database design where the database is modeled in terms of entities, relationships between entities, and attributes of entities. The entity-relationship diagram or ER diagram is a graphical representation used in database design to model the entities, relationships, cardinality, and attributes of a database. There are a lot of ER Modeling techniques that we used to make a conceptual model.

Click Here to Read: DBMS Tutorial: Database Management System Notes

Why Use ER Modeling (ERM)?

The Enhanced Entity-Relationship Model is used to overcome the limitations of the entity-relationship model. It provides a more comprehensible way of representing the data being stored in the database.

The Enhanced Entity Relationship Model contains relationships between entities or between attributes of entities. The ER Model is an enhanced version of the entity-relationship model that allows relationships between entities or attributes to be represented. It also makes it possible to store data about unique occurrences of an entity rather than just unique entities.

What is ER Diagram?

The ER Diagram (entity relationship diagram ERD) is a tool for visualizing the various components of a database. The first step in the ERD process is to create an entity list, which describes what data will be stored in the system. An “entity” is any individual item of data about which information will be stored.

There are two main ER modeling diagrams: the Entity-Relationship diagram, and the Entity Relationship Diagram with Attributes. The Entity-Relationship diagram shows all entities within a system with their relationships. The entity-relationship diagram with attributes diagram includes additional information about each entity such as attributes, primary key, foreign keys, etc. In the ER model, there are three main entities: Entity, Relationship, and Cardinality.

  • Entity – Represent real world objects whose attributes are part of the database’s data domain.
  • Relationship – Represents the connection or associations between two entities or between an entity and itself. It defines how data is arranged in tables and how data can be related to other data.
  • Cardinality refers to the number of rows in a table. In a relational database, there are two types of cardinality: Cardinality in a single column, or column cardinality.
Components of a ER Diagram--ER Modeling
Components of an ER Diagram
Entity Relationship Diagram Symbols
Entity Relationship Diagram (ERD) Symbols and Notations
Entity Relationship Diagram (ERD) Symbols and Notations

ER Model Example

Following is the ER Model Example that describes how it works:

The ER diagram shows two entities, Student and College, and their relationship. Students and college have many to one relationships. A college may have a number of students but a student cannot study in different colleges at the same period. Student has Stu_Id, Stu_Name & Stu_Addr entity and College has Col_ID & Col_Name attributes. Given are the geometric shapes and their purpose in an Entity Relation Diagram.

ER Diagram example--ER Modeling
ER Diagram example
  • Rectangle: Describe Entity sets.
  • Ellipses: Attributes
  • Diamonds: Relationship Set
  • Lines: They connect Entity sets to Relationship Set and attributes to Entity Sets.
  • Double Ellipses: Represent Multivalued Attributes
  • Dashed Ellipses: Represent Derived Attributes
  • Double Rectangles: Represent Weak Entity Sets
  • Double Lines: Total number of participation of an entity in a relationship set

Why use ER Modeling (ERM)?

  • The Enhanced Entity-Relationship Model is used to overcome the limitations of the entity-relationship model. It provides a more comprehensible way of representing the data being stored in the database.
  • The Enhanced Entity Relationship Model contains relationships between entities or between attributes of entities. 
  • The ER Model is an enhanced version of the entity-relationship model that allows relationships between entities or attributes to be represented. 
  • It also makes it possible to store data about unique occurrences of an entity rather than just unique entities.

ER modeling vs Dimensional Modeling

  • ER modeling, also known as entity-relationship modeling, is a technique for analyzing and conceptualizing data. It is commonly used in software development, but has been applied to other domains including the description of hardware systems.
  • Dimensional modeling is a technique for designing, analyzing, and implementing information systems. It focuses on data and information that vary over time or space.
  • Dimensional modeling provides insights into the ways data are used. It helps you to analyze business processes and to design better information systems. It can also help you to identify redundant data and assess their effect on the structure of the information system.
  • The Dimensional database model is based on the following constructs: Dimensions, Facts, Measures.
  • In the ER model, there are three main entities: Entity, Relationship, and Cardinality.

ER Modeling Advantages

  • Shows the data from both logical and physical perspectives
  • Can be used to solve a variety of design problems, including analyzing existing databases
  • It captures the structural independence of entities and relations
  • It provides a view of data that is readily understood and related
  • It  has the advantage of visually conveying the nature of the information to be recorded
  • ER Mode can reduce or eliminate joining table problems associated with E-R models
  • ER Mode provides a uniform notation for designers to use across diverse modeling applications and databases

Summary

  • ER modeling is a way of representing a database. Most database management systems have an internal data structure called an Entity-Relationship model. Through R Modeling techniques we specify a database in a formal language called “ER language”.
  • The ER model consists of entities, relationships, attributes, and keys.
  • Entities are objects that exist in the real world, for example, person, place, thing, event.
  • Relationships connect entities together. There can be many relationships associated with an entity. Relationships can also be classified into various types such as One-to-one relationships, One-to-many relationships,s, etc.
  • Attributes are characteristics of entities and relationships. Each attribute has a type and a domain which indicates what values the attribute may contain.
  • Keys are used to uniquely identify each entity in a relationship or relationship type.
  • ER diagramming is the process of creating ER models by drawing diagrams using ER modeling tools.

Leave a Reply