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.
In this article, we will dive deeper into the conversion of ER Diagrams to tables 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?
- How to Convert ER Diagrams to Tables in DBMS?
- Frequently Asked Questions on ER Diagram in DBMS
What is an ER Diagram in DBMS?
The entity relationship diagram or an ER diagram is a graphical depiction of the database’s entities and their relationships. To know more about ER diagram, click here.
Example
How to Convert ER Diagrams to Tables in DBMS?
To convert ER diagrams to tables in a database management system (DBMS), follow the methods outlined below:
Step 1
Converting strong entities
- Create a separate table with about the same name for each strong object.
- If there is a composite attribute that has to be included, it must be separated into simple attributes.
- At this point, ignore multivalued characteristics.
- For the table, press the P key.
Step 2
Converting weak entity
- Create a separate table with the very same name for each weak entity.
- Include all attributes in your list.
- The weak entity includes the P key of a strong entity as a foreign key.
- Declare the weak entity’s P key as a combination of foreign key as well as decimator attribute.
Step 3
Converting one-to-one relationship
- Modify either the A or B side of each one-to-one connection, say A and B, to add the P key of the opposite side as a foreign key.
- If A or B has 100% participation, then the table should be modified.
- Include attributes in the modified table if a relationship contains them.
Step 4
Converting one-to-many relationship
- Modify the M side of each one-to-many relation to include the P key of one of the sides as a foreign key.
- If your relationships have attributes, make sure to mention them as well.
Step 5
Converting many-to-many relationship
- Create a new table for each many-to-many relationship, using the P key from the M side and the N side as foreign keys.
- Declare P for the new table’s foreign key combination.
- If your relationships have properties, insert those in the new table as well.
Step 6
Converting multivalued attributes
- Create a separate table for each multivalued attribute and use the current table’s P key as a foreign key.
- P keys are created by combining a foreign key and a multivalued attribute.
Step 7
Converting n-ary relationship
- Create a separate table for each n-ary relationship and then include the P key of all the entities as a foreign key.
- Declare the P key as a combination of foreign keys.
Table
The following is the outcome of a successful conversion:
Emp no | Dept id | since |
Scheme : Works in ( Emp No , Dept id , since )
Frequently Asked Questions on ER Diagram in DBMS
What is an 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.
How is an ER diagram reduced to a table?
The notations in an ER diagram can be used to represent the database, and these notations can be reduced to a set of tables. Every entity set or relationship set in the database can be represented in tabular form.
What is the purpose of the ER diagram?
The relationship between the entities is depicted in an entity relationship diagram. It’s possible to think of it as the blueprint for your business architecture, as it provides a visual depiction of the relationships between various kinds of data (entities).
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 across 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 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