Post on 21-Dec-2015
TOOM: The Temporal Object Oriented Methodology
Centre de Recherche en Informatique
University of Paris I - Sorbonne
Training Session
PARIS 1SORBONNE
Patras
The TOOM methodology
Training Session
PARIS 1SORBONNE
Patras
Patras, Training Session, Page 3TOOM Methodology
PARIS 1SORBONNE
Introduction
• Objectives :specification at the analysis level of a temporal database application.
• Characteristics of a temporal database application :
– complex time management (period, interval, relative time)
– management of specific granularity of time (week, working day)
– managing past «real world» data or «database» data (Valid , Transaction time)
– exploitation of the delay of the database refreshment regarding the real world evolution (BiTemporal)
– temporal business rules & temporal constraints
– intensive exploitation of «past data»
Patras, Training Session, Page 4TOOM Methodology
PARIS 1SORBONNE
Introduction - Levels of Abstractions
Requirements
Analysis level
TOOBIS environment
TOOM model
Mapping rules
Patras, Training Session, Page 5TOOM Methodology
PARIS 1SORBONNE
Introduction - Its Characteristics
• Based on only one model
• perspectives managed :• structure : What are the pertinent information ?
Examples : Copy of a book, Loan,
• function : how are the activities modified information ?Examples : CreateCopy, ReserveCopy, BorrowCopy
• dynamic : When are the activities performed ?Examples : Availability of copy
Patras, Training Session, Page 6TOOM Methodology
PARIS 1SORBONNE
Concepts Overview
the database system
Its environment
Patras, Training Session, Page 7TOOM Methodology
PARIS 1SORBONNE
Concepts Overview - database system
the database systemstructural aspects :object class,inheritance, aggregation or association link,
attribute
Subscriber
PersonLoan Request
Copy
Book
Reservation
make
concern
concern
of
ask f
or
Patras, Training Session, Page 8TOOM Methodology
PARIS 1SORBONNE
Concepts Overview - database system
the database systemdynamic & functional aspects :interval event,
operation, condition, factor
Subscriber
PersonLoan Request
CopyReservation
create
reserve
activatec1Availability of copy
Patras, Training Session, Page 9TOOM Methodology
PARIS 1SORBONNE
Concepts Overview - Dynamic view
Object
Internal EventOperation
triggers
has a particular state change generating an event occurrence
modifies state of
Causal approach :
Patras, Training Session, Page 10
TOOM Methodology
PARIS 1SORBONNE
Concepts Overview - system environment
the database system
Its environment
Actor classes :
(1) external event : stimuli coming from the actor requirring the performance of activities on the database
(2) external operation : informational message sent by the database system to the actor
Subscriber
PersonLoan Request
CopyReservation
create
reserve
activatec1Availability of copy
(1)
(2)
subscriber actor
Patras, Training Session, Page 11
TOOM Methodology
PARIS 1SORBONNE
Concepts Overview - system environment
the database system
Its environment
Subscriber
PersonLoan Request
CopyReservation
create
reserve
activatec1
send a notification
of reservation
create
Arrival of a loan request
Remark : a subscriber acts on the system & information about him is stored in the database
Patras, Training Session, Page 12
TOOM Methodology
PARIS 1SORBONNE
Concepts Overview - system environment
the database system
Its environment
Subscriber
PersonLoan Request
CopyReservation
(1)
(2)
Actor class can represent system(1) service offered by the database & asked by the actor (external event)(2) service asked by the database & provided by the actor (external operation)A Library Network
Patras, Training Session, Page 13
TOOM Methodology
PARIS 1SORBONNE
Concepts Overview - system environment
the database system
Its environment
Subscriber
PersonLoan Request
CopyReservation
A Library Network
send a notification
of reservation
create
Arrival of a loan request
create
reserve
c1activate
internal event : based on the last state change of the object
Patras, Training Session, Page 14
TOOM Methodology
PARIS 1SORBONNE
Concepts Overview - system environment
Its environment
Calendar class :temporal event : temporal condition satisfied by the current state of the clock requiring the performance of activities on the database
absolute : the 25th of december 1996periodic : each christmas dayrelative to event : 1 month after ev1.timerelative to object : 1 week before the end of loan
SubscriberLoan Request
Copy
Reservation
cancel
cancelavailable
2 weeks after thenotification
Patras, Training Session, Page 15
TOOM Methodology
PARIS 1SORBONNE
Concepts Presentation - structure
• Object class :• persistent & relevant information of the application
• Examples : Subscriber, Loan Request, Copy, Book
• A persistent collection is attached to an object class
Object classSnapshot class
Temporal class
Patras, Training Session, Page 16
TOOM Methodology
PARIS 1SORBONNE
Concepts Presentation - Calendar Class Library
• a name
• an origin
• a basic unit (granule)
• an ordered set of granules
• conversions operations
• translation operations
class calendar Gregorianorigin : "01/01/0001:00:00:00"granules :second : {1 chronon, chronon=1second}minute : {minute_second(), second_minute()}hour : {60 minutes, minute=1/60hour}day : {24 hours, hour=1/24day}month : {month_day(),day_month()}year : {12 months, mois=1/12 year}operations :instant<Gregorian, *> operator+ (instant<Gregorian, *>, interval<Gregorian, *>)instant<Gregorian, *> operator+ (interval<Gregorian, *>, instant<Gregorian, *>)interval<Gregorian, *> operator- (instant<Gregorian, *>, instant<Gregorian, *>)external formats :TimeZone= "instant<Gregorian, hour>, TZ, DST" {instant<Gregorian, hour> input(TimeZone), TimeZone output(instant<Gregorian, hour>)}EndClass
Patras, Training Session, Page 17
TOOM Methodology
PARIS 1SORBONNE
Concepts Presentation - Calendar Class Library
• User defined time calendars
Calendar class ObservationCalendar origin="1/01/01/0000" basic unit=hour of Gregorian calendar granules turn : { 6 basic unit, basic unit = 6 turns} day : { 4 turns, turn=1/4 day} month : { irregular} year : {12 months, month=1/12 year} operations instant<ObservationCalendar, *> operator + (instant<ObservationCalendar, *>, interval<ObservationCalendar, *>) interval<ObservationCalendar, *> operator + (instant<ObservationCalendar, *>, instant<ObservationCalendar, *>) instant<ObservationCalendar, *> operator - (instant<ObservationCalendar, *>, instant<ObservationCalendar, *>) instant <Gregorian, *> conversion (<instant<ObservationCalendar>) instant ObservationCalendar *> conversion (<instant<Gregorian>) EndClass
Patras, Training Session, Page 18
TOOM Methodology
PARIS 1SORBONNE
Concepts Presentation - Snapshot class
• class without time management
• a snapshot class is equivalent to a OOM object class
«only the current state exists in the database»
Basic class : COPYproperties reference : string lifespan : PERIOD<Gregorian, Day> state : copy_state loans : inverse (zeromany, LOAN.copy) notices : inverse (zeromany, NOTICE.copy)
constraints unique(Copies,reference)
operations COPY purchase(c:structure(COPY)) type create reservation() type update availability() type update check out() type update wear out() type update loss() type update deletion() type update
queries boolean $exist_copy_available()
internal-events availability of copy
• Example of temporal domains–Birthday: Instant-A<Gregorian,Day>–Loan period: Period<Gregorian,Day>–Task effort: Interval<WorkingDay,Hour>
Patras, Training Session, Page 19
TOOM Methodology
PARIS 1SORBONNE
Concepts Presentation - Temporal Class
• Class managing valid or/and transaction time(s)
• the time management is available for all the properties of this class
transaction timenone state history
none no time management(snapshot class)
last database state database history
validtime
state last valid state last bi-temporal state database historyand last valid state
history valid history valid history and itslast database state
bi-temporal history
Patras, Training Session, Page 20
TOOM Methodology
PARIS 1SORBONNE
Concepts Presentation - Temporal Class (example)
Employee
hasBasic class
Function
Basic class
state historyvalid project leader,
VT[95-12-20,forever)programmer, VT[94-12-12,95-12-20)project leader, VT[95-12-20,forever)
database project leader,TT[96-01-01 15:56:50,'now')
programmer, TT[95-01-01 9:20:15,96-01-01 15:56:50)project leader, TT[96-01-01 15:56:50,'now')
bi-temporal project leader,VT[95-12-20,forever),TT[96-01-01 15:56:50,'now')
programmer, VT[94-12-12,forever), TT[95-01-01 9:20:15,96-01-0115:56:50)programmer, VT[94-12-12,95-12-20), TT[96-01-01 15:56:50,'now')project leader, VT[95-12-20,forever), TT[96-01-01 15:56:50,'now')
Patras, Training Session, Page 21
TOOM Methodology
PARIS 1SORBONNE
Concepts Presentation - Temporal Class (way of using)
Basic class
Basic class
FamilyStatus
Basic class
assignment
Basic class
function
Basic class
salary
Basic class
State<VT>
History<VT>
History<VT>
History<VT,TT>
Person
Employee
Basic class
Employee
employeeNumber,nameaddressfamilyStatusSalaryfunction
Basic class
Department
Patras, Training Session, Page 22
TOOM Methodology
PARIS 1SORBONNE
Concepts Presentation - Temporal Class (Valid time definition)
– nature of the valid time (instant or period)
– granularity of the valid time (granule, calendar)
– type of management (state or history)
– completeness of the history (complete or partial)
– extrapolation function (yes or not)
Employee
hasBasic class
Function
Basic class
VT<period,Gregorian,Day,history,complete>
Patient
hasBasic class
weight
Basic class
VT<instant,Gregorian,Day,history,partial>
VT=date of the visit
Patras, Training Session, Page 23
TOOM Methodology
PARIS 1SORBONNE
Concepts Presentation - Temporal Class (Transaction time definition)
– type of management (state or history)
Patient
hasBasic class
weight
Basic class
Patient
hasBasic class
weight
Basic class
state<TT> History<TT>
weight TT
70 TT [97/04/8 10 :23 :22, 97/04/15 12 :17 :54)
78 TT [97/04/15 12 :17 :54, 97/04/22 14 :20 :58)
69 TT [97/04/22 14 :20 :58, ‘now’)
weight TT
69 TT [97/04/22 14 :20 :58, ‘now’)
Patras, Training Session, Page 24
TOOM Methodology
PARIS 1SORBONNE
Concepts Presentation - Temporal Class (Bi-temporal definition)
Patient
hasBasic class
weight
Basic classVT<instant, Gregorian Day,history, partial,extrapolation>TT <history>
weight Valid time Transaction time
70 VT 97/03/8 TT [97/04/8 10 :23 :22, 97/04/15 12 :17 :54)
70 VT 97/03/8 TT [97/04/15 12 :17 :54, ‘now’)
69 VT 97/03/15 TT [97/04/22 14 :20 :58, ‘now’)
Patras, Training Session, Page 25
TOOM Methodology
PARIS 1SORBONNE
Concepts Presentation - Events on temporal class
• internal event on history :– Three revisions of loan in two years, (based on the state of the
history revisions)
– Third salary update in one year (based on the history salary of an employee)
Patras, Training Session, Page 26
TOOM Methodology
PARIS 1SORBONNE
Conclusion
• Methodology based on temporal aspects
• Guidelines to the TOOBIS environment (TOODBMS, TODL, TOQL)
• Compliant to UML