Date post: | 04-Jan-2016 |
Category: |
Documents |
Upload: | gerard-phelps |
View: | 213 times |
Download: | 0 times |
University of Sunderland ISIC 1
Data Flow Diagrams - Part 2Data Flow Diagrams - Part 2Hierarchical DFDsHierarchical DFDs
University of Sunderland ISIC 1
Temporary Data storeTemporary Data store
T1• Can use T to indicate a temporary data store• usually manual• eg in tray, where orders are placed before filing
University of Sunderland ISIC 1
Hierarchical DFDsHierarchical DFDs• DFDs are hierarchical
• Top-down stepwise refinement is employed
• Processes are expanded into sub-processes to show more and more detail
• Each expansion is a new level
• Highest level is level 0 aka a CONTEXT DIAGRAM
• Lower levels are numbered 1,2,3 etc,
• No limit to the number of levels allowed, but
level 3 is usually enough
University of Sunderland ISIC 1
Components of a Data Components of a Data Flow ModelFlow Model
Overallprocess
Entity
Entity
Level 0 Level 1
Process
Process
Process
1
2
3
University of Sunderland ISIC 1
Components of a Data Components of a Data Flow ModelFlow Model
Overallprocess
Entity
Entity
Level 0 Level 1 Level 2
Process
Process
Process
1
2
3
2
2.1
2.2
2.3
subProcess
subProcess
subProcess
University of Sunderland ISIC 1
Components of a Data Components of a Data Flow ModelFlow Model
Overallprocess
Entity
Entity
Level 0 Level 1 Level 2 Level 3
Process
Process
Process
1
2
3
2 2.2
2.1
2.2
2.3
2.2.1
2.2.2
2.2.3
subProcess
subProcess
subProcess
sub-subProcess
sub-subProcess
sub-subProcess
University of Sunderland ISIC 1
Overallprocess
Entity
Entity
Level 0 Level 1 Level 2 Level 3 Level 4
Process
Process
Process
1
2
3
2 2.2 2.2.2
2.1
2.2
2.3
2.2.1
2.2.2
2.2.3
subProcess
subProcess
subProcess
sub-subProcess
sub-subProcess
sub-subProcess
Components of a Data Components of a Data Flow ModelFlow Model
University of Sunderland ISIC 1
Level 0 DFDs - Level 0 DFDs - Context DiagramsContext Diagrams
• Level 0 DFDs, aka Context diagrams are the highest level DFD, but not always required or drawn
• Level 0 DFDs depict the system as a single process
• Since there is only one process, there is no need to number the process
University of Sunderland ISIC 1
Level 0 DFDs –Level 0 DFDs – Context Diagrams Context Diagrams
• The process description at Level 0 gives an overview of the system i.e. the activities on the Level 1 DFD
• Level 0 diagrams do not show Data stores
• External entities should be shown and referenced
University of Sunderland ISIC 1
Example Example Context DiagramContext Diagram
Sales,Despatch
& Warehouse
AccountsCustomer
Supplier
Order
Delivery note
Orderacknowledgement
Weekly creditlimit list
Copy deliverynote
Re-order card
Goods receivednote
Goods receivednote
ab
c
University of Sunderland ISIC 1
GOODS RECEIVED GOODS RECEIVED NOTE (GRN)NOTE (GRN)
– A document produced when goods are received into the factory. It will usually accompany goods to any inspection and is used to check against invoices before payment..
University of Sunderland ISIC 1
delivery notedelivery note
• Definition
• Document accompanying a shipment of goods that lists the description, grade, and quantity of the goods delivered. A copy of the delivery note, signed by the buyer or consignee, is returned to the seller or consignor as a proof of delivery.
University of Sunderland ISIC 1
Level 1 DFDsLevel 1 DFDs
• First real DFD, i.e. always included
• Show processes, external entities, data stores physical resources if required
• Number all processes 1,2,3 etc
• External entities must have the same references as Level 0 (if it was drawn)
University of Sunderland ISIC 1
Example - Level 1 DFDExample - Level 1 DFD
Accounts
Customer
Accounts
Supplier
*
OrderEntry
Sales1
*
Packagegoods
& despatch
Despatch2
Stockcontrol
Warehouse3
Delivery note
Orderacknowledgement
Order
Weekly creditlimit list
Goods receivednote
Internal orderform
Despatchinstruction set
Re-order card
Goods receivednote
Copy deliverynote
a
b
c
b
University of Sunderland ISIC 1
Level 2 DFDsLevel 2 DFDs
• If a process cannot be expanded any further, put an asterisk in the lower right hand corner
*
University of Sunderland ISIC 1
Example - Level 2 DFDExample - Level 2 DFD
• In our example, just process 3 Stock control can be expanded to a Level 2 diagram
• In the Level 2 diagram, the Stock control process is broken down into 4 sub-processes
• Processes are numbered 3.1, 3.2, 3.3 etc
• Process 3 has a Data store, called Stock, which was not present at Level 1, so its ID is M3/1, the first data store within process 3
University of Sunderland ISIC 1
Level 2 DFD - Stock ControlLevel 2 DFD - Stock Control
Stock control3
AccountsAccounts
*
Packagegoods
& despatch
Despatch2
Supplier
*
OrderEntry
Sales1
*
Allocatestock
to order
Stock Clk3.1
*
Type thedespatchinstruction
set
Typist3.2
Monitorstocklevels
W'h men3.3
*
Check goodsreceipt note
to stock recei-ved & incre
Goods Rec3.4
StockM3/1
Accounts
Re-order card
Goods receivednote
Despatchinstruction set
Goods receivednote
Internal orderform
read & updatestock
stock level
stock additions
Internal orderform
Re-order card
b
b c
University of Sunderland ISIC 1
Level 3 DFDsLevel 3 DFDs
• Notice, from our Level 2 DFD, sub process 3.3 does not have an asterisk, so it can be expanded further ...
University of Sunderland ISIC 1
Level 3 DFD - Level 3 DFD - Monitor Stock LevelsMonitor Stock Levels
Monitor stock levels3.3
Accounts
StockM3/1
*
Monitor stocklevels andreport low
stock
Stock Clk3.3.1
*
Replacere-order
card
S/visor3.3.2
*
Extractappropriate
re-ordercard
S/visor3.3.3
Re-ordercardsM3.3/1
Re-order card
stock level
Stock receiptnote
Low stockdetails Re-order card
Re-order card
Re-order card
University of Sunderland ISIC 1
Level 3 DFDsLevel 3 DFDs
• Note processes are now numbered 3.3.1, 3.3.2 etc
• New data store has the ID M3.3/1
• All these Level 3 sub processes cannot be expanded further
• You will not be asked to go beyond Level 2 in this Module
University of Sunderland ISIC 1
GoodGood PractisePractise
• Level 0 diagram shows the whole system as just one process
• Level 1 diagram has one process for each department
• Level 2 shows what happens within each department
• Level 3 could show processes performed by a single named job role – eg warehouse supervisor
• This is not always possible, but is very effective when it can be done
University of Sunderland ISIC 1
Drawing DFD TipsDrawing DFD Tips
• Identify data flows, data stores and processes, as described in the last lecture
• Draw processes first, down the centre of the page
• Add external entities down the left hand side• Draw data stores down the right hand side• Finally add the data flows• Flow lines should not cross, use duplicate
symbols to avoid crossing lines and keep DFD neat and tidy ...
University of Sunderland ISIC 1
Multiple Instances Multiple Instances on a Single DFDon a Single DFD
For each instance of the duplicate element, add a line to the symbol, like so …
Use duplicates to keep your DFD clear and easy to follow.
University of Sunderland ISIC 1
Duplicate ProcessesDuplicate Processes
• Is possible, but should
be avoided• ie duplicate external entities
and data stores• Don’t duplicate Processes,
unless you really have to• Duplicated processes complicate DFDs• Which defeats the objective
University of Sunderland ISIC 1
Drawing DFDs in this way Drawing DFDs in this way encourages a encourages a step-by-step approach, that should step-by-step approach, that should result in diagrams which are better result in diagrams which are better laid out and are easier to read.laid out and are easier to read.You need to know the terminology and conventions for exams. Practice interpreting case studies and drawing the DFDs.
Read through the examples in Lejk and Deeks.
University of Sunderland ISIC 1
• Drawing DFDs in this way encourages a step-by-step approach, that should result in diagrams which are better laid out and are easier to read.
• You need to know the terminology and conventions for exams. Practice interpreting case studies and drawing the DFDs.
• Read through the examples in Lejk and Deeks.
University of Sunderland ISIC 1
Rules for drawing Rules for drawing DFDsDFDs
Processes:
• No process can have only output
• No process can have only input
• If you think a process has only input or output, then it must be an external entity (source/sink)
• A process name must contain a verb
University of Sunderland ISIC 1
Rules for drawing Rules for drawing DFDsDFDs
Data Stores:• Data cannot move directly from one data
store to another data store - data must be moved by a Process
• Data cannot move directly from an external entity to a data store or vice versa - data must be moved by a process
• The name of a data store must contain a noun
University of Sunderland ISIC 1
Rules for drawing Rules for drawing DFDsDFDs
External Entities:
• Data cannot move directly from one external entity to another. It must be moved by a process, otherwise don’t show the data flow on the diagram
• The external entity name must contain a noun
University of Sunderland ISIC 1
Rules for drawing Rules for drawing DFDsDFDsData flow:
• A data flow has only one direction of flow between symbols. It may flow in both directions, but these are usually shown as 2 separate arrows since they happen at different times
• A data flow cannot go directly back to the same process it leaves
• A data flow to a data store means update (append, delete or change)
• A data flow from a data store means retrieve or use• A data flow label will contain a noun