lecture 03

advertisement
And Franchise Colleges
03 Data Flow Diagrams
- Context Diagrams
By MANSHA NAWAZ
Section 03
SAD - DFD Context Diagrams
1
Learning Aims
• Aim
– to construct a context diagram for a proposed
computerised information system
• Objectives
– to identify and represent the whole system
– to identify and label external entities
– to identify and label system in/outputs
– to compile a consistent event list
Section 03
SAD - DFD Context Diagrams
2
Lecture Outline
•
•
•
•
the nature of models
basic notation
building a context diagram
building an event list
Section 03
SAD - DFD Context Diagrams
3
Data Flow Diagrams
• What Is a Data Flow Diagram?
– Data Flow Diagrams (DFDs) are a System Modelling CASE Tool
– DFDs are graphical views used to represent the system, subsystems and functional view (systems decomposition).
– System Model is depicted by a series of DFD’s
– Used to model a proposed system
• DFD’s show how data travels within a system.
– flows of data to and from external entities such as people,
departments and organisations outside the system.
– flows of data to and from a systems processes
– show the flows to and from data stores within the system area.
Section 03
SAD - DFD Context Diagrams
4
Types of Data Flow Diagram
Stage 1 – at the beginning of the systems analysis phase
– current physical DFDs to represent graphically the current system.
Stage 2 – as part of the systems analysis phase
– current logical DFDs to depict the current system, without
reference to where things happen or who does what.
Stage 3 – also during the systems analysis phase
– required logical DFDs including the new requirements.
Stage 4 – as part of the systems design phase
– required physical DFDs showing how the new system will be
implemented.
•
•
Many methods make use of DFDs for some, or all, of these purposes.
We’re going to look at how to use DFDs to model systems at a logical level
using Yourdon notation for new systems (focus on Stage 3 & 4).
Section 03
SAD - DFD Context Diagrams
5
b
ert
Data Flow Diagrams - Yourdon’s Notation
Symbol
Symbol used if duplicated in
diagrams
d
d
admin
admin
Description
Entity – has an input into the system
or receives output from it. Does not
admin exist within the system itself
a
Process – represents the processes
which must take place inside the
system
1
Write
letters
Discount
1
b
Admin
Section 03
1
Application
writes letters
7
Write
letters
Application
3
Letters
Letter
SAD - DFD Context Diagrams
Data store – where information is held
over time
Data flow – the direction of the arrow
shows the direction in which the data
flows within the system
6
Entity
• An external entity (terminator or source) is
something outside the system. It is shown as a
square and is identified by a lower case letter and
name.
a
Customer
b
Sales Dept
c
Accounts
Package
• Eg people, departments, organisations that provide information to the
system (source) or receive information from the system (sink).
• An external entity can be a source and a sink.
a
• If external entities have to be duplicated, an
Customer
• angled line is put in the corner of the box (all copies).
Section 03
SAD - DFD Context Diagrams
7
Process
• A process is an action on or transformation of data. It is
shown as a circle and is identified by a number and
name. The name is a description of the data processing
taking place.
1
Check
Credit
Rating
2
Split
Order
3
Adjust
Stock
• The description should be an imperative statement, consisting of an
active verb and object.
• The description does not have a subject, ie we don’t say who carries
out the process or where.
• This helps our logical view of the system.
Section 03
SAD - DFD Context Diagrams
8
Data Flow
• A data flow is shown as a named arrow.
Date
Invoice
•
The name of the data flow is the name of the piece of data passing between
the 2 connected symbols.
•
The direction of the arrow shows the direction in which the data is flowing.
•
Two way flows of data are best shown by 2 arrows,
but may be shown by one double-headed arrow.
Section 03
SAD - DFD Context Diagrams
Stock
Adjustment
9
Data Store
• The final symbol is the data store, represented by
parallel lines, identified by a number and name. The
name is usually in the plural.
1 Customers
2 Invoices
•
The data in a data store is data at rest (persistent data), ie a file or database.
•
If data stores have to be duplicated, a vertical line is added to the left (all
copies).
1 Customers
Stock
Level
•
When data is written to a data store, the data flow is shown going in.
•
When data is read from a data store, the data flow is shown coming out.
•
If data is being read and written, a double-headed arrow can be used.
Section 03
SAD - DFD Context Diagrams
1 Stock
10
System modelling using DFD’s
• There are many ways to go about drawing DFDs
models for system representation.
• We will focus on 3 level system views
– Context Diagram (CD)
lecture 03
• System View
– Top-Level Data Flow Diagram
lecture 04
lecture 05
lecture 06
lecture 07
• TL-DFD, DFD-0 or Level-0
• A systems Sub-Systems View
– Low-Level Data Flow Diagrams
• LL-DFD, DFD-1 or Level-1
• A sub-systems a Function view
Section 03
SAD - DFD Context Diagrams
11
Context Diagrams (CD)
Basic Notation I
•
•
•
•
Representing the proposed system
whole system view
a process is shown as a circle
the system is represented as a
single process
it is named
Section 03
SAD - DFD Context Diagrams
The
XY
System
12
Basic Notation II
•
•
•
•
•
Representing external
entities
outside will be agencies
that react with the system
who or what is going to
communicate with our
system
shown as squares
numbered a..z
named
Section 03
a
XXX
The
XY
System
b
YYY
SAD - DFD Context Diagrams
13
Basic Notation III
•
•
•
•
•
Representing inputs &
outputs
data that flows between
the system and the
outside
shown as arrows
have direction
data in – information out
named
a
XXX
xdetail
The
XY
System
b
YYY
yreport
Should Context Diagrams have datastores?
Section 03
SAD - DFD Context Diagrams
14
Context Diagram (CD)
• Yourdon also proposes the notion of a CD
• This is a very high level diagram consisting of one
process that represents the whole system, and all the
external entities that interact with it.
• The purpose of such a diagram is to show clearly all a
system’s interfaces with its environment.
• No stores appear on this diagram.
Section 03
SAD - DFD Context Diagrams
15
The Event List
• things happen outside of the system
• those that the system must respond to are
termed events, these are listed
• each event on the list corresponds to an
input on the context diagram
– An XXX sends in an xdetail
• the exception are temporal events
Section 03
SAD - DFD Context Diagrams
16
Building Context Diagrams
•
•
•
•
•
Draw one process to represent the system
Name it appropriately
“Who or what does the system interact with”
Draw each of these entities onto the diagram
Identify the dataflow required by the system –
Data in - Information out.
• Do not expect to obtain all entities or dataflow on
your first draft.
• Expect a number of revisions – the more time
you spend the more awareness you have on the
system
Section 03
SAD - DFD Context Diagrams
17
Development : Context Diagram
– Context Diagram (CD)
• Provide a supporting text description of the
system view as a introduction to the CD
• Provide the CD
– Event List
• List all events and make sure it is consistent with
your context diagram
Section 03
SAD - DFD Context Diagrams
18
Document : Analysis Specification
– Terms Of Reference
– Context Diagram
lecture 02
lecture 03
• Context Diagram Support Text
• Context Diagram
• Event List
– Top-Level Data Flow Diagram
lecture 04 lecture 05
– Low-Level Data Flow Diagrams
lecture 06 lecture 07
Section 03
SAD - DFD Context Diagrams
19
Summary & Self Study
Summary
• Structured methods
arose to meet the
problems of growth
• Context Diagrams
show system and its
interaction with the
outside world
Section 03
Self Study
• review the lecture
• complete 3a & b from
the course workbook
• can you achieve the
objectives set out in
slide 2?
SAD - DFD Context Diagrams
20
Download