Process and Data Modeling
Process and Data Modeling
PROCESS AND
DATA MODELLING
A N A L I S I S DA N P E R A N CA N GA N S I S T E M I N F O R M A S I
CSIM603183
Learning Objectives
1. Able to explain the concept of process and data modelling
2. Able to explain the rules for creating data flow diagram (DFD)
3. Able to create data flow diagram (DFD)
4. Able to explain the rules for creating entity relationship diagram
(ERD)
5. Able to create entity relationship diagram (ERD)
Outline
1. Data flow diagrams concept
2. Creating data flow diagrams
3. ERD concept
4. Creating data flow diagrams
1.1
D ATA F LO W
DIAGRAMS
Introduction
• Process model
A formal way of representing how a business system operates
Illustrates the activities or processes that are performed and how
data moves among them
Both for as-is and to-be systems
Part of structured systems analysis and design techniques
• Data flow diagramming
a technique that diagrams the business processes and the data
that pass among them.
Introduction
• Logical process models describe processes without
suggesting how they are conducted Analysis phase
• Physical process models provide information that is
needed to build the system Design phase
Creating DFD
• Use-cases (requirement definition and use-case
description) is the main and fundamental reference in
creating DFD.
• Because most business processes are too complex to be
explained in one DFD, process models are therefore
composed of a set of DFDs.
Creating DFD
• The first DFD provides a summary of the overall system,
with additional DFDs providing more and more detail
about each part of the overall business process.
• Thus, one important principle in process modeling with
DFDs is the decomposition of the business process into
a hierarchy of DFDs, with each level down the hierarchy
representing less scope but more detail.
Relationship among
Levels of DFDs
Reading DFD’s
Elements of Data Flow Diagrams
Elements of Data Flow Diagrams
• Process
– An activity or function performed for a specific business reason
– Manual or computerized
– Every process should be named starting with a verb and ending
with a noun (e.g., “Get Patient Information”).
– Short, but clear (contains enough information).
– Generally, performs only one activity. Avoid using the word “and”
in process names.
– Every process must have at least one input data flow and at least
one output data flow.
Elements of Data Flow Diagrams
• Data flow
– A single piece of data (e.g., patient name, available schedule) or a
logical collection of data (e.g. new appointment)
– Data flows are the glue that holds the processes together.
– Every data flow should be named with a noun.
– Always starts or ends at a process.
– One end of every data flow will always come from or go to a
process, with the arrow showing the direction into or out of the
process.
– Data flows show what inputs go into each process and what
outputs each process produces.
Elements of Data Flow Diagrams
• Data flow
– Every process must create at least one output data flow, because if
there is no output, the process does not do anything.
– Likewise, each process has at least one input data flow, because it
is difficult, if not impossible, to produce an output with no input.
Elements of Data Flow Diagrams
• Data Store
– A collection of data that is stored in some way
– Every data store is named with a noun and is assigned an
identification number and a description.
– Data stores form the starting point for the data model (discussed
in the next chapter) and are the principal link between the process
model and the data model.
– Data flows coming out of a data store indicate that information is
retrieved from the data store.
– Data flows going into a data store indicate that information is
added or updated to the data store.
Elements of Data Flow Diagrams
• Data Store
– All data stores must have at least one input data flow (or else they never
contain any data), unless they are created and maintained by another
information system or on another page of the DFD.
– Likewise, they have at least one output data flow on some page of the
DFD. (Why store data if you never use it?)
– In cases in which the same process both stores data and retrieves data
from a data store, there is a temptation to draw one data flow with an
arrow on both ends.
– This practice is incorrect, however. The data flow that stores data and the
data flow that retrieves data should always be shown as two separate
data flows.
Elements of Data Flow Diagrams
• External entity
– A person, organization, or system that is external to the system
but interacts with it.
– The external entity typically corresponds to the primary actor
identified in the use case.
– External entities provide data to the system or receive data from
the system, and serve to establish the system boundaries.
– Every external entity has a name and a description. The key point
to remember about an external entity is that it is external to the
system, but may or may not be part of the organization.
Using a DFD to Define Business Processes
• Decomposition is the process of representing the system in
a hierarchy of DFD diagrams
– Child diagrams show a portion of the parent diagram in greater
detail
• Balancing involves insuring that information presented at
one level of a DFD is accurately represented in the next level
DFD.
Context Diagram
• First DFD in every business process
• Shows the entire system in context with its environment.
• All process models have one context diagram.
• The context diagram shows the overall business process as just one
process (i.e., the system itself) and shows the data flows to and from
external entities.
• Data stores usually are not included on the context diagram, unless
they are “owned” by systems or processes other than the one being
documented.
Level 0 Diagram
• The level 0 diagram shows all the processes at the first level of
numbering (i.e., processes numbered 1 through 3), the data stores,
external entities, and data flows among them.
• The purpose of the level 0 DFD is to show all the major high-level
processes of the system and how they are interrelated.
• All process models have one and only one level 0 DFD.
• Another key principle in creating sets of DFDs is balancing.
• Balancing means ensuring that all information presented in a DFD at
one level is accurately represented in the next-level DFD. This doesn‟t
mean that the information is identical, but that it is shown
appropriately.
Level 0 Diagram
• Processes and some data flows in Level 0 Diagram might not shown
on the context diagram because they are the internal components of
process 0.
• The context diagram deliberately hides some of the system‟s
complexity in order to make it easier for the reader to understand.
Level 1 Diagrams
• Each process on the level 0 DFD can be decomposed into a more
explicit DFD, called a level 1 diagram, or level 1 DFD, which shows
how it operates in greater detail.
• Generally, level 1 diagram is created for every major process on the
level 0 diagram.
• Shows all the internal processes that comprise a single process on
the level 0 diagram.
• Shows how information moves from and to each of these processes.
• If a parent process is decomposed into, for example, three child
processes, these three child processes wholly and completely make
up the parent process.
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
Alternative Data Flows
• Where a process can produce different data flows given different
conditions.
• We show both data flows and use the process description to explain
why they are alternatives
• Tip -- alternative data flows often accompany processes with IF
statements
Alternative Data Flows
• Nothing on the DFD itself shows that the data flows are mutually
exclusive.
• For example, process 2.1 on the level 1 DFD produces three output
data flows (H, J, K). Without reading the text description of process
2.1, we do not know whether these are produced simultaneously or
whether they are mutually exclusive.
Process Descriptions
• Text-based process descriptions provide more information
about the process than the DFD alone
• If the logic underlying the process is quite complex, more
detail may be needed in the form of
– Structured English
– Decision trees
– Decision tables
1.2
C R E AT I N G
D ATA F LO W
DIAGRAMS
Integrating Scenario Descriptions
• DFDs start with the use cases and requirements definition
• Generally, the DFDs integrate the use cases
• Names of use cases become processes
• Inputs and outputs become data flows
• “Small” data inputs and outputs are combined into a single
flow
Steps in Building DFDs
1. Build the context diagram
2. Create DFD fragments for each use case
3. Organize DFD fragments into level 0 diagram
4. Decompose level 0 processes into level 1 diagrams as
needed; decompose level 1 processes into level 2
diagrams as needed; etc.
5. Validate DFDs with user to ensure completeness and
correctness
Creating the Context Diagram
• Draw one process representing the entire system (process
0)
• Find all inputs and outputs listed at the top of the use cases
that come from or go to external entities; draw as data
flows
• Draw in external entities as the source or destination of the
data flows
A Context Diagram Example
Creating DFD Fragments
• Each use case is converted into one DFD fragment
• Number the process the same as the use case number
• Change process name into verb phrase
• Design the processes from the viewpoint of the
organization running the system
Creating DFD Fragments
• Add data flows to show use of data stores as sources and
destinations of data
• Layouts typically place
– processes in the center
– inputs from the left
– outputs to the right
– stores beneath the processes
A DFD Fragment Example
Creating the Level 0 Diagram
• Combine the set of DFD fragments into one diagram
• Generally move from top to bottom, left to right
• Minimize crossed lines
• Iterate as needed
– DFDs are often drawn many times before being finished, even
with very experienced systems analysts
A Level 0 DFD Example
Creating Level 1 Diagrams (and Below)
• Each use case is turned into its own DFD
• Take the steps listed on the use case and depict each as a
process on the level 1 DFD
• Inputs and outputs listed on use case become data flows on
DFD
• Include sources and destinations of data flows to processes
and stores within the DFD
• May also include external entities for clarity
Creating Level 1 Diagrams (and Below)
• When to stop decomposing DFDs?
– Depends on the complexity of the system or business
process being modeled.
– In general, you decompose a process into a lower-level DFD
whenever that process is sufficiently complex that additional
decomposition can help explain the process.
– Most experts believe that there should be at least three, and
no more than seven to nine, processes on every DFD.
Validating the DFD
1. Syntax errors – diagram follows the rules
– Assure correct DFD structure
Data Store
Process
Test Yourself
2. Select the correct example below.
A) B)
Customer Customer
Apply
Payment Accounts
Receivable
Test Yourself
4. Match the terms in the left column to the proper definitions
in the right column.
1. Black Hole a. A process with at least 1 input and
output, but the input is insufficient
to generate the shown output.
2. Spontaneous b. A process that has no output
Generation
Process
Verify
that there is more than one instance of the entity that occurs in
the system
Add Attributes and Assign Identifiers
Identifyattributes of the entity that are relevant to the
system under development
Check the process model repository entries for details on data
flows and data stores
Check the data requirements of the requirements definition
Interview knowledgeable users
Perform document analysis on existing forms and reports