M. Com

Define ER diagram with an example. Why ER diagrams are used?

Define ER diagram with an example. Why ER diagrams are used?

Define ER diagram with an example. Why ER diagrams are used?

Define ER diagram with an example. Why ER diagrams are used?

Ans.

In software engineering, an entity-relationship model (ERM) is an abstract and conceptual representation of data. Entity relationship modeling is a database modeling method, used to produce a type of conceptual schema or semantic data model of a system, often a relational database, and its requirements in a top-down fashion. Diagrams created by this process are called entity-relationship diagrams, ER diagrams, or ERDS.

An Entity-Relationship (ER) diagram is a specialized graphic that illustrates the interrelationships between entities in a database. ER diagrams often use symbols to represent three different types of information. Boxes are commonly used to represent entities. Diamonds are normally used to represent relationships and ovals are used to represent attributes.

Also Known As: ER Diagram, E-R Diagram, entity-relationship model

Examples: Consider the example of a database that contains information on the residents of a city. The ER diagram shown in the image above contains two entities – people and cities. There is a single “Lives In” relationship. In our example, due to space constraints, there is only one attribute associated with each entity. People have names and cities have populations. In a real-world example, each one of these would likely have many different attributes.

Entity-Relationship (ER) model is a popular high-level conceptual data model. This model and its variations are frequently used for the conceptual design of database applications, and many database design tools employ its concepts. Although it has some mean of describing the physical database it is basically useful in the design of logical database model. This analysis is then used to organize data as a relation, normalizing relations and finally obtaining a relational database model.

The ER model describes data as entities, relationships, and attributes.

The basic object that the ER model represents is an entity, which is a “thing” in the real world with an independent existence. An entity may be an object with a physical existence-a particular person, car, house, or employee-or it may be an object with a conceptual existence-a company, a job, or a university course. Each entity has particular properties, called attributes that describe it. For example, an employee entity may be described by the employee’s name, age, address, salary, and job. A particular entity will have a value for each of its attributes. The attribute values that describe each entity become a major part of the data stored in the database. Relationships describe the mapping of one entity with another.

About the author

Salman Ahmad

Leave a Comment