04 Data Modeling Techniques
04 Data Modeling Techniques
CHAPTER 04
FLOW CHARTS Data Modeling Techniques
WHAT IS A FLOWCHART?
START
Display message
“How many
hours did you
work?”
Display Gross
Pay
END
Rounded
Display message
“How many
hours did you
work?”
a rectangle
Multiply Hours
by Pay Rate.
Each symbol represents a Rectangle Store result in
Gross Pay.
different type of
operation. Rounded
Display Gross
Pay
Rectangle
END
Terminal
Display message
“How many
hours did you
work?”
point
Read Pay Rate
Multiply Hours
by Pay Rate.
START Store result in
Gross Pay.
Display Gross
Pay
END Terminal
END
BASIC FLOWCHART SYMBOLS START
Display message
“How many
hours did you
work?”
Multiply Hours
by Pay Rate.
Display message Store result in
Gross Pay.
“How many
Read Hours
hours did you Display Gross
work?” Pay
END
BASIC FLOWCHART SYMBOLS
START
Display message
“How many
hours did you
work?”
variable assignment
Read Pay Rate
Multiply Hours
by Pay Rate.
Process Store result in
Multiply Hours Gross Pay.
by Pay Rate.
Store result in Display Gross
Pay
Gross Pay.
END
STEPPING THROUGH THE START
Output
FLOWCHART
Display message Operation
“How many
hours did you
work?”
Read Hours
How many
hours did
you work?
Display message
“How much do
you get paid per
hour?”
Multiply Hours
by Pay Rate.
Store result in
Variable Contents: Gross Pay.
FLOWCHART
Display message
“How many
hours did you
work?”
How many
Input Read Hours
hours did Operation
you work?
(User types Display message
40
40) “How much do
you get paid per
hour?”
Multiply Hours
by Pay Rate.
Store result in
Variable Contents: Gross Pay.
Hours: 40
Display Gross
Pay Rate: ? Pay
FLOWCHART
Display message
“How many
hours did you
work?”
Read Hours
How much
do you get
paid per
Display message
hour?
“How much do
Output you get paid per
Operation hour?”
Multiply Hours
by Pay Rate.
Store result in
Variable Contents: Gross Pay.
Hours: 40
Display Gross
Pay Rate: ? Pay
FLOWCHART
Display message
“How many
hours did you
work?”
Read Hours
How much
do you get
paid per
Display message
hour? 20
“How much do
you get paid per
hour?”
Hours: 40
Display Gross
Pay Rate: 20 Pay
FLOWCHART
Display message
“How many
hours did you
work?”
Read Hours
How much
do you get
paid per
Display message
hour?
“How much do
you get paid per
hour?”
Multiply Hours
Process: The by Pay Rate.
Store result in
Variable Contents: product of 40
times 20 is
Gross Pay.
Hours: 40 stored in
Gross Pay Display Gross
Pay Rate: 20 Pay
FLOWCHART
Display message
“How many
hours did you
work?”
Read Hours
Your gross
pay is 800
Display message
“How much do
you get paid per
hour?”
Multiply Hours
by Pay Rate.
Store result in
Variable Contents: Gross Pay.
Hours: 40
Output Display Gross
Pay Rate: 20 Operation Pay
❖ Sequence
❖ Decision
❖ Repetition
❖ Case
SEQUENCE STRUCTURE
NO YES
DECISION STRUCTURE
NO YES
x < y?
Process A Process B
DECISION STRUCTURE
NO YES if (x < y)
x < y? a = x * 2;
else
Calculate a Calculate a a = x + y;
as x plus y. as x times 2.
DECISION STRUCTURE
NO YES if (x < y)
x < y? a = x * 2;
Calculate a
as x times 2.
REPETITION STRUCTURE
YES
x < y? Process A
CONTROLLING A REPETITION STRUCTURE
YES
x < y? Display x Add 1 to x
A PRE-TEST REPETITION STRUCTURE
YES
x < y? Display x Add 1 to x
A POST-TEST REPETITION STRUCTURE
If years_employed = 2, If years_employed = 3,
bonus is set to 200 bonus is set to 400
If years_employed = 1, If years_employed is
CASE
bonus is set to 100 years_employed any other value, bonus
is set to 800
1 2 3 Other
A
CONNECTORS
END
A
ANSWER
What do each of the following symbols represent?
Decision
Terminal
Input/Output
Operation Connector
Process Module
CONTEXT DIAGRAMS CHAPTER 04
Data Modeling Techniques
(DFD 0)
WHAT ARE CONTEXT DIAGRAMS?
❖ A context diagram outlines how external entities
interact with an internal software system.
sensor #
sensor #, type,
look-up location, age
sensor
report required data
type,
location, age
sensor number
sensor data
38
DATA FLOW
Data flows through a system, beginning
as input and transformed into output.
Data Flow
base
compute
triangle area
height area
39