8/17/2019 Temporal Databases (1)
1/23
From Handbook of TemporalReasoning in Articial Intelligence
By Jan Chomicki & David Toman
Temporal Databases
Presented by Leila Jalali
CS224 presentation
8/17/2019 Temporal Databases (1)
2/23
Temporal databases
Some data may be inherently historicale.g., medical or jdicial records
Temporal databases pro!ide a niform and systematic "ay ofdealing "ith historical data
#onsiderable e$ort has been e%pended on the de!elopment
of temporal databases and &ery langages T'el (Snodgrass)*+, TS'- (Snodgrass/+, S'0Temporal
(Snodgrass1+
─ 2t none of them has been adopted as the standard lan!ae o" temporaldatabases in practice
─ 3o established the theoretical "o!ndations for management of time4
dependent data ─ 3o ni!ersal consenss on ho# temporal features sho!ld be added to
the standard relational model
8/17/2019 Temporal Databases (1)
3/23
5tline
The fndamental notions of temporaldatabasesA formal fondation for temporal data models
Ho" to introdce time into the relational model
'ery langages for temporal databases Temporal e%tensions of S'
imitations of simple linearly4ordered, rst4
order temporal data models6ore comple% models of time
8/17/2019 Temporal Databases (1)
4/23
Strctre of time
They sed a !ery simple notion of time inthis chapter7a linear ordering of time instants
In addition to linear ordering, "e may
consider7Discrete or dense2onded or nbonded
Single dimensional or mlti4dimensional
inear or non4linear
8/17/2019 Temporal Databases (1)
5/23
The time stamp modelAll the tples in a relation ha!e an additional
temporal attribte8%ample7 Bookin $meetin% room% timeA tple 9m,r,t: denotes the fact that7
meetin m is in room r at time t
8/17/2019 Temporal Databases (1)
6/23
Temporal attribteSinle'dimensional( temporal relations "ere
allo"ed only a single temporal attribte)!ltiple dimensional( "ith each tple in a
relation there can be more than one temporalattribte8%ample7 t"o kinds of time are stored7 the valid
time 9"hen a particlar tple is tre: and thetransaction time 9"hen the particlar tple "asinserted0deleted in the database:
*on'+*F( can be ;attened to obtain the
8/17/2019 Temporal Databases (1)
7/23
The snapshot model
Di$erent !ie" from the time stamp model 9of thesame data:
8/17/2019 Temporal Databases (1)
8/23
Relational database histories
A history o!er a database schema p and adata domain D is a se&ence H : (Do,..., Dn)of database instances sch that7
1. all the states Do , . . . , Dn share the same
schema p and the same data domain D2. Do is the initial instance of the database
3. Di reslts from applying an pdate to Di-1,for i > <
Do D1 D2
time
…
…
8/17/2019 Temporal Databases (1)
9/23
Temporal database design
Reconstrction of ?ensen@s formal frame"ork (?ensen1+2ased on the notion of temporal "!nctional dependency7
8%ample7 the temporal =D
means e!ery meeting is held in a single room at any gi!en
timeSe!eral ad!antages7 can se the classical notions of =D
inference, dependency closre, normal forms, mi% temporaland non4temporal =Ds
A temporal =D holds in a snapshot temporal relation
D2 if the 9classical: =D holds in e!ery snapshot ofD2
8/17/2019 Temporal Databases (1)
10/23
6ltiple dimensions
Ho" to e%press t"o temporal dimensions sing
temporal =D7valid time (VT)transaction time (TT)
kind of temporal =Ds7Transaction time:Valid time:Bitemporal:
8%ample7 means the record atany time of the room booked for a meeting at any time is ni&elydetermined
Disad!antage7#an no longer talk abot, e.g., temporal keys, bt only abot !alid4time,
transaction4time or bitemporal keys The frame"ork becomes so complicated that it is nlikely to be of any
se
8/17/2019 Temporal Databases (1)
11/23
Temporal &eries
Databases are inherently rst4order strctres Temporal e%tensions rst4order logic
'ery7 sing a natral rst4order &erylangage
The ans"er7 the set of tple that make the&ery tre in the gi!en relational database
8%amples7
fnd all meetings that always meet in the sameroom
fnd all rooms in which the last meeting was D!gro"p
8/17/2019 Temporal Databases (1)
12/23
Temporal logic
Historically, many di$erent !ariants of temporallogic based on di$erent sets of connecti!esha!e been de!eloped (Babbay#C+
Some connecti!es are "ell4kno"n and ha!ebeen ni!ersally accepted7 sometime in the $"t"re
always in the $"t"re
In general any appropriate rst4order formla inthe langage of the temporal domain can besed to dene a temporal connecti!e
8/17/2019 Temporal Databases (1)
13/23
=irst order temporal logic
=irst they dene the rst order langage of Tp e%tended "ith propositional !ariables %i 7
Then se it to dene a 9&-ary : temporal
connective(an 54formla "ith e%actly one free !ariable t' and &
propositional !ariables %1,.., %& They assme ti is the only temporal !ariable in the
formla to be sbstitted for %i8%ample7 common binary temporal connecti!es7
8/17/2019 Temporal Databases (1)
14/23
Temporal connecti!es
5ther temporal connecti!es7Sometime in the ftre7
Sometime in the past7Al"ays in the ftre7Al"ays in the past73e%t7
re!ios7
8/17/2019 Temporal Databases (1)
15/23
=irst order temporal logic
7 A set of temporal connecti!es , e.g.Esince, ntilF
7 =irst order temporal logic 9=5T: o!er aschema
7
8/17/2019 Temporal Databases (1)
16/23
8%amples
Ho" to se temporal connecti!es to formlate&eries7
=ind all rooms in "hich the last meeting "as GD2grop7
=ind all meetings "ith a schedled break7
Sometime in the " !t!re(
Sometime in the past(
,l#ays in the "!t!re(
,l#ays in the past(
8/17/2019 Temporal Databases (1)
17/23
Temporal e%tensions of S'
A point based e%tension of S'7 S'0T(Toman*+
The synta% and semantics of S'0T aredened as a natral e%tension of S'An additional data type based on the point4based
temporal domain Tp 9i.e., a linearly ordered set oftime instants:
8/17/2019 Temporal Databases (1)
18/23
S'0T 8%ample
ist all meetings "ith a schedled break 7
8/17/2019 Temporal Databases (1)
19/23
8%tensions of S' based on inter!albased langage
TS'- or S'0Temporal (Snodgrass/+
Time attribtes range o!er inter!als and thebefore relationship denotes the before
relationship bet"een t"o inter!als
8/17/2019 Temporal Databases (1)
20/23
pdating temporal databases
Insertion7 a ne" booking for a room for ameeting
nit is an a%iliary table that contains a singletple
The inner &ery prodces7
Deletion7 #reating -J minte break in themiddle of meeting
8/17/2019 Temporal Databases (1)
21/23
#omple% strctre of time
#omple% strctre of time7 more comple% thanlinearly ordered sets of time instants3atral nmbers, integers, reals
Additional strctres7 drations, temporal
distances, periodic setsImpact on integrity constraints 7 more comple%
constraint dependencies
Impact on &ery langages 9se ne" predicatesymbols in the same "ay the linear order Ksymbol has been sed so far:
8/17/2019 Temporal Databases (1)
22/23
2eyondL
2eyond the rst order logic6ore e%pressi!e po"er than rst order logic
2eyond the #losed Morld Assmption#losed Morld Assmption7 temporal databases
hold complete information abot trthAn alternati!e7 to treat the relational strctres
representing temporal databases as incompletespecications and se the 5pen Morld
Assmption to ans"er &eries
8/17/2019 Temporal Databases (1)
23/23
#onclsion
-ss!es not Covered in the chapter(#onceptal 6odeling of Temporal Data
hysical Design for Temporal Databases Time Series and Temporal Data 6ining
.esearch directions that are closelyrelated to temporal data manaement(Spatio4Temporal Databases
Streaming Data 6anagement Time in Docment 6anagement and N6