{"id":7007,"date":"2023-10-17T14:32:14","date_gmt":"2023-10-17T09:02:14","guid":{"rendered":"https:\/\/www.interviewbit.com\/blog\/?p=7007"},"modified":"2023-10-17T14:32:17","modified_gmt":"2023-10-17T09:02:17","slug":"er-model-in-dbms","status":"publish","type":"post","link":"https:\/\/www.interviewbit.com\/blog\/er-model-in-dbms\/","title":{"rendered":"ER Model in DBMS"},"content":{"rendered":"\n<div class=\"gutentoc tocactive nostyle\"><div class=\"gutentoc-toc-wrap\"><div class=\"gutentoc-toc-title-wrap\"><div class=\"gutentoc-toc-title\">Table Of Contents<\/div><div id=\"open\" class=\"toggletwo\">show<\/div><\/div><div id=\"toclist\"><div class=\"gutentoc-toc__list-wrap\"><ul class=\"gutentoc-toc__list\"><li><a href=\"#introduction\">Introduction<\/a><\/li><li><a href=\"#what-is-an-er-diagram\">What is an ER Diagram?<\/a><\/li><ul class=\"gutentoc-toc__list\"><li><a href=\"#entity\">Entity<\/a><\/li><li><a href=\"#attribute\">Attribute<\/a><\/li><li><a href=\"#relationship\">Relationship<\/a><\/li><\/ul><li><a href=\"#features-of-er-model\">Features of ER model<\/a><\/li><li><a href=\"#how-to-create-er-diagram-in-dbms\">How To Create ER diagram in DBMS<\/a><\/li><li><a href=\"#why-use-er-diagrams\">Why use ER Diagrams?<\/a><\/li><li><a href=\"#conclusion\">Conclusion<\/a><\/li><li><a href=\"#additional-resources\">Additional Resources<\/a><\/li><\/ul><\/div><\/div><\/div><\/div>\n\n\n\n<h2 id=\"introduction\">Introduction<\/h2>\n\n\n\n<p>ER Model stands for Entity-Relationship Model, also known as a high-level data model that shows the relationship among the entity sets.ER Model is used to define the entities and the relationships between them.<\/p>\n\n\n\n<p>It helps developers to design the conceptual design or you can say the logical design of the system from a data perspective.ER model describes the structure of a database with the help of a diagram, which is known as the Entity-Relationship Diagram (ER Diagram).<\/p>\n\n\n\n<h2 id=\"what-is-an-er-diagram\">What is an ER Diagram?<\/h2>\n\n\n\n<p>ER diagrams are used to sketch out the design of a database. By defining the entities, their attributes, and showing the relationships between them, an ER diagram illustrates the logical structure of databases.ER diagrams are created based on three basic concepts: entities, attributes, and relationships.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img  loading=\"lazy\"  width=\"1024\"  height=\"525\"  src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAAP+KeNJXAAAAAXRSTlMAQObYZgAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII=\"  alt=\"\"  class=\"wp-image-7010 pk-lazyload\"  data-pk-sizes=\"auto\"  data-ls-sizes=\"(max-width: 1024px) 100vw, 1024px\"  data-pk-src=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/ER-Diagram-1024x525.png\"  data-pk-srcset=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/ER-Diagram-1024x525.png 1024w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/ER-Diagram-300x154.png 300w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/ER-Diagram-768x394.png 768w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/ER-Diagram-1536x787.png 1536w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/ER-Diagram-2048x1050.png 2048w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/ER-Diagram-380x195.png 380w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/ER-Diagram-550x282.png 550w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/ER-Diagram-800x410.png 800w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/ER-Diagram-1160x594.png 1160w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/ER-Diagram.png 2724w\" ><\/figure>\n\n\n\n<p>As shown in the above diagram, an ER diagram has three main components:<\/p>\n\n\n\n<ul><li>Entity<\/li><li>Attribute<\/li><li>Relationship<\/li><\/ul>\n\n\n\n<h3 id=\"entity\">Entity<\/h3>\n\n\n\n<p>Any object that physically exists and is logically constructed in the real world is called as an <a href=\"https:\/\/www.scaler.com\/topics\/entity-in-dbms\/\" target=\"_blank\" rel=\"noreferrer noopener\">entity<\/a>. It is a real-world object that can be easily identifiable. An entity is represented as a rectangle in an ER diagram.<\/p>\n\n\n\n<p>Example- In an organization, employees, managers, and projects assigned can be considered entities. All these entities have some attributes or properties that give them their identity.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img  loading=\"lazy\"  width=\"1024\"  height=\"311\"  src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAAP+KeNJXAAAAAXRSTlMAQObYZgAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII=\"  alt=\"\"  class=\"wp-image-7011 pk-lazyload\"  data-pk-sizes=\"auto\"  data-ls-sizes=\"(max-width: 1024px) 100vw, 1024px\"  data-pk-src=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/ER-Entity-1024x311.png\"  data-pk-srcset=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/ER-Entity-1024x311.png 1024w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/ER-Entity-300x91.png 300w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/ER-Entity-768x233.png 768w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/ER-Entity-1536x467.png 1536w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/ER-Entity-2048x622.png 2048w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/ER-Entity-380x115.png 380w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/ER-Entity-550x167.png 550w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/ER-Entity-800x243.png 800w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/ER-Entity-1160x352.png 1160w\" ><\/figure>\n\n\n\n<p>Here, in the above example, employee and project are entities.<br>Entities are of two types:<\/p>\n\n\n\n<ul><li><strong>Strong Entity &#8211;<\/strong> Strong entities are those entity types that have a key attribute. The primary key helps in identifying each entity uniquely. this can not accept null values so it can not be a unique key. It is represented by a rectangle.<\/li><\/ul>\n\n\n\n<p><strong>Example<\/strong> &#8211; in an example of organization emp_id identifies each employee of the organization uniquely and hence, we can say that employee is a strong entity type.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img  loading=\"lazy\"  width=\"1024\"  height=\"776\"  src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAAP+KeNJXAAAAAXRSTlMAQObYZgAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII=\"  alt=\"\"  class=\"wp-image-7012 pk-lazyload\"  data-pk-sizes=\"auto\"  data-ls-sizes=\"(max-width: 1024px) 100vw, 1024px\"  data-pk-src=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Strong-Entity-1024x776.png\"  data-pk-srcset=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Strong-Entity-1024x776.png 1024w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Strong-Entity-300x227.png 300w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Strong-Entity-768x582.png 768w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Strong-Entity-1536x1163.png 1536w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Strong-Entity-2048x1551.png 2048w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Strong-Entity-380x288.png 380w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Strong-Entity-550x417.png 550w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Strong-Entity-800x606.png 800w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Strong-Entity-1160x879.png 1160w\" ><\/figure>\n\n\n\n<ul><li><strong>Weak Entity &#8211;<\/strong> Weak entity type doesn&#8217;t have a key attribute. Weak entity types can&#8217;t be identified on their own. It depends upon some other strong entity for its distinct identity. A weak entity is represented by a double outlined rectangle. The relationship between a weak entity type and strong entity type is shown with a double outlined diamond instead of a single outlined diamond. This representation can be seen in the example given below.<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image\"><img  alt=\"\"  class=\" pk-lazyload\"  src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAAP+KeNJXAAAAAXRSTlMAQObYZgAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII=\"  data-pk-sizes=\"auto\"  data-pk-src=\"\" ><\/figure>\n\n\n\n<p>Here we cannot identify the address uniquely as there can be many employees from the same locality. So, for this, we need an attribute of Strong Entity Type i.e \u2018employee\u2019 here to uniquely identify entities of &#8216;Address&#8217; Entity Type.<\/p>\n\n\n\n<h3 id=\"attribute\">Attribute<\/h3>\n\n\n\n<p>An <a href=\"https:\/\/www.scaler.com\/topics\/attributes-in-dbms\/\" target=\"_blank\" rel=\"noreferrer noopener\">attribute<\/a> is a property or characteristic of an entity. An entity may contain any number of attributes. The attributes that can uniquely define an entity are considered as the primary key. In an Entity-Relation model, attributes are represented in an elliptical shape. It also may refer to a database field. Attributes describe the instances in the database.<\/p>\n\n\n\n<p>A database consists of tables. Each table has columns and rows. The columns in a database are called attributes.<\/p>\n\n\n\n<p><strong>Example:<\/strong> Employee has attributes like name, age, roll,emp_id, and many more. To uniquely identify the employee, we use the primary key as an emp_id(employee id) as it is not repeated. Attributes can also be subdivided into another set of attributes.&nbsp;<\/p>\n\n\n\n<p><strong>There are five such types of attributes:<\/strong>&nbsp;<\/p>\n\n\n\n<ul><li>Simple attribute<\/li><li>Composite attribute<\/li><li>Single-valued attribute<\/li><li>Multi-valued attribute<\/li><li>Derived attribute.&nbsp;<\/li><\/ul>\n\n\n\n<p><strong>Note:- <\/strong>There is also one more attribute i.e; complex attribute. This is the rarely used attribute.&nbsp;<\/p>\n\n\n\n<ul><li><strong>Simple attribute<\/strong><strong>&#8211;<\/strong>Attributes that are not further divisible into sub-attributes (atomic) are known as Simple attributes.<\/li><\/ul>\n\n\n\n<p><strong>Example:<\/strong> The roll number of a student, the id number of an employee.&nbsp;<\/p>\n\n\n\n<p>It is also called a key attribute. It modeled in ER diagram as a simple eclipse with underlined attribute name.<\/p>\n\n\n\n<ul><li><strong>Composite attribute<\/strong><strong>&#8211; <\/strong>Composite attributes can be divided into sub-attributes which represent more basic attributes with independent meanings.<\/li><\/ul>\n\n\n\n<p><strong>Example<\/strong>: the Address attribute of the EMPLOYEE entity shown can be subdivided into Street_address, City, State, and Pincode.<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Composite attributes are useful to model situations in which a user sometimes refers to the composite attribute as a unit but at other times refers to its components.<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If the composite attribute is referenced only as a whole, there is no need to subdivide it into component attributes. For example, if there is no need to refer to the individual components of an address (Zip Code, street, and so on), then the whole address can be designated as a simple attribute.<\/p>\n\n\n\n<ul><li><strong>Single-valued attribute<\/strong><strong>&#8211; <\/strong>Attributes having single value for a particular entity instance is known as single-valued attribute.&nbsp;<\/li><\/ul>\n\n\n\n<p><strong>Example<\/strong>, the age of a person is single-valued.<\/p>\n\n\n\n<ul><li><strong>Multi-valued attribute<\/strong><strong>&#8211;<\/strong>There are many instances where an attribute has a set of values for a specific entity, known as Multivalued attributes.<\/li><\/ul>\n\n\n\n<p>Multivalued attributes are modeled in ER using a double circle.<\/p>\n\n\n\n<p><strong>Example<\/strong>: Phone number. A person may have zero, one or more phone numbers, and different employees may have different numbers of phones.<\/p>\n\n\n\n<ul><li><strong>Derived attribute<\/strong><strong>&#8211;<\/strong>The value for this type of attribute can be derived from the values of other related attributes or entities instances.<\/li><\/ul>\n\n\n\n<p><strong>&nbsp;Example:<\/strong> suppose that the employee entity set has an attribute age, which indicates the employee\u2019s age. If the employee entity set also has an attribute date-of-birth, we can calculate age from date-of-birth and the current date. Thus, age is a derived attribute.<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;However, the derived attribute needs to be computed every time it\u2019s required.<\/p>\n\n\n\n<ul><li><strong>Complex attribute<\/strong><strong>&#8211;<\/strong>Complex attributes are formed by nesting composite and multivalued attributes arbitrarily.These attributes are rarely used in DBMS(DataBase Management System). That\u2019s why they are not so popular.<\/li><\/ul>\n\n\n\n<p>These (multi-valued and composite attributes are called \u2018Components\u2019 of complex attributes) components are grouped between parentheses \u2018( )\u2019 and multi-valued attributes between curly braces \u2018{ }\u2019, Components are separated by commas \u2018, \u2018.<\/p>\n\n\n\n<p><strong>Example: <\/strong>&nbsp;let us consider an employee having multiple phone numbers, &nbsp; emails, and an address.<\/p>\n\n\n\n<p>Here, phone number and email are examples of multi-valued attributes and address is an example of the composite attribute, because it can be divided into house number, street, city, and state.<\/p>\n\n\n\n<p>empAdd_empPhone({email},{Phone},Address{Housenumber,city,state})<\/p>\n\n\n\n<p>Here ,empAdd_empPhone is a complex attribute.<\/p>\n\n\n\n<p><strong>Here is the figure is given below represents all the attributes in the ER diagram:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img  loading=\"lazy\"  width=\"1024\"  height=\"683\"  src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAAP+KeNJXAAAAAXRSTlMAQObYZgAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII=\"  alt=\"\"  class=\"wp-image-7015 pk-lazyload\"  data-pk-sizes=\"auto\"  data-ls-sizes=\"(max-width: 1024px) 100vw, 1024px\"  data-pk-src=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Attributes-of-an-entity-1024x683.png\"  data-pk-srcset=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Attributes-of-an-entity-1024x683.png 1024w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Attributes-of-an-entity-300x200.png 300w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Attributes-of-an-entity-768x512.png 768w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Attributes-of-an-entity-1536x1024.png 1536w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Attributes-of-an-entity-2048x1366.png 2048w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Attributes-of-an-entity-380x253.png 380w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Attributes-of-an-entity-550x367.png 550w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Attributes-of-an-entity-800x533.png 800w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Attributes-of-an-entity-1160x774.png 1160w\" ><\/figure>\n\n\n\n<h3 id=\"relationship\">Relationship<\/h3>\n\n\n\n<p>A relationship in a DBMS is primarily the way two or more data sets are linked. Relationships allow the datasets to share and store data in separate tables. They also help link disparate data with each other.<\/p>\n\n\n\n<p>A relationship, in the context of databases, is a situation that exists between two relational database tables when one table has a foreign key that references the primary key of the other table. Relationships allow relational databases to split and store data in different tables while linking disparate data items.<\/p>\n\n\n\n<p>Relationships are of three types and the next segment talks about the same.<\/p>\n\n\n\n<h4 id=\"types-of-relationships\">Types of relationships<\/h4>\n\n\n\n<ul><li>One to One<\/li><li>One to Many<\/li><li>Many to Many<\/li><\/ul>\n\n\n\n<p>Let us see what each one of them entails.<\/p>\n\n\n\n<p><strong>One to One &#8211;<\/strong> It is used to create a relationship between two tables in which a single row of the first table can only be related to one and only one record of a second table. This relationship tells us that a single record in Table A is related to a single record in Table B. And vice versa.<\/p>\n\n\n\n<p>Example &#8211; In a university, each department has only one head of the department. And one HOD can take only one department. This shows a one-to-one (1:1) relationship between the department and the person as a head.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img  loading=\"lazy\"  width=\"1024\"  height=\"203\"  src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAAP+KeNJXAAAAAXRSTlMAQObYZgAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII=\"  alt=\"\"  class=\"wp-image-7016 pk-lazyload\"  data-pk-sizes=\"auto\"  data-ls-sizes=\"(max-width: 1024px) 100vw, 1024px\"  data-pk-src=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/One-to-One-1024x203.png\"  data-pk-srcset=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/One-to-One-1024x203.png 1024w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/One-to-One-300x60.png 300w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/One-to-One-768x152.png 768w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/One-to-One-1536x305.png 1536w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/One-to-One-2048x407.png 2048w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/One-to-One-380x75.png 380w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/One-to-One-550x109.png 550w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/One-to-One-800x159.png 800w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/One-to-One-1160x230.png 1160w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/One-to-One.png 3828w\" ><\/figure>\n\n\n\n<p><strong>One to Many &#8211;<\/strong> It is used to create a relationship between two tables. Any single row of the first table can be related to one or more rows of the second table, but the rows of the second table can only relate to the only row in the first table. It is also known as a many-to-one relationship.<\/p>\n\n\n\n<p>Example: of a 1:M relationship is A department that has many employees, Each employee is assigned to one department.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img  loading=\"lazy\"  src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAAP+KeNJXAAAAAXRSTlMAQObYZgAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII=\"  alt=\"\"  class=\"wp-image-7017 pk-lazyload\"  width=\"397\"  height=\"480\"  data-pk-sizes=\"auto\"  data-ls-sizes=\"(max-width: 397px) 100vw, 397px\"  data-pk-src=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/One-to-Many-847x1024.png\"  data-pk-srcset=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/One-to-Many-847x1024.png 847w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/One-to-Many-248x300.png 248w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/One-to-Many-768x929.png 768w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/One-to-Many-1270x1536.png 1270w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/One-to-Many-380x460.png 380w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/One-to-Many-550x665.png 550w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/One-to-Many-800x967.png 800w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/One-to-Many-1160x1403.png 1160w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/One-to-Many.png 1548w\" ><\/figure><\/div>\n\n\n\n<p><strong>Many to Many &#8211;<\/strong> Many to many relationships that create a relationship between two tables. Each record of the first table can relate to any records (or no records) in the second table. Similarly, each record of the second table can also relate to more than one record of the first table. It also represented an N:N relationship.<\/p>\n\n\n\n<p>Example: there are many employees involved in each project, and every employee can involve in more than one project.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img  loading=\"lazy\"  width=\"1024\"  height=\"546\"  src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAAP+KeNJXAAAAAXRSTlMAQObYZgAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII=\"  alt=\"\"  class=\"wp-image-7018 pk-lazyload\"  data-pk-sizes=\"auto\"  data-ls-sizes=\"(max-width: 1024px) 100vw, 1024px\"  data-pk-src=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Many-to-Many-1024x546.png\"  data-pk-srcset=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Many-to-Many-1024x546.png 1024w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Many-to-Many-300x160.png 300w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Many-to-Many-768x409.png 768w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Many-to-Many-1536x818.png 1536w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Many-to-Many-2048x1091.png 2048w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Many-to-Many-380x202.png 380w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Many-to-Many-550x293.png 550w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Many-to-Many-800x426.png 800w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Many-to-Many-1160x618.png 1160w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Many-to-Many-1920x1024.png 1920w\" ><\/figure>\n\n\n\n<h2 id=\"features-of-er-model\">Features of ER model<\/h2>\n\n\n\n<p>The basic E-R concepts can model most database features, some aspects of a database may be more aptly expressed by certain extensions to the basic E-R model. The extended E-R features are specialization, generalization, higher- and lower-level entity sets, attribute inheritance, and aggregation.<\/p>\n\n\n\n<p><strong>Specialization<\/strong><strong> &#8211; <\/strong>An entity set broken down sub-entities that are distinct in some way from other entities in the set. For instance, a subset of entities within an entity set may have attributes that are not shared by all the entities in the entity set. The E-R model provides a means for representing these distinctive entity groupings.<\/p>\n\n\n\n<p>Specialization is an \u201caTop-down approach\u201d where a high-level entity is specialized into two or more level entities.<\/p>\n\n\n\n<p><strong>Example<\/strong> &#8211; Consider an entity set vehicle, with attributes color and no. of tires. A vehicle&nbsp; may be further classified as one of the following:<\/p>\n\n\n\n<ul><li>Car<\/li><li>Bike&nbsp;<\/li><li>Bus<\/li><\/ul>\n\n\n\n<p>Each of these vehicle types is described by a set of attributes that includes all the attributes of the entity set vehicle plus possibly additional attributes. For example, car entities may be described further by the attribute gear, whereas bike entities may be described further by the attributes automatic break. The process of designating subgroupings within an entity set is called specialization. The specialization of vehicles allows us to distinguish among vehicles according to whether they are cars, buses, or bikes.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img  loading=\"lazy\"  width=\"1024\"  height=\"571\"  src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAAP+KeNJXAAAAAXRSTlMAQObYZgAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII=\"  alt=\"\"  class=\"wp-image-7020 pk-lazyload\"  data-pk-sizes=\"auto\"  data-ls-sizes=\"(max-width: 1024px) 100vw, 1024px\"  data-pk-src=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Specialization-1024x571.png\"  data-pk-srcset=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Specialization-1024x571.png 1024w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Specialization-300x167.png 300w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Specialization-768x428.png 768w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Specialization-1536x856.png 1536w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Specialization-2048x1142.png 2048w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Specialization-380x212.png 380w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Specialization-550x307.png 550w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Specialization-800x446.png 800w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Specialization-1160x647.png 1160w\" ><\/figure>\n\n\n\n<p><strong>Generalization &#8211;<\/strong> It is a process of extracting common properties from a set of entities and creating a generalized entity from it. <a href=\"https:\/\/www.scaler.com\/topics\/generalization-in-dbms\/\" target=\"_blank\" rel=\"noreferrer noopener\">Generalization<\/a> is a \u201cBottom-up approach\u201d. In which two or more entities can be combined to form a higher-level entity if they have some attributes in common.<\/p>\n\n\n\n<p>In generalization, Subclasses are combined to make a superclass.<\/p>\n\n\n\n<p>Example: There are three entities given, car, bus, and bike. They all have some common attributes like all cars, buses, and bikes they all have no. of tires and have some colors. So they all can be grouped and make a superclass named a vehicle.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img  loading=\"lazy\"  width=\"1024\"  height=\"591\"  src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAAP+KeNJXAAAAAXRSTlMAQObYZgAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII=\"  alt=\"\"  class=\"wp-image-7021 pk-lazyload\"  data-pk-sizes=\"auto\"  data-ls-sizes=\"(max-width: 1024px) 100vw, 1024px\"  data-pk-src=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Generalization-1024x591.png\"  data-pk-srcset=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Generalization-1024x591.png 1024w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Generalization-300x173.png 300w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Generalization-768x443.png 768w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Generalization-1536x886.png 1536w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Generalization-2048x1181.png 2048w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Generalization-380x219.png 380w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Generalization-550x317.png 550w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Generalization-800x461.png 800w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Generalization-1160x669.png 1160w\" ><\/figure>\n\n\n\n<p><strong>Inheritance &#8211;<\/strong> An entity that is a member of a subclass inherits all the attributes of the entity as the member of the superclass, the entity also inherits all the relationships that the superclass participates in. Inheritance is an important feature of Generalization and Specialization. It allows lower-level entities to inherit the attributes of higher-level entities.<\/p>\n\n\n\n<p>Example &#8211; Car, bikes, and buses inherit the attributes of a vehicle. Thus, a car is described by its color and no. of tires, and additionally a gear attribute; a bike is described by its color and no. of tires attributes, and additionally automatic break attribute.<\/p>\n\n\n\n<p><strong>Aggregation &#8211;<\/strong> In aggregation, the relation between two entities is treated as a single entity. In aggregation, the relationship with its corresponding entities is aggregated into a higher-level entity.<\/p>\n\n\n\n<p>Example- phone numbers on your mobile phone. You can refer to them individually &#8211; your mother&#8217;s number, your best friend&#8217;s number, etc. But it&#8217;s easier to think of them collectively, as your phone number list. It is also important to realize that each member of the aggregation still has the properties of the whole. In other words, each phone number in the list remains a phone number. The process of combining them has not altered them in any way.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img  loading=\"lazy\"  width=\"1024\"  height=\"617\"  src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAAP+KeNJXAAAAAXRSTlMAQObYZgAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII=\"  alt=\"\"  class=\"wp-image-7022 pk-lazyload\"  data-pk-sizes=\"auto\"  data-ls-sizes=\"(max-width: 1024px) 100vw, 1024px\"  data-pk-src=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Aggregation-1024x617.png\"  data-pk-srcset=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Aggregation-1024x617.png 1024w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Aggregation-300x181.png 300w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Aggregation-768x463.png 768w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Aggregation-1536x925.png 1536w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Aggregation-2048x1234.png 2048w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Aggregation-380x229.png 380w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Aggregation-550x331.png 550w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Aggregation-800x482.png 800w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Aggregation-1160x699.png 1160w\" ><\/figure>\n\n\n\n<h2 id=\"how-to-create-er-diagram-in-dbms\">How To Create ER diagram in DBMS<\/h2>\n\n\n\n<p>Following are the steps to create an ER Diagram<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img  loading=\"lazy\"  src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAAP+KeNJXAAAAAXRSTlMAQObYZgAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII=\"  alt=\"\"  class=\"wp-image-7023 pk-lazyload\"  width=\"305\"  height=\"598\"  data-pk-sizes=\"auto\"  data-ls-sizes=\"(max-width: 305px) 100vw, 305px\"  data-pk-src=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Steps-to-create-an-ER-Diagram-522x1024.png\"  data-pk-srcset=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Steps-to-create-an-ER-Diagram-522x1024.png 522w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Steps-to-create-an-ER-Diagram-153x300.png 153w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Steps-to-create-an-ER-Diagram-768x1506.png 768w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Steps-to-create-an-ER-Diagram-783x1536.png 783w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Steps-to-create-an-ER-Diagram-1044x2048.png 1044w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Steps-to-create-an-ER-Diagram-380x745.png 380w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Steps-to-create-an-ER-Diagram-550x1079.png 550w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Steps-to-create-an-ER-Diagram-800x1569.png 800w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Steps-to-create-an-ER-Diagram-1160x2275.png 1160w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Steps-to-create-an-ER-Diagram.png 1548w\" ><\/figure><\/div>\n\n\n\n<p>Let\u2019s study them with an Entity Relationship Diagram Example:<\/p>\n\n\n\n<p>In an Organization, an employee is assigned to projects. An employee must be assigned to at least one or more projects. Each project is managed by a single manager. To maintain instruction quality, a manager can control only one project.<\/p>\n\n\n\n<p><strong>Step 1) Entity Identification:<\/strong> We have three entities<\/p>\n\n\n\n<ul><li>Employee<\/li><li>Project<\/li><li>Manager<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img  loading=\"lazy\"  width=\"1024\"  height=\"244\"  src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAAP+KeNJXAAAAAXRSTlMAQObYZgAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII=\"  alt=\"\"  class=\"wp-image-7025 pk-lazyload\"  data-pk-sizes=\"auto\"  data-ls-sizes=\"(max-width: 1024px) 100vw, 1024px\"  data-pk-src=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Entity-Identification-1024x244.png\"  data-pk-srcset=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Entity-Identification-1024x244.png 1024w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Entity-Identification-300x71.png 300w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Entity-Identification-768x183.png 768w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Entity-Identification-1536x366.png 1536w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Entity-Identification-2048x488.png 2048w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Entity-Identification-380x91.png 380w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Entity-Identification-550x131.png 550w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Entity-Identification-800x191.png 800w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Entity-Identification-1160x276.png 1160w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Entity-Identification.png 2652w\" ><\/figure>\n\n\n\n<p><strong>Step 2) Relationship Identification:<\/strong> We have the following two relationships<\/p>\n\n\n\n<ul><li>The employee is assigned a project<\/li><li>manager control a project<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img  loading=\"lazy\"  width=\"1024\"  height=\"200\"  src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAAP+KeNJXAAAAAXRSTlMAQObYZgAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII=\"  alt=\"\"  class=\"wp-image-7026 pk-lazyload\"  data-pk-sizes=\"auto\"  data-ls-sizes=\"(max-width: 1024px) 100vw, 1024px\"  data-pk-src=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Relationship-Identification-1024x200.png\"  data-pk-srcset=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Relationship-Identification-1024x200.png 1024w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Relationship-Identification-300x59.png 300w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Relationship-Identification-768x150.png 768w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Relationship-Identification-1536x300.png 1536w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Relationship-Identification-2048x400.png 2048w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Relationship-Identification-380x74.png 380w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Relationship-Identification-550x107.png 550w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Relationship-Identification-800x156.png 800w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Relationship-Identification-1160x227.png 1160w\" ><\/figure>\n\n\n\n<p><strong>Step 3) Cardinality Identification:<\/strong> For them problem statement we know that,<\/p>\n\n\n\n<ul><li>An employee can be assigned multiple projects<\/li><li>A manager can manage only one course<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img  loading=\"lazy\"  width=\"1024\"  height=\"186\"  src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAAP+KeNJXAAAAAXRSTlMAQObYZgAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII=\"  alt=\"\"  class=\"wp-image-7027 pk-lazyload\"  data-pk-sizes=\"auto\"  data-ls-sizes=\"(max-width: 1024px) 100vw, 1024px\"  data-pk-src=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Cardinality-Identification-1024x186.png\"  data-pk-srcset=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Cardinality-Identification-1024x186.png 1024w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Cardinality-Identification-300x54.png 300w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Cardinality-Identification-768x139.png 768w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Cardinality-Identification-1536x279.png 1536w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Cardinality-Identification-2048x372.png 2048w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Cardinality-Identification-380x69.png 380w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Cardinality-Identification-550x100.png 550w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Cardinality-Identification-800x145.png 800w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/Cardinality-Identification-1160x211.png 1160w\" ><\/figure>\n\n\n\n<p><strong>Step 4) Identify Attributes<\/strong> &#8211; Initially, it\u2019s important to identify the attributes without mapping them to a particular entity. Once you have a list of Attributes, you need to map them to the identified entities. Ensure an attribute is to be paired with exactly one entity. If you think an attribute should belong to more than one entity, use a modifier to make it unique.<\/p>\n\n\n\n<p>Once the mapping is done, identify the primary Keys. If a unique key is not readily available, create one.<\/p>\n\n\n\n<figure class=\"wp-block-table is-style-stripes\"><table><thead><tr><th>Entity<\/th><th>Primary Key<\/th><th>Attribute<\/th><\/tr><\/thead><tbody><tr><td>Employee<\/td><td>Employee_ID<\/td><td>EmployeeName<\/td><\/tr><tr><td>Manager<\/td><td>Manager_ID<\/td><td>ManagerName<\/td><\/tr><tr><td>Project<\/td><td>Project_ID<\/td><td>ProjectName<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>For the sake of ease, we have considered just one attribute.<\/p>\n\n\n\n<p id=\"-step-5-create-the-erd-diagram-\"><strong>Step 5) Create the ERD Diagram<\/strong> &#8211; A more modern representation of Entity Relationship Diagram Example<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img  loading=\"lazy\"  width=\"1024\"  height=\"451\"  src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAAA1BMVEUAAP+KeNJXAAAAAXRSTlMAQObYZgAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII=\"  alt=\"\"  class=\"wp-image-7028 pk-lazyload\"  data-pk-sizes=\"auto\"  data-ls-sizes=\"(max-width: 1024px) 100vw, 1024px\"  data-pk-src=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/ERD-Diagram-1024x451.png\"  data-pk-srcset=\"https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/ERD-Diagram-1024x451.png 1024w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/ERD-Diagram-300x132.png 300w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/ERD-Diagram-768x338.png 768w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/ERD-Diagram-1536x677.png 1536w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/ERD-Diagram-2048x902.png 2048w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/ERD-Diagram-380x167.png 380w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/ERD-Diagram-550x242.png 550w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/ERD-Diagram-800x352.png 800w, https:\/\/www.interviewbit.com\/blog\/wp-content\/uploads\/2022\/02\/ERD-Diagram-1160x511.png 1160w\" ><\/figure>\n\n\n\n<h2 id=\"why-use-er-diagrams\">Why use ER Diagrams?<\/h2>\n\n\n\n<p>Here, are prime reasons for using the ER Diagram<\/p>\n\n\n\n<ul><li>It helps you to define terms related to entity relationship modeling.<\/li><li>It provides a preview of how all your tables should connect, what fields are going to be on each table<\/li><li>It helps to describe entities, attributes, relationships.<\/li><li>ER diagrams are translatable into relational tables which allows you to build databases quickly.<\/li><li>ER diagrams can be used by database designers as a blueprint for implementing data in specific software applications.<\/li><\/ul>\n\n\n\n<h2 id=\"conclusion\">Conclusion<\/h2>\n\n\n\n<p>ER diagram in DBMS is widely used to describe the conceptual design of databases. It helps both users and database developers to preview the structure of the database. With the help of an ER diagram, we can create the required database and perform queries. For Example in the case of the airline reservation system, we can make queries like to find the scheduled time of a flight, the number of booked seats in a flight, flight fares, etc. We can convert the ER design into a relational design or you can say table format.<\/p>\n\n\n\n<h2 id=\"additional-resources\">Additional Resources<\/h2>\n\n\n\n<ul><li><a rel=\"noreferrer noopener\" href=\"https:\/\/www.interviewbit.com\/dbms-interview-questions\/\" target=\"_blank\">DBMS Interview Questions and Answers<\/a><\/li><li><a rel=\"noreferrer noopener\" href=\"https:\/\/www.interviewbit.com\/technical-interview-questions\/\" target=\"_blank\">Interview Preparation Guide<\/a><\/li><li><a href=\"https:\/\/www.interviewbit.com\/blog\/dbms-architecture\/\" target=\"_blank\" rel=\"noreferrer noopener\">Three-level architecture of DBMS<\/a><\/li><\/ul>\n","protected":false},"excerpt":{"rendered":"Introduction ER Model stands for Entity-Relationship Model, also known as a high-level data model that shows the relationship&hellip;\n","protected":false},"author":5,"featured_media":7009,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_daextam_enable_autolinks":"1","csco_singular_sidebar":"","csco_page_header_type":"","csco_appearance_grid":"","csco_page_load_nextpost":"","csco_post_video_location":[],"csco_post_video_location_hash":"","csco_post_video_url":"","csco_post_video_bg_start_time":0,"csco_post_video_bg_end_time":0},"categories":[974],"tags":[109,1120],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.interviewbit.com\/blog\/wp-json\/wp\/v2\/posts\/7007"}],"collection":[{"href":"https:\/\/www.interviewbit.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.interviewbit.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.interviewbit.com\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.interviewbit.com\/blog\/wp-json\/wp\/v2\/comments?post=7007"}],"version-history":[{"count":6,"href":"https:\/\/www.interviewbit.com\/blog\/wp-json\/wp\/v2\/posts\/7007\/revisions"}],"predecessor-version":[{"id":25452,"href":"https:\/\/www.interviewbit.com\/blog\/wp-json\/wp\/v2\/posts\/7007\/revisions\/25452"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.interviewbit.com\/blog\/wp-json\/wp\/v2\/media\/7009"}],"wp:attachment":[{"href":"https:\/\/www.interviewbit.com\/blog\/wp-json\/wp\/v2\/media?parent=7007"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.interviewbit.com\/blog\/wp-json\/wp\/v2\/categories?post=7007"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.interviewbit.com\/blog\/wp-json\/wp\/v2\/tags?post=7007"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}