Professional Documents
Culture Documents
Lecture Outline
u Structured Analysis v Other courses will deal with Object Oriented analysis u Context
Diagrams u Event Lists u Data Flow Diagrams u Control Flows and Processes u Levelled Data Flow Diagrams
Page 1
Structured Analysis
u Definition
v Structured Analysis is a data-oriented approach to conceptual modelling We worry about the data the system processes NOT how it processes the data. Data is the king vCommon feature is the centrality of the dataflow diagram (DFD) vMainly used for information systems variants have been adapted for real-time systems
Tom de Marco - Structured Analysis and System Specification Gane and Sarson - Structured Systems Analysis McMenamin and Palmer - Essential Structured Analysis Yourdon Publishes Modern Structured Analysis Integrates Chens Entity-Relationship Models
u u
1984 - SA is extended
v
u u
Page 2
Modeling tools
Context Diagrams
u Indicate
the people, organisations and systems which communicate with our system u Show the data which our system receives from the outside world u Show the data produced by the system and sent to the outside world u Show the data which is shared by the system with the outside world u Show the boundary between the system and the rest of the world
Page 3
4 components
v The System
Airline Booking System
v Terminators
Customer
v Data Flows
reservation
v Data Stores
Paul Dunne GMIT
Flights
Customer
Flight details
Credit details
Management
Finance System
Page 4
appropriate names
Yes
No Fred Flintstone
u Dont
Customer
Guidelines (2)
u Can
flow
Finance System
Customer
Flight status request
Page 5
System
v
Student Enrolment system Student University Management University Staff Student Results reports to management, enrolment details from student, confirmation of enrolment to student, payment details from staff, student lists to staff, student results from staff to system, student results from Student Results database to system
Terminators
v v v
u u
Data Stores
v
Your answer?
Page 6
Event Lists
u List
of the external events that occur in the outside world which affect the system, i.e. events generated by terminators u Events can be
v v v
Flow - some data flows between the external world and the system Temporal - an event occurs as a result of some timing Control - special case of a temporal event, an external stimulus that occurs at some unpredictable point in time
u Events
of view
Event examples
u Customer
places reservation (Flow) u Customer cancels reservation (Flow) u Accounting System receives transaction details (Flow) u Management requests weekly report (Temporal) u Airline confirms reservation (Temporal) u Credit card to be verified (Control)
Page 7
each terminator in turn u Decide whether it generates a single event or possibly multiple events
v v
Customer places order Can be Customer places order and Salesperson places order
u Need
to allow for failure conditions on the part of the terminator, but no need to allow for system failures
Events
u Look
at a system which controls the sales of goods at a supermarket u Entities to think about
v Cash register v Checkout Operator v Customer v Scanner v Receipt printer u What
Page 8
Your answer?
Page 9
the Context Diagram by defining the processes which make up a system u 4 components
v Processes Number - identifies process and indicates place in DFD level heirarchy Name - what the process does Part of system which transforms inputs to outputs v Data Flows v Data Stores v Terminators
as in context diagram
Data Flows
u Indicate
movement of packets of information from one part of the system to another part u Flows are named
v Input flow
Phone No. Validate Phone No.
v Output flow
Generate Flight Schedule Flight Schedule Information
Page 10
phone no.
Update Inventory
Orders Order
Warehouse
Order books
invalid orders
Invoice
books
Page 11
An example
u For
v What are the terminators? v What are the main processes? v What are the main data flows? u Draw
Your elements
Page 12
Your DFD
meaningful names u Number the processes u Redraw the DFD as many times as necessary for aesthetics u Avoid overly complex DFDs
v v
Fit on one A4 page approximately 6 processes and related data stores and terminators
Page 13
Guidelines (2)
u Make
v v v v v
sure the DFD is internally consistent and consistent with any associated DFDs
Avoid infinite sinks - processes with inputs but no outputs Avoid spontaneous generation processes - processes with outputs but no inputs (Possible exception is a random number generator) Beware of unlabelled flows and processes Beware read-only/write-only stores Make sure that incoming and outgoing flows from the DFD match those on the DFD at the level above
Real-time systems need a means to model control (signals/interrupts) Shown with dashed lines and circles A control flow can be regarded as a binary signal - does not carry value-bearing data Used to trigger/wake-up a dormant process Internal behaviour of a control process described by a state-transition diagram Generally one control process in a DFD inputs and outputs of control process consist only of control flows
u u u
u u
Page 14
Example
satellite signal
satellite data
radar data
Doom Example
Game Details
Administer Game
Page 15
Leveled DFDs
u Most
DFD
u Break
each process down into sub-processes u Numbering of processes indicates their parents process, and thus their position in the hierarchy of levelled DFDs
Page 16
parts of the system may not need the same numbers of levels u Levels must be consistent with each other
v
Data flows coming into and going out of a process at one level must correspond to the data flows coming into and out of the entire figure at the next lower level - this is known as balancing
Balanced DFDs
Page 17
An Unbalanced DFD
Page 18
References
u Yourdon,
Page 19