WBC Entity Relationship and data flow diagrams

493 views 38 slides Jan 15, 2024
Slide 1
Slide 1 of 38
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33
Slide 34
34
Slide 35
35
Slide 36
36
Slide 37
37
Slide 38
38

About This Presentation

Entity Relationship and data flow diagrams


Slide Content

SUBMITTED TO : DR. NEHA GULATI
SUBMITTED BY : BAVLEEN KAUR
ARSHIT SOOD
ENTITY RELATIONSHIP AND
DATA FLOW DIAGRAMS

04
ER MODEL
COMPONENTS OF
ER DIAGRAM
Table of Contents
02
03
DATA FLOW DIAGRAM
ELEMENTS OF DATA
FLOW DIAGRAM
01

What is an ER Model?

ER Model stands for Entity Relationship Model.

It is a high-level conceptual data model
diagram.

It helps to systematically analyze data
requirements to producea well-designed
database.

The ER Model represents real-world entities
and the relationships between them
.

An ERD visualizes the relationships
between entities like people, things, or
concepts in a database. An ERD will
also often visualize the attributes of
these entities.
EntityRelationshipDiagram(ERD)


ER diagrams can be used by database designers as a
blueprint for implementing data in specific software
applications.•
Provides a preview of how all your tables should connect,
what fields are going to be on each table.

Helps to describe entities, attributes, relationships. ER
diagrams allows you to build databases quickly
WhyEntityRelationship
Model?

Components of the ER Diagram

Multi-valued Attrribute

Simple attribute

Key attribute

Composite attribute

Derived attribute
ATTRIBUTES

UnaryRelationship

BinaryRelationship

TernaryRelationship

n-aryRelationship
RELATIONSHIP

Weak Entity

Strong Entity
ENTITY
SYMBOLS

ENTITY
Examples of Entity
Person : Employee, Student, Patient
Place : Store, Building
For Example : For example, in a
student study course, both the student
and the course are entities.
•A single unique object in the real
world that is being mastered.
Examples of an entity are a
single person, single product, or
single organization.
•The characteristics of entity is
that it must have an attribute,
and a unique key.

WEAK ENTITY
•An entity that makes reliance over another entity is called a weak entity.
•We showcase the weak entity as a double rectangle in ER Diagram.
•In the example below, school is a strong entity because it has a primary key
attribute -school number. Unlike school, the classroom is a weak entity
because it does not have any primary key.
•Strong-Weak entity set always has parent-child relationship.

ATTRIBUTE
•Anattributeexhibitsthe
propertiesofanentity.
•You can illustrate an
attribute with an oval shape
in an ER diagram.

TYPES OF ATTRIBUTES
An attribute that is composed of several
other attributes and an oval showcases
the composite attribute, and the
composite attribute oval is further
connected with other ovals.
Composite Attribute
Some attributes can possess over
one value
The double oval shape is used to
represent a multivalued attribute.
Multi-valued
Attribute
An attribute that is derived from
other attributes of the entity. The
dashed oval shape describes the
derived attribute
Derived Attribute
Key attribute uniquely identifies
an entity from an entity set.
Key Attribute

RELATIONSHIP
•Itisusedtodescribethe
relationbetweentwoormore
entities.Itisrepresentedbya
diamondshape.
•ForExample,studentsstudyin
collegeandemployeesworkin
adepartment.
Here works for is a relation between
two entities.

TYPES OF RELATIONSHIP
When a single element of an entity
is associated with more than one
element of other entity.
For e.g. A customer can place
many orders.
ONE-TO-MANY
When more than one element of an entity
is associated with one element of other
entity.
For e.g. A student have to opt for a single
course, but a course can have many
students.
MANY-TO-ONE
When more than one element of an
entity is associated with more than
one element of other entity.
For e.g. You can assign an employee
to many projects and a project can
have many employees.
MANY-TO-MANY
When a single element of an entity is
associated with single element of
other entity.
For e.g. A citizen of India can only
have one Aadhar card. (legally)
ONE-TO-ONE

Let’s Create a Simple ER Diagram
01
02
03
04
05
•Entity Identification
•Relationship Identification
•Cardinality Identification
•Attributes Identification
•Finalize ERD
To create any diagram, there are basically five steps

CASE:
In a university, a Student enrolls in various Courses. A student must be
assigned to at least one or more Courses. Each course is taught by a single
Professor. To maintain instruction quality, a Professor can deliver only one
course.

STEP-4 Identify Attributes
•We need to study the files, forms, reports, data currently maintained by the organization to identify
attributes.
•Once, we have a list of Attributes, we need to map them to the identified
entities.
•Once the mapping is done, we need to identify the primarykeys/unique keys.

STEP-5 Create the ERD Diagram (Relational
Schema Format)
•This type of ER diagram will show entities connected to each other without
relationship symbols.
•The attributes for any entity will be listed as part of a table inside each entity
shape instead of separate symbols. Some also call this type of ER diagram a
Relational Schema Diagram.

Practices for Developing Effective
ER Diagrams
•Eliminate any redundant entities or relationships.
•There may be various valid approaches to an ER diagram. You need to make
sure that the ER diagram supports all the data you need to store.
•You should assure that each entity only appears a single time in the ER
diagram. Name every relationship, entity, and attribute are represented on your
diagram.

DATA FLOW DIAGRAM

A graphical tool, useful for communicating with
users, managers, and other personnel.

Used to perform structured analysis to determine
logical requirements.

Useful for analyzing existing as well as proposed
systems.

Focus on the movement of data between external
entities and processes, and between processes and
data stores.

A relatively simple technique to learn and use.

Data flow diagram provides an overview of-

What data a system processes

What transformations are performed

What data are stored

What results are produced and where they flow
Graphical nature makes it a good communication tool
between-•
User and analyst •
Analyst and System designer
WhyData Flow Diagram?

SYMBOLS USED IN DFD

Elements of Data Flow Diagram
Sources/Sinks(External
Entity)
Processes
Data Stores Data Flows
•people or organizations that
send data into the system or
receive data from the
system.
•models what happens to
the data i.e. transforms
incoming data into
outgoing data.
•represents permanent
data that is used by
the system.
•models the actual flow
of the data between
the other elements.

EXTERNAL ENTITY
An external entity is a person, department, outside organization, or other information system that
provides data to the system or receives outputs from the system. External entities are components
outside of the boundaries of the information systems. They represent how the information system
interacts with the outside world.
•A rectangle represents an external entity
•They either supply data or receive data
•They do not process data
Notation
•A customer submitting an order and then receive a bill from the system
•A vendor issue an invoice
External Entity Example

PROCESSES
•A process receives input data and produces output with a different content or form. Processes can
be as simple as collecting input data and saving in the database, or it can be complex as
producing a report containing monthly sales of all retail stores in the northwest region.
•Every process has a name that identifies the function it performs.
•The name consists of a verb, followed by a singular noun.
•Example : Apply Payment, Calculate Commission, Verify Order
Notation
•A rounded rectangle represents a process
•Processes are given IDs for easy
referencing.
Process Example

DATA FLOW
A data-flow is a path for data to move from one part of the information system to
another. A data-flow may represent a single data element such the Customer ID or it can
represent a set of data element (or a data structure).
Example:
•Customer_info (Last Name, FirstName, SS#, Tel #, etc.)
•Order_info (Order Id, Item#, Order Date, Customer ID, etc.).
Notation
•Straight lines with incoming arrows are input
data flow
•Straight lines with outgoing arrows are output
data flows
Data flow Example:

Rule of Data Flow
One of the rule for developing DFD is that all flow must begin with and end at a
processing step. This is quite logical, because data can't transform on its own with being
process. By using the thumb rule, it is quite easily to identify the illegal data flows and
correct them in a DFD.
Wrong Right Description
An entity cannot provide data to
another entity without some
processing occurred.
Data cannot move directly from
an entity to a data story without
being processed.
Data cannot move directly from a
data store without being
processed.
Data cannot move directly from
one data store to another
without being processed.

DATA STORE
A data store or data repository is used in a data-flow diagram to represent a situation
when the system must retain data because one or more processes need to use the stored
data in a later time.
Notation
•Data can be written into the data store, which is
depicted by an outgoing arrow
•Data can be read from a data store, which is
depicted by an incoming arrow.
•Examples are: inventory, Accounts receivables,
Orders, and Daily Payments.
Data StoreExample:

Top-Down Decomposition Techniques
Top-down decomposition, also calledleveling, is a technique used to show more detail
in lower-level DFDs. Leveling is done by drawing a series of increasingly detailed
diagrams until the desired degree of detail is reached. As shown in the Figure, DFD
Leveling is first displaying the targeted system as a single process, and then showing
more detail until all processes are functional primitives.BALANCING DFD
When performing top-down decomposition to a DFD to lower level DFDs, the inputs
and outputs must be conserved between levels of DFDs. For example, level n & n+1
must have the same inputs and outputs.

DFD LEVELLING

Context-Level Diagram
A context diagram gives an overview and it is the highest level in a data flow diagram, containing only one
process representing the entire system. It should be split into major processes which give greater detail and each
major process may further split to give more detail.
•All external entities are shown on the context diagram as well as major data flow to and from them.
•The diagram does not contain any data storage.
•The single process in the context-level diagram, representing the entire system, can be exploded to include the
major processes of the system in the next level diagram, which is termed as diagram 0.

Level 1 DFD
Processes in diagram 0 (with a whole number) can be exploded further to represent details of the processing
activities. Example below shows the next level ((Diagram 1) of process explosion.

Level 2 DFD
If a process with a lot of data flow linking between a few external entities, we could first extract that particular
process and the associated external entities into a separate diagram similar to a context diagram, before you refine
the process into a separate level of DFD; and by this way you can ensure the consistency between them much easier.

Logical DFD Example -Grocery Store
The logical DFD illustrates the processes involved without going into detail about
the physical implementation of activities.

Physical DFD Example -Grocery Store
•The physical DFD shows that a bar code-the UPC PRICE code found on most grocery store
items is used
•In addition, the physical DFD mentions manual processes such as scanning, explains that a
temporary file is used to keep a subtotal of items
•The PAYMENT could be made by CASH, CHECK, or DEBIT CARD
•Finally, it refers to the receipt by its name, CASH REGISTER RECEIPT

Difference Between DFD and ERD
S.No.DFD ERD
1.It stands for Data Flow Diagram. It stands for Entity Relationship Diagram or Model.
2.
Main objective is to represent the processes
and data flow between them.
Main objective is to represent the data object or
entity and relationship between them.
3.
It explains the flow and process of data input,
data output, and storing data.
It explains and represent the relationship between
entities stored in a database.
4.
Symbols used in DFD are: rectangles (represent
the data entity), circles (represent the process),
arrows (represent the flow of data), ovals or
parallel lines (represent data storing).
Symbols used in ERD are: rectangles (represent the
entity), diamond boxes (represent relationship),
lines and standard notations (represent
cardinality).
5.
Rule followed by DFD is that at least one data
flow should be there entering into and leaving
the process or store.
Rule followed by ERD is that all entities must
represent the set of similar things.
6.It models the flow of data through a system.
It model entities like people, objects, places and
events for which data is stored in a system.

DFDDFDERDERD
TOOLS USED IN ERD and DFD

ReDataedo

DataGrip

SqlDBM

dbForge Studio

Visual Paradigm

Lucidchart

THANK
YOU
Tags