Upload
aiden
View
52
Download
0
Tags:
Embed Size (px)
DESCRIPTION
System Modelling (1). Specification of individual requirements allows the construction of various kinds of system models . . Dataflow analysis. Diagrams are used to represent our picture of a system. Different approaches can focus on:-. Entity-relationship (E-R) analysis. - PowerPoint PPT Presentation
Citation preview
System Modelling (1)
Specification of individual requirements allows the construction ofvarious kinds of system models.
Diagrams are used to represent our picture of a system.
Different approaches can focus on:-
processes and the data effected by processes
data entities and the relationships between them
states a system can exhibit/show and the events that shift that system from one state to another
the sequence of events in all or part of a system (a “scenario”)
Dataflow analysis
Entity-relationship (E-R) analysis
State machine diagrams
Sequence diagrams + other diagrammatic representations used in UML
System Modelling (2) Dataflow analysis 1
A dataflow diagram (DFD) represents all or part of a system in an abstract (non-physical) way using just 4 symbols
Dataflow – data in motion. A “pipe” – unidrectional flow.
The dataflow arrow does NOT mean “Go To”
External Entity - external source or destination of system dataDatastore – data of the same type (an entity) Stationary data
or
A Process – an actvity that effects data or
System Modelling (3) Dataflow analysis 2
Dataflow
Dataflow contents e.g. amount_owing
External entity
Name of EE e.g. Supplier
Process
Process ID, e.g P1 or P2.1
Process name, e.g Verify_Pin
DatastoreDatastore ID, e.g D2
Datastore name e.g.Accounts
Dataflow analysis allows a system to be progressively “discovered” by “levelling”
System Modelling (4) Dataflow analysis 3
warehouseReorder System
Purchasing System
A context diagram puts the system in context in relation to related EE’s
High-level context diagram
System Modelling (5) Dataflow analysis 4
warehouse Process_stock_transaction
Purchasing System
inventory
P1
Produce_ReOrder_List
P2
ReOrders
D1
D2ReOrder_detail
Transaction_details
ReOrder_detail
exception_report
Level 0 DFD
System Modelling (6) Dataflow analysis 5
warehouse
Purchasing SystemProduce_
ReOrder_List
P2
inventoryD1
ReOrdersD2ReOrder_detail
trans_details
exception_report
Level 1 DFD of P1
Get_trans
P1.1 P1.2
Validate_trans
trans_details
transactionsD1
trans_details
valid_trans
stock_id,trans_qty
valid_flag,trans_qty
warehouse
reject_note
P1.3 P1.4
Update_inventory
stock_id,trans_qty
Create_reordervalid_trans
ReOrder_detail
Taking P1 to Level 1 has “exploded “ 1 process into 4 smaller ones
System Modelling (7) Dataflow analysis 6
Levelling should continue until an individualprocess need be decomposed no further – it is in a primitive form with probably no more than one dataflow output and whose logic could be described in a “short” piece of PDL
Note that if the top-level DFD had 8 processes and each of these processes was taken through 2 levels of decomposition, each yielding another 8 sub-processes, then our system would end-up with 512 primitive Processes (8 x 8 x 8)
There is no rule about how many levels are required but 2 to 3 levels is usually adequate and not all processes need to be taken down to the 3rd level.
(from Hawryszkiewycz, Systems Analysis & Design)
System Modelling (8) Entity-Relationship Modelling 1
Manager
Project
manages
[n]
1
Entity set
Entity set
Relationship set
Proj_Code
Proj_Name
Start_Date
Tot_Budget
Man_StartDate
Proj_Locn
Fin_Date. . .
RK1
RK2RK3
RK4
ABC
XYZ
IJKDEF
Loc4
Loc9
Loc5
Loc8
4000050000
70000
90000
1/10/10 30/4/11
7/8/10
1/1/11 5/7/11
9/3/11
8/9/118/9/10
Proj_Code
Man_No
Man_Budget
. . . RK13
5
5
3
RK2RK3
RK4
8000
15000
11000
32000
31/1/11
7/3/11
9/5/115/1/11
Man_No
Man_Name
Dept_ID
. . .
. . .
5
3 Merkel,A
Obama, B
FinHealth
. . .
. . .
Attributes
Separate instances (occurrences) of the entity
Separate instances (occurrences) of the relationship
Note that arelationship can have its own attributes
System Modelling (9) Entity-Relationship Modelling 2
Mapping a complete system using the E-R approach
(from Hawryszkiewycz, Systems Analysis & Design)
System Modelling (10) State Machine Models 1
A state machine diagram shows how a system responds to internal or external events.
It does not show the flow of data within the system
Often used for modelling real-time systems because these systems are often driven by stimuli from the system’s environment
Nodes represent system states
Arcs represent events that shift the system from one state to another
System Modelling (11) State Machine Models 2
A state machine diagram for a microwave oven
System Modelling (12) Sequence Diagrams 1
System Modelling (13) Sequence Diagrams 2
Several different types of diagrams are available within UML for representing different aspects of OO.
Sequence diagrams are dynamic models that show the sequenceof object interactions that take place.
A sequence diagram showing operations involved in collecting data from a weather station
The objects are:
:CommsController
:WeatherStation
:WeatherDataTime is represented vertically
Thin rectangle represents time when object is the controlling object in system
summarise (report)
System Modelling (14) Sequence Diagrams 3
1 Object that is an instance of CommsController receives a remote request to send a weather report. It acknowledges receiving this request.
2. This object sends a message to an object that is an instance of WeatherStation to create a weather report. The instance of CommsController suspends itself.
3 WeatherStation sends a message to WeatherData to summarise the weather data
4 Summary is computed and control returns to the WeatherStation object
5. The WeatherStation object sends a message to CommsController requesting it to transfer the data to the remote system. The WeatherStation object suspends itself
6. The CommsController object sends the report to the remote station, receives an acknowledgement, and then suspends itself waiting for the next request.