Professional Documents
Culture Documents
Lec4 5elh
Lec4 5elh
The system entities and their attributes. The events which affect one or more of the system entities during their lifetime in the system. A basic notation for describing graphically the chronological sequence in which the events and event sub structures may occur.
1
BIRTH EVENT
DEATH EVENTS
ITERATION * OF EVENTS
Figure One Structure of an ELH Diagram The general structure of an ELH as shown in figure one shows that there exist three fundamental event types:
The corresponding effects of these are that they cause an occurrence of the entity to be:
Created by the system. Deleted by the system. Modified in terms of changes to its attribute values.
Thus the initial questions to ask when attempting to identify life history events are:
How does the system get to know about this entity? Why does it leave the system? What causes changes to its attributes?
In figure one Birth event, Iteration of events and Death event are all leaf nodes, Middle life events is an intermediate node. The root of the tree gives the name of the entity whose life we wish to analyse. An ELH diagram is constructed for each entity in the ER diagram.
2
The passage of time is assumed to be a uniform flow from left to right of the diagram. At time zero in the life of an entity the system gets to know about it by virtue of the arrival of one (or generally one of a set) of system events resulting in the creation of an occurrence of the entity in the system. The middle life, the period between birth and death, is typically a set of recurring or iterating events causing changes to the entity. This period represents the majority of the life of the entity in the system, as such this part of the diagram can get quite complex. Eventually, the life is terminated by the arrival of a 'death' event causing that entity occurrence to be deleted and removed from the system.
2 ELH Notation
The basic notation of life histories is used after event identification to record graphically the sequence in which events and event sub-structures may legally occur. No attempt is made to show how we recognise events - this task having been attempted before the charting commences. The number of distinct symbols for initial ELH work is limited to only three, which together with the convention for representing the passage of time, complete the notation. The symbols are:
Entity names, group headings and events. * 0 Event repetition or iteration. A selection between two or more events.
2.2.1
Event Sequence
A sequence is represented by a series of boxes reading from left to right as shown in figure two.
ENTITY X
Figure Two Event Sequence The box labelled A will always be the first to occur, followed by B which in turn is followed by C then D. This is the only possible sequence. Although the sequence may be thought of as a progression through time, there is no indication of the time intervals between the boxes within a sequence. These could span minutes, hours, days, or years. 2.2.2 Event Selection
A selection defines a number of effects or nodes that are alternatives to one another at a particular point in the ELH. Note that one, and only one, of two or more possible events will occur at a particular time in a sequence. A selection is represented by a set of boxes with circles in the top right corners as shown in figure three.
ENTITY X
Figure Three Event Selection As node A is at the beginning of the ELH, this diagram shows that an occurrence of entity X must be created by only one of three events: E, F or G.
2.2 3
Event Iteration
An iteration is where an effect or node may be repeated any number of times at the same point within an ELH. A restriction upon the iteration is that each occurrence of the iteration must be complete before the next begins. This is most relevant where a node is being repeated. An iteration is represented by an asterisk in the top right-hand corner of a box as shown in figure four.
ENTITY X
Figure Four Event Iteration After entity X has been created by E, F or G, the event H may affect the entity any number of times. Here it is important to note that 'any number of times' includes none, so an iteration is another way of showing that something may or may not occur.
Account Opened
Account Life
Account Closure
Account Deletion
Transaction
Pay Deposit
Direct Deposit
Cheque Cashed
Figure Five ELH for Bank Account (Cash & Grabb Bank)
This ELH shows that the first event to affect the entity Bank Account will be Account Opened for all occurrences. Next, the account has a life which is a series of transactions. Each Transaction is one of: a Pay Deposit, a Direct Deposit, or a Cheque Cashed. After an undefined number of Transactions have taken place, the Account will be closed and finally deleted.
Booking Creation
Driver Allocation
Mid Life
Booking Finalised
End
Receipt of o Request
Vehicle o Relocation 3
Driver o Allocation 4
Agency o Allocation 5
Amendment
Booking o Cancellation 8
o Hire Period
Booking o Archive
Customer o Archive
Booking Request 1
Booking Confirmed 2
Booking Amendment 6
Booking Confirmed 7
Vehicle Departure 9
Possible Write-off
Invoice Issued 12
Vehicle o Return 10
Figure Six The Booking ELH with Partial State Indicators (Source: Ashworth & Goodland, 1990) The numbers underneath the effect boxes show the value that the state indicator has been set to after the event has finished affecting the entity occurrence. For example, after the occurrence has been created by the Booking Request event, the state indicator is set to the value '1'. Therefore, if we find that the state indicator of a Booking occurrence is '1', we know that it has been created but has not yet been confirmed. The state indicator values can be used to help in determining whether or not we can allow an event to affect an entity. If the state indicator is not equal to '1', the Booking
7
Confirmed event cannot be allowed to affect this entity. For each effect box on the ELH, we can define a set of values of the state indicator that are valid before the event can be allowed to affect the entity. These are added to the diagram in front of the 'set to' value, separated by a '/'. If there is more than one 'valid previous' value, these are separated by commas. If the 'set to' value of the state indicator is '4' and the 'valid previous' values are either '2' or '3', then the set of values shown underneath the box will be 2, 3/4. The Booking ELH now looks like figure seven.
Booking
Booking Creation
Driver Allocation
Mid Life
Booking Finalised
End
Receipt of o Request
Amendment
o Hire Period
Possible Write-off
Figure Seven The Booking ELH with State Indicators (Source: Ashworth & Goodland, 1990) The state indicator values depend entirely upon the structure of the ELH:
Creation effects have a null valid previous value because the state indicator does not exist before the creation of the event. Where there is a selection, all effects that are alternatives to one another have the same set of valid previous state indicator values as shown by the Driver Allocation and Agency Allocation both having the valid previous values of 2 and 3. Where there is an iteration, the value set by the repeating effect will also be included as one of the valid previous values for that effect. This is shown by the fact that one of the valid previous values for the Booking Amendment effect is '7' which is the value set by the subsequent Booking Confirmed effect.
Source of State Indicators' for Figure Seven State Explanation Indicator -/1 Just beginning
8
Sequence (Booking Request & Booking Confirmation) Most recent state 1 Selection (Receipt of Request & Vehicle Relocation) If Vehicle Relocation selected then Just Beginning Selection (Receipt of Request & Vehicle Relocation) If Receipt of Request 2 If Vehicle Relocation 3 Selection (Driver Allocation & Agency Allocation) So identical Most recent state (Driver Allocation or Agency Allocation) 4 5 Because of iteration loop may have been done once, so most recent state is 7 (i.e. sequence Booking Amendment & Booking Confirmed) Sequence (Booking Amendment & Booking Confirmed) Most recent state 6 Most recent state from iteration sequence is 7 Iteration may occur zero or more times Selection (Driver Allocation & Agency Allocation) 4 5 Selection (Booking Cancellation & Hire Period) So identical Sequence (Vehicle Departure, Possible Write-off & Invoice Issued) Most recent state 9 Selection (Vehicle Return & Vehicle Written Off) So identical Most recent state from Selection Vehicle Return 10 Vehicle Written Off 11 Hyphen represents death Most recent state Invoice Issued 12 Selection (Booking Cancellation & Hire Period) 8
2,3/5 4,5,7/6
6/7 4,5,7/8
8,12/-
The parallel life indicates that transactions and overdrafts can occur at the same time..
10
The Q1 indicates the points at which the diagram is left and the R1 where it is rejoined. There may be more than one quit and resume on a diagram hence the number following the letter. If it is possible to quit from anywhere on a diagram a separate diagram can be created for the resume section.
The entity/event matrix shows how many times an event can occur (1, many or none). From this the ELH can be drawn.
11
12
For more information on state indicators read the Goodland and Slater recommend reading (pp.329-341).
13