paper
Chapter 5
Data and Process Modeling
IST 603 - Chapter 5
1
1
Learning Objectives
After this chapter, you will be able to:
Describe the relationship between logical and physical models
Explain data flow diagrams
Draw the four basic data flow diagram symbols
Explain the six guidelines used when drawing data flow diagrams
Draw context diagrams
Draw diagram 0 data flow diagrams
IST 603 - Chapter 5
2
2
Learning Objectives
Draw lower-level data flow diagrams
Explain how to level and balance data flow diagrams
Create a data dictionary
Apply process description tools in modular design
IST 603 - Chapter 5
3
3
Logical Models
Logical model
Shows what the system must do, regardless of how it will be implemented physically
Enables you to represent business information and define business rules
Can come in many forms
Entity relationship (ER) diagram to represent a database structure
Business Process diagram
Objects and their relationships
Differs from physical model
For example, ER diagram does not tell you the name of the database, name of tables.
These are necessary when you create the database using the ER diagram
IST 603 - Chapter 5
4
4
Logical Models
IST 603 - Chapter 5
5
Shows a logical model (ER diagram) with two entities and relationship between those entities
Primary Key of Course is CRS_NUMBER
Primary Key of Class is CLASS_CODE
5
Physical Models
Physical model
Describes how the system will be constructed
Example: Using the ER diagram, the exact design of the database is created, including column datatypes, constraints, physical storage assignments etc.
IST 603 - Chapter 5
6
| Logical Model | Physical Model |
| Entity | Table |
| Attribute | Column |
| Primary Key | Primary Key of a table |
| Relationship | Relationship implemented using Foreign Keys |
6
Physical Models
The ‘physical model’ may be something like this
Course
CRS_NUMBER String Char(10) Primary Key
DEPT_CODE String VarChar(5)
CRS_DESCRIPTION String VarChar(30)
CRS_CREDIT Integer
CLASS
CLASS_CODE String Char(6) Primary Key
CRS_NUMBER String Char(10)
….. Rest of the attributes
IST 603 - Chapter 5
7
7
Logical Versus Physical Models
Many analysts follow a four-model approach
Physical model of the current system
Current Software modules
Current Hardware architecture
Current Telecommunication infrastructure , and so on
Logical model of the current system
Can be many, such as Business Processes, Procedures, who does what and so on
Logical model of the new system
Models focusing on what is desired in the new system
Physical model of the new system
Proposed Hardware/Software system
IST 603 - Chapter 5
8
8
Data Flow Diagrams
Systems analysts use graphical techniques to describe an information system
Data flow diagram (DFD)
Uses various symbols to show how the system transforms input data into useful information
Shows how data moves through an information system but does not show program logic or processing steps
DFD is a visual explanation of system behavior
IST 603 - Chapter 5
9
9
Data Flow Diagram Symbols
Four basic symbols represent processes, data flows, data stores, and external entities
IST 603 - Chapter 5
Data flow diagram symbols, symbol names, and examples of the Gane and Sarson and Yourdon symbol sets
10
10
Data Flow Diagram Symbols
Process symbols
Process receives input data and produces output
Contains business logic that transforms the data
Process name identifies a specific function
In DFDs, a process symbol can be referred to as a black box
IST 603 - Chapter 5
11
Ask user for name, address, car make and model, car type
Format a Customer Record
Write Customer Record on to Customer Table
11
Data Flow Diagram Symbols
Data flow symbols
Line with a single or double arrowhead
IST 603 - Chapter 5
Examples of correct combinations of data flow and process symbols
12
12
Data Flow Diagram Symbols
Data flow and process combinations that must be avoided
Spontaneous generation
Black holes
Gray holes
IST 603 - Chapter 5
Examples of incorrect combinations of data flow and process symbols.
APPLY INSURANCE PREMIUM has no input and is called a spontaneous generation process.
CALCULATE GROSS PAY has no outputs and is called a black hole process.
CALCULATE GRADE has an input that is obviously unable to produce the output. This process is called a gray hole.
13
13
Data Flow Diagram Symbols
Data store symbol
Represent data that the system stores
DFD does not show the detailed contents of a data store
Specific structure and data elements are defined in the data dictionary
A data store must be connected to a process with a data flow
IST 603 - Chapter 5
14
14
Data Flow Diagram Symbols
Entity symbol
Shows how the system interfaces with the outside world
DFD shows only external entities that provide data to the system or receive output
DFD entities also are called terminators because they are data origins or final destinations
Source and sink entities
IST 603 - Chapter 5
15
15
Data Flow Diagram Symbols
IST 603 - Chapter 5
Examples of correct uses of external entities in a data flow diagram.
16
16
Data Flow Diagram Symbols
IST 603 - Chapter 5
Examples of incorrect uses of external entities. An external entity must be connected by a data flow to a process, and not directly to a data store or to another external entity.
17
17
Data Flow Diagram Symbols
Using DFD symbols
IST 603 - Chapter 5
Examples of correct and incorrect uses of data flows.
18
18
Drawing Data Flow Diagrams
Graphical model is created based on fact-finding results
Review guidelines for drawing DFDs
Apply guidelines and create a set of DFDs
IST 603 - Chapter 5
19
19
Drawing Data Flow Diagrams
Guidelines
Draw the context diagram so that it fits on one page
Use the name of the information system as the process name in the context diagram
Use unique names within each set of symbols
Do not cross lines
Provide a unique name and reference number for each process
Ensure that the model is accurate, easy to understand, and meets the needs of its users
IST 603 - Chapter 5
20
20
Drawing a Context Diagram
First step in constructing a set of DFDs
IST 603 - Chapter 5
Context diagram DFD for an order system.
21
Top level view of the system
Defines system boundaries
By convention, the system (Order System in this example) is given an id of zero
21
Drawing a Diagram 0 DFD
Shows the detail inside the black box
IST 603 - Chapter 5
Diagram 0 DFD for the order system.
22
Shows a little bit more detail of the black box
Repeats data flows, external entities that appear in the context diagram
Notice the process numbering
22
Drawing Lower-Level DFDs
Leveling and balancing techniques are used.
This diagram is more details of Process number 1, Fill Order
IST 603 - Chapter 5
23
The process starts with the context diagram
Then the analysts ‘decomposes the diagram’ into an increasing level of details
23
Drawing Lower-Level DFDs
IST 603 - Chapter 5
This diagram does not show the symbols that connect to data flows entering or leaving FILL ORDER on the context diagram.
24
24
Drawing Lower-Level DFDs
IST 603 - Chapter 5
The order system diagram 0 is shown at the top of the figure, and exploded diagram 3 DFD (for the APPLY PAYMENT process) is shown at the bottom. The two DFDs are balanced because the child diagram at the bottom has the same input and output flows as the parent process 3 shown at the top.
25
25
Drawing Lower-Level DFDs
IST 603 - Chapter 5
Example of a parent DFD diagram, showing process 0 as a black box.
26
26
Drawing Lower-Level DFDs
IST 603 - Chapter 5
In the next level of detail, the process 0 black box reveals three processes, two data stores, and four internal data flows — all of which are shown inside the dashed line.
27
27
Parking System Context Diagram
IST 603 - Chapter 5
Shows a Context Diagram for the Parking System being developed.
28
28
Data Dictionary: Data Element
Central storehouse of information about a system’s data
An analyst uses the data dictionary to collect, document, and organize specific facts about a system
Defines and describes all data elements and meaningful combinations of data elements
Data Element - Smallest piece of data that has meaning within an information system
IST 603 - Chapter 5
29
Data Element: Last Name
Type and Length: String, 30 characters
Default Value: None
Acceptance Value: Any Characters
Source: Client Record Form
Data Element: First Name
Type and Length: String, 30 characters
Default Value: None
Acceptance Value: Any Characters
Source: Client Record Form
29
Data Dictionary: Data Flow
Data Flow
Record: meaningful combination of related data elements that is included in a data flow or retained in a data store
IST 603 - Chapter 5
30
Data Flow: Client Record
Fields:
Last Name First Name Address City Zip Make of the Automobile Model
Color
License Number State of license
30
Data Dictionary : Data Element
Recorded and described attributes
Data element name and label
Alias
Type and length
Default value
Acceptable values
Source
Security
Responsible user(s)
Description and comments
IST 603 - Chapter 5
31
31
Data Dictionary: Data Flow
Documenting the data flows
Data flow name or label
Description
Alternate name(s)
Origin
Destination
Record
Volume and frequency
IST 603 - Chapter 5
32
32
Data Dictionary : Data Store
Documenting the data stores
Data store name or label
Description
Alternate name(s)
Attributes
Volume and frequency
IST 603 - Chapter 5
33
33
Data Dictionary: Process
Documenting the processes
Process name or label
Description
Process number
Process description
IST 603 - Chapter 5
34
34
Data Dictionary: Entities
Documenting the entities
Entity name
Description
Alternate name(s)
Input data flows
Output data flows
IST 603 - Chapter 5
35
35
Data Dictionary : Records
Documenting the records
Record or data structure name
Definition or description
Alternate name(s)
Attributes
IST 603 - Chapter 5
36
36
Data Dictionary
Data dictionary reports
Alphabetized list of all data elements
Report describing each data element and indicating the user or department
Report of all data flows and data stores that use a particular data element
Detailed reports showing all characteristics of data elements, records, data flows, processes, or any other selected item stored in the data
IST 603 - Chapter 5
37
37
Process Description Tools in Modular Design
Documents the details of a functional primitive and represents a specific set of processing steps and business logic
Typical tools: structured English, decision tables, and decision trees
Process descriptions in object-oriented development
O-O analysis combines data and processes that act on the data into objects, and similar objects can be grouped together into classes
O-O processes are called methods
IST 603 - Chapter 5
38
38
Process Description Tools in Modular Design
Modular design
Based on combinations of logical structures (i.e., control structures), which serve as building blocks for the process
Sequence
Selection
Iteration
Structured English
Subset of standard English that describes logical processes clearly and accurately
Use only the three building blocks of sequence, selection, and iteration
Use indentation for readability
Use a limited vocabulary
IST 603 - Chapter 5
39
39
Structured English Example
IST 603 - Chapter 5
40
Ask user for Customer Record information
Verify the customer is a Staff or Student of the University
If Verified
Format a Customer Record
Write Customer Record on to Customer Table
40
Process: Decision Tree
You are required to calculate the sales commission for various employees in a company. You will read product quantity sold (integer), price per unit of the product (double) and employee job code (character or string). Job codes are C for Commission, S for Salaried, and M for Management.
A sales commission is calculated using the following rules:
Employee Type Sales $ Commision
Commision > 1000 $100 + 3% of sales over 1000
<= 1000 $50 + 4% of sales
Salaried ---- 3% of sales
Management > 1000 Flat bonus of $50
<= 1000 No bonus
IST 603 - Chapter 5
41
Process: Decision Tree
There are two conditions governing the calculation of Commission
Employee Type is Condition no. one
Sales amount is condition no. 2
There are 3 types of Employees: Commission, Salaried, and Management
Sales amount has mostly two ranges
The commission calculation can be determined using a Decision Tree
Let us start with graphing Employee Type
IST 603 - Chapter 5
42
Commission
Salaried
Management
There are 3 Employee Types, hence 3 branches
Process: Decision Tree
Sales are mostly 2 ranges.
Since Sales is associated with Employee type, we draw branches at the end of Employee Type line
IST 603 - Chapter 5
43
Commission
Salaried
Management
<=1000
> 1000
<=1000
> 1000
$100 + 3% of sales over 1000
$50 + 4% of sales
Flat bonus of $50
No bonus
3% of Sales
Process Description: Decision Table
Decision tables
Logical structure that shows every combination of conditions and outcomes
Number of rules doubles each time a condition is added
Best way to describe a complex set of conditions
A structured English description can be easily written using the decision tree or the decision table
Dash in a condition row is interpreted as not applicable
IST 603 - Chapter 5
44
| Employee Type | Commission | Commission | Salaried | Management | Management |
| Sales Amount | 1000 | <= 1000 | ------ | >1000 | <= 1000 |
| Outcome | $100 + 3% of sales over 1000 | $50 + 4% of sales | 3% of sales | Flat bonus of $50 | No bonus |
44
Structured English Description (Alternate to Decision Tree or Table) of Sales Commission Process
If Employee Type is Commission If Sales is more than 1000
Set Commission Amount to 1000 + .03 * ( Sales – 1000)
Else
Set Commission Amount to 50 + .0 4 * Sales
Else if Employee Type is Salaried Set Commission Amount to .03 * Sales
Else if Employee Type is Management
If Sales is more than 1000
Set Commission Amount to 50
Else
Set Commission Amount to 0
Else
Report Unknown Employee Type
IST 603 - Chapter 5
45
45
Summary
Structured analysis tools
Used to develop a logical model during one systems analysis phase and a physical model during the systems design phase
Data and process modeling
Main tools: DFDs, data dictionary, and process description
Each functional primitive process is documented
Structured English, decision tables, and decision trees
IST 603 - Chapter 5
46
46
COURSECRS_NUMBERDEPT_CODECRS_DESCRIPTIONCRS_CREDITCLASSCLASS_CODECRS_NUMBERCLASS_SECTIONCLASS_TIMEROOM_CODEPROF_IDGenerates
Register UserCustomer TableCustomer RecordCustomer Record
Gane-SarsonYourdon
Customer
0Parking SystemParking OfficeClient RecordRegistration ReceiptGarage Entry ScannerRegistration IdParking ReceiptParking Lot Internal ScannerRegistration IDParking OfficeReport RequestUsage Report