Entity Relationship Diagram

Download as pdf or txt
Download as pdf or txt
You are on page 1of 13

DATABASE TECHNOLOGIES

Ritu Sah
(2139442)
Department of Data Analytics
Christ University

ENTITY-RELATIONSHIP DIAGRAM
(ERD) IN DBMS
ABSTRACT database design in the 1970s. While serving
as an assistant professor at MIT’s Sloan
The contents of the paper highlight a scenario
School of Management, he published a
of a Shopping Mall to explain its processes
seminal paper in 1976 titled “The Entity-
using the Entity Relationship diagram. A step
Relationship Model: Toward a Unified View
by step method explaining all the necessary
of Data.”
components is implemented in order to
understand the mechanism involved in By the 1960s and 1970s, Charles Bachman
obtaining a standard Entity Relationship (above) and A.P.G. Brown were working with
Diagram. close predecessors of Chen’s approach.
Bachman developed a type of Data Structure
Diagram, named after him as the Bachman
 ENTITY RELATIONSHIP DIAGRAM Diagram. Brown published works on real-
world systems modeling. James Martin added
An Entity Relationship Diagram or an ER ERD refinements. The work of Chen,
Diagram is a type of flowchart that Bachman, Brown, Martin and others also
exemplifies how “entities” such as people,
contributed to the development of Unified
objects or concepts communicate to each
Modeling Language (UML), widely used in
other within a system. Also known as ERDs software design.
or ER Models, they use a defined set of
symbols such as rectangles, diamonds, ovals  USES OF ENTITY RELATIONSHIP
and connecting lines to depict the DIAGRAM
interconnectedness of entities, relationships
ER diagrams are widely used to model and
and their attributes.
design relational databases, in terms of logic
In other words, an ERD is a diagram that and business rules and in terms of the specific
displays the relationship of entity sets stored technology to be implemented.
in a database.

ER Diagrams are most often used to design


 Software engineering: ER diagram is
or debug relational databases in the fields of
often an initial step in determining
software engineering, business information
requirements for an information systems
systems, education and research.
project. It’s also later used to model a
 HISTORY OF ERD particular database or databases. A
relational database has an equivalent
Peter Chen, currently a faculty member at
relational table and can potentially be
Carnegie-Mellon University in Pittsburgh, is
expressed that way as needed.
credited with developing ER modeling for
 Database troubleshooting: ER diagrams  COMPONENTS OF ERD
are used to analyze existing databases to
ERD consists of three main components:
find and resolve problems in logic or
deployment. Drawing the diagram should  Entity
reveal where it’s going wrong.  Attributes
 Relationships
 Business information systems: The
diagrams are used to design or analyze
relational databases used in business ENTITY
processes. Any business process that uses An entity is a definable thing—such as a
fielded data involving entities, actions and person, object, concept or event—that can
interplay can potentially benefit from a have data stored about it. Entities can be
relational database. It can streamline thought of as nouns. Examples: a customer,
processes, uncover information more student, car or product.
easily and improve results.

ATTRIBUTES
 Business process re-engineering: ER
diagrams help in analyzing databases used An attribute is defined as a property or
in business process re-engineering and in characteristic of an entity.
modeling a new database setup.

 Education: Databases are today’s method RELATIONSHIP


of storing relational information for A relationship between entities can be defined
educational purposes and later retrieval, as how entities act upon each other or are
so ER Diagrams can be valuable in associated with each other. Relationships are
planning those data structures. parallel to verbs.

 Research: Since so much research


 SYMBOLS AND NOTATIONS IN ERD
focuses on structured data, ER diagrams
can play a key role in setting up useful ERD involves predefined shapes and
databases to analyze the data. illustrations that are universally accepted
depiction for its various components. Some of
which have been provided in the table below.
Entity Set Relationship

Relationship with Entity set in a relationship


weak entity

One to one Many to Many


relationship relationship

Many to one Primary Key


relationship

Role indicator Attributes

 CHOSEN SCENARIO
We have taken a simple case of functioning of a shopping mall in order to depict its
functionality with the help of an ER diagram.

 STEPS TO CONSTRUCT AN ENTITY RELATIONSHIP DIAGRAM

The following steps must be followed to obtain an ER-Diagram.

STEP 1: IDENTIFY THE ENTITIES IN THE SCENARIO.

Let us start by thinking up of few basic things in the scenario. A standard shopping mall
would consist of important things like customer, who will be attended to by an cashier. The
cashiers will in turn be managed by a store Manager. The store would be divided into
different subsections like grocery, bathroom essentials, décor, electrical appliances etc. Each
customer will have a bill to his name.
The entities listed in the above scenario are:

Customer Sections

Cashier Section
Assistant

Manager Bills

STEP 2: IDENTIFY THE ATTRIBUTES OF THE ENTITIES.

Attributes are the property or characteristic of any entity. For the entities listed above, the
attributes that can be thought of are:

ENTITY ATTRIBUTES DIAGRAM

 Customer Name,
Age,
Gender,
Customer Code
 Cashier Name,
Age,
Gender,
Cashier ID

 Manager Name,
Age,
Gender,
Manager ID

 Sections Type,
Section Code

 Section Name,
Assistant Age,
Gender,
Assistant ID

 Bills Bill Number,


Bill Total
STEP 3: IDENTIFY THE RELATIONSHIP BETWEEN THE ENTITIES.

 Customer
managed
by
Cashier

 Cashier
managed
by
Manager

 Section
managed
by
Section
assistant

 Bills
made by
cashier
 Customer
assisted
by
Section
assistant

 Section
assistant
managed
by
Manager

STEP 4: DEFINE THE PRIMARY KEY IN EACH ENTITY

The primary key is identified by the attribute that is underlined.

ENTITY PRIMARY KEY DIAGRAM

 Customer Customer Code


 Cashier Cashier ID

 Manager Manager ID

 Sections Section Code

 Section Assistant ID
Assistant
 Bills Bill Number

STEP 5: IDENTIFY WEAK ENTITIES

In this scenario, we have identified one weak entity, which is Section Assistant. Since the
Section Assistant depends on the Section of the mall they are assigned to, Section Assistant is
a weak entity.

WEAK ENTITY DIAGRAM

Section Assistant

STEP 6: IDENTIFY THE MAPPING CARDINALITY OF RELATIONSHIPS AND


PARTICIPATION TYPES

Cardinality is defined as the numerical attributes of the relationship between two entities or
entity sets. The three main cardinal relationships are

 one-to-one
 one-to-many
 Many-to-many.

The cardinality of the relationships has been given in the table below:
CARDINALITY DIAGRAM

Many cashiers
are managed by
one manager

Many assistants
are managed by
one manager

One cashier
handles many
customers

One section
consists of many
assistants

Each customer
has one bill on
his/her name
STEP 7: CONSTRUCT THE FINAL DIAGRAM
CONCLUSION REFERENCES

The ER-Diagram for the case of the https://www.guru99.com/er-diagram-


shopping mall has been obtained. The tutorial-dbms.html
diagram successfully depicts the
https://www.lucidchart.com/pages/er-
connections between the different entities
diagrams#section_0
that have been represented along with their
attributes. The steps is followed in a Books: Database System Concepts
sequential manner in order to obtain the
ER-Diagram: LUCID APP
diagram such that all components an
relations are attained to.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy