DFD Problems and Exercises Solutions

Problems and Exercises Solutions
1. Using the example of a retail clothing store in a mall, list relevant data flows, data stores,
processes, and sources/sinks. Observe several sales transactions. Draw a context diagram and
a level-0 diagram that represent the selling system at the store. Explain why you chose certain
elements as processes versus sources/sinks.
A suggested context diagram and level-0 diagram are provided below.
Problem and Exercise 1
Context Diagram
Customer
Payment
Receipt
0
Point of Sale
System
Management Report
Store Manager
Problem and Exercise 1
Level-0 Diagram
Receipt
Customer
Payment
Goods Sold
2
Update Goods
Sold File
Formatted Goods Sold Amount
Goods Sold File
1
Transform
Customer
Purchase
Inventory Data
3
Update
Inventory File
4
Update Sales
Total File
Formatted Inventory Amount
Formatted Sales Total Amount
Inventory File
Sales Total File
Inventory
Amounts
Goods Sold Amounts
Sales Data
5
Produce
Management
Reports
Sales Totals
Management Report
Store Manager
2.
Choose a transaction that you are likely to encounter, perhaps ordering a cap and gown for
graduation, and develop a high-level DFD, or context diagram. Decompose this to a level-0
diagram.
A suggested context diagram and a level-0 diagram are provided below.
Problem and Exercise 2
Context Diagram
Problem and Exercise 2
Level-0 Diagram
Receipt
Student
Cap & Gown Purchase Request
0
Order Entry
System
Cap and Gown Order
Cap & Gown
Company
Receipt
Cap and Gown Order
Student
Cap & Gown
Company
Cap & Gown Purchase Request
1
Validate Order
Valid Order Information
2
Finalize Order
Inventory Data
3
Update
Inventory File
Inventory Status
Inventory File
Formatted Inventory Data
4. Choose an example like that in Problem and Exercise 2, and draw a context diagram.
Decompose this diagram until it doesn’t make sense to continue. Be sure that your diagrams are
balanced, as discussed in this chapter.
Students may choose a variety of situations to use for the nth level data flow diagrams for this answer.
Basically, students should continue the process of decomposition until they have reached the point
where no sub-process can logically be broken down further (i.e., each process meets the definition of a
primitive process). See the level-1 data flow diagram for this exercise, which shows a sample
decomposition of the process titled Finalize Order from the level-0 data flow diagram provided for
Problem and Exercise 3. The (italicized) labels for processes and sources/sinks without borders
represent the origin or destination of flows that pass between this subsystem and other system
components. Note that the Goods Sold File is a potential black hole, or should possibly be treated as a
sink.
Problem and Exercise #4
Level-1 Diagram
5.
Cap & Gown
Company
Validate Order
Cap and Gown Order
2.1
Generate
Receipt
Valid Order Information
Receipt
2.2
Log Goods Sold
Data
Goods Sold Data
Goods Sold File
Receipt
2.3
Generate
Information For
Shipping
Inventory Data
Update Inventory File
Validate Order
Refer to Figure 5-22, which contains drafts of a context and a level-0 DFD for a university class
registration system. Identify and explain potential violations of rules and guidelines on these
diagrams.
Some errors and peculiarities in these diagrams include:
 In the level–0 diagram, the data store, Class Roster, does not have the data flow,
Scheduled Classes, flowing into it, rather this data flow connects processes 2 and 3, thus
these DFDs are not balanced.
 Process 1 appears to accomplish nothing since its inflow and outflow are identical; such
processes are uninteresting and probably unnecessary; it is possible that this process will
become interesting when it is decomposed, where validation and error handling processes
might appear.
 Process 2 does not appear to need Course Request as input in order to perform its
function, as implied by its name.
 Some students may also wonder if process 3 has input sufficient to produce its output; for
example, where are prior class registrations kept so that process 3 can determine when a
course is full?
6. Why should you develop both logical and physical DFDs for systems? What advantage is there
for drawing a logical DFD before a physical DFD for a new information system?
Physical data flow diagrams help you better understand the people and/or computer systems that are
used in the overall system’s processing. Logical data flow diagrams help you better understand the
essence of the system, the data and the processes that transform them, regardless of actual physical
form. Further, the new logical data flow diagrams can then show any additional functionality necessary
in the new system, to indicate which, if any, obsolete components have been eliminated, and any
changes in the logical flow of data between system components, including different data stores. The
data flow diagrams for the new physical system can then be constructed with the data flow diagrams for
the new logical system as a guide.
7. This chapter has shown you how to model, or structure, just one aspect, or view, of an
information system, namely the process view. Why do you think analysts have different types of
diagrams and other documentation to depict different views (e.g. process, logic, and data) of an
information system?
The various views (e.g., process, logic, data) of an information system each have their own unique
characteristics and provide the most relevant information to different information system specialists.
This variety is best understood, expressed, and managed by using diagrams and documentation that
are specifically tailored for each view of the system. For example, data flow diagrams are useful for
capturing the flow of data through business processes, but they are not useful for describing the forms
and relationships among data. As information systems become larger and more complex, it becomes
even more important to use the right tool and technique to develop each component of an information
system. One technique that captured all aspects of an information system model on one diagram or in
one notation would likely be too complex for systems professionals to handle.
8. Consider the DFD in Figure 5-23. List three errors (rule violations) on this DFD.
Three major errors in Figure 5-23 are:
 Process 1.0 (P2) has only inputs, making it a “black hole.”
 Data flow DF5 should not move directly from source E1 to data store DS1 without first
going through a process.
 Data flow DF1 should not move directly from source E1 to sink E2 without first going
through a process.
 Other peculiarities (such as Process 1.0 has label P2 and the data store has only a label,
not a number) are only that, not errors.
9. Consider the three DFDs in Figure 5-24. List three errors (rule violations) on these DFDs.
These diagrams show the decomposition of process P1 on the level-0 diagram. Three particular logical
errors in Figure 5-24 are:
 The data store DS1, not DS2, should be represented on the level-1 diagram.
 Data flow DF3 should be an outflow on the level-1 diagram, and data flow DF6 should not
be on the level-1 diagram.
 Process P1.4.2 has no inputs and is thus a “miracle.”
10. Starting with a context diagram, draw as many nested DFDs as you consider necessary to
represent all the details of the employee hiring system described in the following narrative. You
must draw at least a context and a level-0 diagram. In drawing these diagrams, if you discover
that the narrative is incomplete, make up reasonable explanations to complete the story. Supply
these extra explanations along with the diagrams. (The Projects, Inc. narrative is provided in the
textbook.)
A suggested context diagram and level-0 diagram are provided below.
Problem and Exercise #10
Context-Level Diagram
Interview Schedule
Engineering
Manager
Applicant
Qualified Applicant’s Application
Blank Non-Disclosure Form
Completed Non-Disclosure Form
Interview Evaluation
0
Hiring System
Completed Application
Job Description
Hiring Decision Letter
Problem and Exercise #10
Level-0 Diagram
Blank Non-Disclosure Form
1
Receive
Application
Purge Notice
Applicant
5
Purge Year-Old
Applications
Valid Application
Year-Old Applications
Applications
Applications Related to Job Descriptions
Qualified Applicant’s Application
Job
Descriptions
6
Create
Employee
Record
Hiring Decision
New Employee
Data
3
Choose for
Interview
Applications for Interview
Interview Schedule
Completed Non-Disclosure Form
Completed
Application
Employees
Approved Job Description
2
Receive Job
Description
Relevant Job Description
4
Evaluate and
Hire
Hiring Decision Letter
Job Description
Interview Evaluation
Engineering
Manager
11.
Applicant
a.
Starting with a context diagram, draw as many nested DFDs as you