Professional Documents
Culture Documents
Data Flow Diagram
Data Flow Diagram
(DFDs)
Order
In-Stock Request
CUSTOMER
1.0
Status
Message
Check
Status
Status Data
Order
Data
2.0
Shipping
Confirmation
D1
Issue
Status
Messages
Pending
Orders
Order Data
Payment
4.0
Order Data
Invoice
Manage
Accounts
Receivable
Accounts Receivable Data
Accounting Data
D2
Accounts
Receivable
Inventory
Reports
Process
1.0
Grade Detail
Grade Report
Produce
Grade
Report
Rule 1: Process
Submitted Work
Hours Worked
Pay Rate
Grade
Student
Work
Graded Work
Student Grade
3.0
Gross Pay
Calculated
Gross
Pay
Rule 2: Process
Order
1.0
Verify
Order
Accepted Order
2.0
Assemble
Order
Inventory
Change
Process: Correct/Incorrect?
Services Perfomed
5.0
Invoice
Create
Invoice
Policy Number
Payment Amount
Apply
Insurance
Premium
Hours Worked
2.1
Pay Rate
Calculate
Gross
Pay
Data Flow
Deposit
Payment Detail
Invoice Detail
Post
Payment
D1
Accounts
Receivable
Courses
Customer
Payment
Class
List
Students
D2
Daily Payments
Daily
Payment
6.0
Prepare
Deposit
Data Store
D1
Students
D1
Daily
Payments
Daily Payment
D2
Accounts
Receivable
Invoice
Detail
Payment
Detail
Fight
Request
3.0
Passengers
Post
Payment
1.0
Invoice
Verify
Order
Rule: Source/Sink
BANK
Bank
Deposit
2.0
Prepare
Deposit
Source/Sink: Correct/Incorrect?
PAYROLL
DEPARTMENT
Paycheck
EMPLOYEE
CUSTOMER
Payment
3.0
Apply
Payment
CUSTOMER
Payment
Accounts
Receivable
NO
DF 2
E1
1.0
P2
DF 5
DF 1
DS 1
D
DF 6
2.0
DF 4
DF 2
P1
Context Diagram
Top-level view of IS
Shows the system boundaries, external entities that
interact with the system, and major information flows
between entities and the system.
Example: Order system that a company uses to
enter orders and apply payments against a
customers balance
Context Diagram of
Order System
Order
CUSTOMER
WAREHOUSE
Order
Reject
Notice
Payment
Picking
List
Invoice
0
Completed
Order
Order
System
Bank
Deposit
Commission
SALES
REP
ACCOUNTING
BANK
Level-0 DFD
Context Diagram of
Order System
Order
CUSTOMER
WAREHOUSE
Order
Reject
Notice
Payment
Picking
List
Invoice
0
Completed
Order
Order
System
Bank
Deposit
Commission
SALES
REP
ACCOUNTING
BANK
Order
Level-0 DFD of
Order System
Picking List
CUSTOMER
WAREHOUSE
1.0
Order
Reject
Notice
Fill
Order
Invoice
2.0
Payment
Create
Invoice
Invoice
D1
Completed
Order
Accounts
Receivable
Invoice
Detail
Payment
Detail
3.0
Apply
Payment
Commission
Bank Deposit
Cash Rece
Lower-Level Diagrams
Functional Decomposition
An
Balancing
The
Top-down strategy
Create
Bottom-up strategy
Create
Exercise:
Precision Tools sells a line of high-quality woodworking
tools. When customers place orders on the companys
Web site, the system checks to see if the items are in
stock, issues a status message to the customer, and
generates a shipping order to the warehouse, which fills the
order. When the order is shipped, the customer is billed.
The system also produces various reports.
Draw a context diagram for the order system
Draw DFD diagram 0 for the order system
Entities
Processes
Customer
Warehouse
Accounting
1.0 Check Status
2.0 Issue Status Messages
3.0 Generate Shipping Order
4.0 Manage Accounts Receivable
5.0 Produce Reports
Data Stores
D1 Pending Orders
D2 Accounts Receivable
Data Flows
Order
In-Stock Request
1.0
Order Data
Status Data
2.0
Status Message
Shipping Order
3.0
Order Data
Invoice
Shipping Confirmation
4.0
Payment
Accounting Data
Accounts Receivable Data
5.0
Order Data
Inventory Reports
Order
CUSTOMER
In-Stock
Request
Payment
Status
Message
Invoice
0
Order
System
Inventory
Reports
Context
Diagram of
Order
System
ACCOUNTING
WAR
Shipping
Order
Shipping Conf
Order
In-Stock Request
CUSTOMER
WAREHOUS
1.0
Status
Message
Status Data
Order
Data
2.0
Shipping
Confirmation
Shipp
Order
Check
Status
D1
Issue
Status
Messages
3.0
Pending
Orders
Generate
Shipping
Order
Order Data
Payment
4.0
Order Data
Invoice
Manage
Accounts
Receivable
5.0
Level-0 of
Order System
Accounting Data
D2
Produce
Reports
Accounts
Receivable
Inventory
Decision Trees
Decision Trees
Planning Tool
Decision Trees
Enable a business to quantify decision
making
Useful when the outcomes are uncertain
Places a numerical value on likely or
potential outcomes
Allows comparison of different possible
decisions to be made
Decision Trees
Limitations:
How
Process
The Process
Economic growth rises
0.7
Expected outcome
300,000
Expected outcome
-500,000
The Process
Economic growth rises
0.5
Expected outcome
300,000
Expected outcome
-500,000
Look what happens however if the probabilities change. If the firm is unsure of the potential for growth, it
might estimate it at 50:50. In this case the outcomes will be:
Economic growth rises: 0.5 x 300,000 = 150,000
Economic growth declines: 0.5 x -500,000 = -250,000
In this instance, the net benefit is -100,000 the decision looks less favourable!
Advantages
Disadvantages
Decision Tables
Action
stubs
stubs
Rules
Indifferent Condition
Figure 9-4
Complete decision table for payroll system example
9.43
9.43
Identify the conditions (decision criteria). These are the factors that will influence the
decision.
E.g., We want to know the total cost of a students tuition. What factors are important?
Alternate values for first condition. Repeat for all values of second condition. Keep
repeating this process for all conditions.
Put the rules in the upper right quadrant.
Put the conditions in the upper left quadrant. One row per condition.
Put the actions in the lower left quadrant. One row per action.
In the lower right quadrant, determine what, if any, appropriate actions should be taken for
each rule.
Example
Actions?
Actions?
Graduate:
Entity Relationship
Diagrams
Basic Elements and Rules
9.48
9.48
48
Conceptual Data
Modeling,
E-R Diagrams
49
50
Outline
Purpose and importance of conceptual
data modeling
Entity-Relationship Model
Entity
Attributes
Relationships
51
An Entity
CUSTOMER
52
0010
Scott George
56 Neat Street
Boulder, Colorado
35882-2799
507-293-8749
Entities
53
54
Last_Name
Snerd
Fogg
Amos
Targa
George
Guy
Smith
Smith
First_Name
Address
City
ST
Zip
Entity
Attribute
55
Relationship
56
SHOULD BE:
An
Business Rules
58
Figure 3-4
System user
Inappropriate entities
System output
Appropriate entities
59
An Attribute
A discrete data element
A characteristic (property) of an entity
CUSTOMER
60
Customer_Number
Last_Name
First_Name
Street_Address
City
State
Zip
Phone
Types of Attributes
Single - only one value per entity instance (e.g., last name, date of
birth)
61
Attributes on ERDs
May be shown on ERDs as ellipses
pt-num
emp-id
PHYSICIAN
name
62
address
Admits
name
PATIENTS
ward
Attributes on ERDs
Multivalued attributes are shown as double ellipses
Composite attributes may be shown broken down
into their simple components
Simple/Single Valued; Primary Key
Multivalued
emp-id
composite
f_name
skills
63
EMPLOYEE
name
m_name
l_name
Textbooks notation
An attribute broken
into component
parts
Multivalued
an employee can have
more than one skill
64
64
Derived
from date
employed and
current date
Identifiers/Primary Key
65
Identifiers
Must be unique
Should not change value over time
Guaranteed to have a valid value
No intelligent identifiers (e.g. containing locations or people that might change)
Consider substituting
single-attribute
identifiers for
composite identifiers
to simplify design and
enhance performance
CUSTOMER
66
Customer_Number
Last_Name
First_Name
Address
City
State
Zip
Phone
Relationships
67
a) Relationship
b) Relationship
instances
68
Cardinality Constraints
A patient history is
recorded for one and
only one patient
Optional relationships
0
0
69
none or one
none or more
Mandatory relationships
one and only one
one or more
Cardinality Constraints
Cardinality Constraints - the number of
instances of one entity that can or must be
associated with each instance of another entity.
Minimum Cardinality
If
Maximum Cardinality
The
70
maximum number
Manages
EMPLOYEE
UNARY
BINARY
STUDENT
71
Is assigned
DORMITORY
More on Relationships
These describe features pertaining to the association between the entities in the
relationship
Two entities can have more than one type of relationship between them
(multiple relationships)
Associative Entity = combination of relationship and entity
Some typical cases
73
74
Time stamping
75
Strong entities
Weak entity
Identifying relationship
77
Associative Entities
relationship
AND its a
it links entities together
When should a relationship with attributes instead be an associative entity?
Guidelines:
78
79
80
entities
Relationships
Attributes
10.81
10.81
Entity
A person, place, object, event or concept in the user
environment about which the organization wishes to
maintain data
Represented by a rectangle in E-R diagrams
Entity Type
Attribute
10.82
10.82
Examples
Result
Identifier
A candidate key that has been selected as the unique
identifying characteristic for an entity type
Selection rules for an identifier
1. Choose a candidate key that will not change its value
2. Choose a candidate key that will never be null
3. Avoid using intelligent keys
4. Consider substituting single value surrogate keys for
large composite keys
Relationship
An
Cardinality
Maximum Cardinality
9.90
9.90
90
10.92
10.92
Entity
1) Stephens, R.K. and Plew. R.R., 2001. Database Design. SAMS, Indianapolis , IN.
Attribute
1) Stephens, R.K. and Plew. R.R., 2001. Database Design. SAMS, Indianapolis , IN.
Mandatory, Many-to-Many
INSTRUCTOR
STUDENT
INSTRUCTOR
STUDENT
Optional, Many-to-Many
DEPARTMENT
STUDENT
DEPARTMENT
STUDENT
Optional/Mandatory,
Many-to-Many
INSTRUCTOR
SKILL
INSTRUCTOR
SKILL
Optional/Mandatory,
One-to-Many
PRODUCT
VENDOR
PRODUCT
VENDOR
Mandatory, One-to-One
AUTOMOBILE
ENGINE
AUTOMOBILE
ENGINE
Recursive
EMPLOYEE
is supervised by
supervises
Resolving Many-to-Many
Relationships
Resolving Many-to-Many
Relationships
SALES ORDERS
SALES ORDERS
INV. ITEMS
ORDER ITEMS
INV. ITEMS
CLERKS
SALES ORDERS
ORDER ITEMS
INV. ITEMS
9.
9.
105
105
105