An ER model (entity-relationship model) in DBMS uses a diagram called an Entity Relationship Diagram to illustrate the structure of a database.
In this article, we will dive deeper into the ER Diagram in DBMS according to the GATE Syllabus for (Computer Science Engineering) CSE. Keep reading ahead to learn more.
Table of Contents
- What is an ER Diagram in DBMS?
- Entity
- Attributes
- Relationship
- Pros and Cons of ER Diagram
- Frequently Asked Questions on ER Diagram in DBMS
What is an ER Diagram in DBMS?
An ER diagram is used to represent the ER Model in DBMS. An ER diagram can be used to represent an item, such as entities, relationship sets, attributes of entities, and attributes of relationship sets.
Entity
Rectangles are used to represent entities. The rectangles are provided with names that correspond to the entity set they represent.
Attributes
Entity properties are known as attributes. Ellipses are used to symbolise attributes. Each ellipse represents a single attribute and is linked to its corresponding entity or rectangle.
In case the attributes are composite, then these are separated further into a tree-like structure. The attribute of each node is then attached to it. To put it another way, composite attributes are basically represented by ellipses joined by an ellipse.
A double ellipse is used to represent multivalued attributes.
Dashed ellipses represent derived attributes.
Relationship
Diamond-shaped boxes signify relationships. Inside the diamond box is written the name of the relationship. A line connects all the entities or rectangles that are involved in a relationship.
For example, Tiffany works in the Biology department. It would be represented as follows:
Cardinality and Binary Relationship
The term “binary relationship” refers to a relationship in which two entities are involved. The number of instances of an entity from any relationship that can be connected or associated with the relation is known as cardinality.
Here are the relationships found in DBMS:
1. One-to-one – The relationship is denoted as ‘1:1’ when just one instance of the given entity is associated with it. Only one of the instances of each entity must be connected with the relationship, as seen in the image below. It is a representation of a one-to-one relationship. Click here to read more on one-to-one relationships in DBMS.
2. One-to-many – The relationship is denoted as ‘1:N’ when more than one of the instances of an entity is linked with it. The following graphic shows that the relationship can be associated with only one instance of the entity on the left and several instances of the entity on the right. It is a representation of a one-to-many relationship. Click here to read more on one-to-many relationships in DBMS.
3. Many-to-one – The relationship is denoted as ‘N:1’ when more than one of the instances of the entity is associated with it. The following figure shows that the relationship can be associated with more than one instance of the entity on the left and just one instance of an entity on the right. It represents a one-to-many relationship. Click here to read more on many-to-one relationships in DBMS.
4. Many-to-many – More than one of the instances of an entity on the right and more than one of the instances of an entity on the left can be associated with the relationship, as seen in the following image. It is a representation of a many-to-many relationship. Click here to read more on many-to-many relationships in DBMS.
Participation Constraints
1. Partial Participation – The relationship does not involve all entities. Single lines are used to denote partial participation.
2. Total Participation – The relationship involves each entity. Double lines reflect the total number of participants.
Pros and Cons of ER Diagram
Pros
- Simplicity in concept: An ERD can be easily drawn if the relationships between attributes and entities are understood.
- The visual representation that is explicit: After reviewing the diagram, the database structure may be simply understood.
- Effectiveness of communication: The standard symbols used for different types of data representation make it easier to understand how the database works after it’s completed.
- Extremely adaptable: With slight adjustments, the ER data model can be simply turned into any other data model.
Cons
- Relationship representation is limited: In comparison to other data models, the model has a limited number of relationships.
- There is no depiction of data modification: Because the methods for displaying data modification in ERD are somewhat complex, the model is only useful in limited situations.
- There isn’t an industry standard for notation: The notation standards differ depending on a developer’s preference, causing confusion while viewing the diagrams.
Frequently Asked Questions on ER Diagram in DBMS
What is the ER diagram in DBMS?
An entity-relationship model (ER model) uses a diagram called an Entity Relationship Diagram (ER Diagram) to illustrate the structure of a database. An ER model is a database architecture or blueprint that can be implemented as a database later.
What are the symbols used in the ER diagram?
The rectangle, oval, and diamond are the three primary symbols used to express relationships between elements, entities, and attributes in the Entity Relationship Diagram Symbols and Notations.
What are 3 components of the ER diagram?
Entities, relationships and attributes are the three major components of ER diagrams or ERDs.
Why is the ER diagram important?
Entity-relationship diagrams serve as a visual starting point for database architecture, as well as a tool for determining information system requirements in an organisation.
Keep learning and stay tuned to get the latest updates on the GATE Exam along with Eligibility Criteria, GATE Syllabus for CSE (Computer Science Engineering), GATE CSE Notes, GATE CSE Question Paper, and more.
Also Explore,
- Introduction to DBMS
- Data Models in DBMS
- Hierarchical Model in DBMS
- Network Model in DBMS
- Entity-Relationship Model in DBMS
- ER Diagram to Tables in DBMS
- Object-Oriented Data Model in DBMS
- Object-Relational Data Model in DBMS
- Flat Data Model in DBMS
- Semi-Structured Data Model in DBMS
- Associative Data Model in DBMS
- Context Data Model in DBMS
Comments