Chapter 6. Data Modeling Data Flow Diagram
Chapter 6. Data Modeling Data Flow Diagram
Data Modeling
Data Flow Diagram
Prepared by:
Dr. Muhammad Iqbal Hossain
Assistant Professor,
Dept. of CSE, BRAC University
Models: Logical and Physical
Model – a pictorial representation of reality.
Just as a picture is worth a thousand words, most
models are pictorial representations of reality.
9-3
@ Dr. Muhammad Iqbal Hossain
External Agents
External agent – an outside person, unit, system, or
organization that interacts with a system. Also called
an external entity.
9-7
@ Dr. Muhammad Iqbal Hossain
@ Dr. Muhammad Iqbal Hossain 6-8
Simple Data Flow Diagram
9-9
@ Dr. Muhammad Iqbal Hossain
Common Process Errors on DFDs
9-11
@ Dr. Muhammad Iqbal Hossain
Data Flow Packet Concept
• Data that should travel together should be shown as
a single data flow, no matter how many physical
documents might be included.
9-12
@ Dr. Muhammad Iqbal Hossain
Data Flows to and from Data Stores
9-13
@ Dr. Muhammad Iqbal Hossain
Rules for Data Flows
• A data flow should
never go unnamed.
• In logical
modeling, data
flow names should
describe the data
flow without
describing the
implementation
• All data flows must
begin and/or end at
a process.
9-14
@ Dr. Muhammad Iqbal Hossain
Diverging and Converging
Data Flows
Diverging data flow – a data flow that splits into
multiple data flows.
• Indicates data that starts out naturally as one flow, but
is routed to different destinations.
• Also useful to indicate multiple copies of the same
output going to different destinations.
9-15
@ Dr. Muhammad Iqbal Hossain
Diverging and Converging
Data Flows
9-16
@ Dr. Muhammad Iqbal Hossain
Exercise: Order food
• Draw a Data Flow Diagram (DFD) for “Food Ordering System”
considering the following scenarios:
•
Customer place an Order. The Order Food process receives the Order,
forwards it to the Kitchen, store it in the Order data store, and store
the updated Inventory details in the Inventory data store. The process
also delivers a Bill to the Customer. Manager can receive Reports
through the Generate Reports process, which takes Inventory details
and Orders as input from the Inventory and Order data store
respectively. Manager can also initiate the Order Inventory process by
providing Inventory order. The process forwards the Inventory order to
the Supplier and stores the updated Inventory details in the Inventory
data store.
9-17
@ Dr. Muhammad Iqbal Hossain
@ Dr. Muhammad Iqbal Hossain 6-18
Payroll management system
9-23
@ Dr. Muhammad Iqbal Hossain
Decomposition Diagrams
Decomposition
diagram – a tool used to
depict the
decomposition of a
system. Also called
hierarchy chart.
9-24
@ Dr. Muhammad Iqbal Hossain
Level 0 Diagram
• Shows all the processes that comprise the overall system
• Shows how information moves from and to each process
• Adds data stores
9-25
@ Dr. Muhammad Iqbal Hossain
Level 1 Diagrams
• Shows all the processes that comprise
a single process on the level 0 diagram
• Shows how information moves from
and to each of these processes
• Shows in more detail the content of
higher level process
• Level 1 diagrams may not be needed
for all level 0 processes
9-26
@ Dr. Muhammad Iqbal Hossain
Level 2 Diagrams
• Shows all processes that comprise a
single process on the level 1 diagram
• Shows how information moves from
and to each of these processes
• Level 2 diagrams may not be needed
for all level 1 processes
• Correctly numbering each process
helps the user understand where the
process fits into the overall system
9-27
@ Dr. Muhammad Iqbal Hossain
Modern Structured Analysis
(More Commonly Practiced)
1. Draw context DFD to establish initial project scope.
2. Draw functional decomposition diagram to partition the
system into subsystems.
3. Create event-response or use-case list for the system to
define events for which the system must have a response.
4. Draw an event DFD (or event handler) for each event.
5. Merge event DFDs into a system diagram (or, for larger
systems, subsystem diagrams).
6. Draw detailed, primitive DFDs for the more complex event
handlers.
7. Document data flows and processes in data dictionary.
9-28
@ Dr. Muhammad Iqbal Hossain
Structured Analysis Diagram
Progression (1 of 3)
9-29
@ Dr. Muhammad Iqbal Hossain
Structured Analysis Diagram
Progression (2 of 3)
9-30
@ Dr. Muhammad Iqbal Hossain
Structured Analysis Diagram
Progression (3 of 3)
9-31
@ Dr. Muhammad Iqbal Hossain
Context Data Flow Diagram
9-34
@ Dr. Muhammad Iqbal Hossain
Manage Robot
i. Draw level 1 DFD where set up destination and estimate fare process is
decomposed into two sub process as get distance and calculate fare. Data of
distance will sent from get distance to calculate fare.
ii. Draw Level 2 DFD for get distance sub process. Decompose get distance in
two sub process as get route and calculate distance. Data of route will sent
from get route to calculate distance.