wultiple glendr upp ort
for gonventionl htse wngement
ystems
I
wihel hF o o
P
ihrd F no dgrss
WPEHU
perury PVD IWWP
estrt
e prop ose solution to the prolem of supp orting timeEstmp ttriute domin in
onventionl reltionl dtse mngement systemsF sn ontrst to existing prop oslsD
whih ssume tht single interprettion of time is suient for ll users nd pplitionsD
we develop generl solution tht supp orts multiple interprettions of timeF he min
onept underlying this prop osl is tht the universl sp ets of time re seprted from
the user dep endent sp etsD t oth the query lnguge nd the rhiteturl levelsF he
user dep endent sp ets re enpsulted in lendrs nd lendri systemsD eh of whih
re extendile y lo l site p ersonnelF sn this wyDtheville time supp ort n e
ustomized to lo l requirementsF e riey desri e mo ditions to vP tht supp ort
multiple lendrs nd lendri systemsF hese mo ditions redue the omplexityof
the lnguge while simultneously inresing its expressive p owerF pinllyD we desri e
set of to ols tht id in the genertion of lendrs nd lendri systemsF his work
n e viewed s limited ut prtil pplition of reserh into extensile dtse
mngement systemsF
I
heprtment of gomputer iene
niversity of erizon
usonD e VSUPI
soodsFrizonFedu
P
heprtment of gomputer iene
niversity of erizon
usonD e VSUPI rtsdsFrizonFedu
wultiple glendr upp ort
for gonventionl htse wngement ystems I
gontents
I sntro dution I
P hysil imeD glendrsD nd glendri ystems I
PFI hysil ime XX XXX XXX XXX XX XXX XXX XXX XXX XXX XX XXX XXX X I
PFP glendrs X XXX XXX XXX XXX XX XXX XXX XXX XXX XXX XX XXX XXX X P
PFQ glendri ystems XX XXX XXX XX XXX XXX XXX XXX XXX XX XXX XXX X Q
PFR ummry X XXX XXX XXX XXX XX XXX XXX XXX XXX XXX XX XXX XXX X R
Q v vnguge wo diti ons R
QFI ht yp es XXX XXX XXX XXX XX XXX XXX XXX XXX XXX XX XXX XXX X R
QFP glendri ystem nd rop erty eletion XXX XXX XXX XXX XX XXX XXX X T
QFPFI glendri ystem p eition XX XXX XXX XXX XXX XX XXX XXX X T
QFPFP rop erty p eition XX XX XXX XXX XXX XXX XXX XX XXX XXX X U
QFQ fuiltEin puntions XX XXX XXX XX XXX XXX XXX XXX XXX XX XXX XXX X V
QFR erithmeti ixpressions XX XXX XX XXX XXX XXX XXX XXX XX XXX XXX X V
QFS gomprison ixpressions XX XXX XX XXX XXX XXX XXX XXX XX XXX XXX X V
QFT eggregte puntions X XXX XXX XX XXX XXX XXX XXX XXX XX XXX XXX X W
QFU ummry X XXX XXX XXX XXX XX XXX XXX XXX XXX XXX XX XXX XXX X W
R ystem erhiteture W
RFI yverview XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX W
RFP imeEstmp eh upp ort X XXX XX XXX XXX XXX XXX XXX XX XXX XXX X II
RFQ niform glendri upp ort XXX XX XXX XXX XXX XXX XXX XX XXX XXX X II
RFR uery ro essing usystem XX XX XXX XXX XXX XXX XXX XX XXX XXX X IP
RFRFI emnti enlysis X XXX XX XXX XXX XXX XXX XXX XX XXX XXX X IQ
RFRFP unEtime ystem XX XXX XX XXX XXX XXX XXX XXX XX XXX XXX X IQ
RFS glendri ystem ht trutures X XXX XXX XXX XXX XXX XX XXX XXX X IR
RFT glendrs XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX IR
RFU qenerting glendrs nd glendri ystems X XXX XXX XXX XX XXX XXX X IU
RFV erhiteturl smplitions of ixtensiility XXX XXX XXX XXX XX XXX XXX X IW
S elted ork IW
T gonlusions nd puture ork PI
U eknowledgements PP
V filiogrphy PP i
I sntro dution
he vgunit workshop on future reserh in dtse systems identied the need for dtse
mngement systems to supp ort time il ershtz et lF IWWHF he workshop rep ort notes
tht no onsensus exists in supp ort of ny prtiulr temp orl mo delY the very nture of time
implies dierent interprettions dep endin g on the user9s p ersp etiveF
sn this pp erD we prop ose solution to the prolem of supp orting timeEstmp ttriute
domin in onventionl reltionl dtse mngement systems @hfwsAF yur motivtion
is tht timeD p erhps more thn ny other dt dominD is su jet to userEinterprettion|the
hfw must e ple of ommo dting the interprettion of time pplil e to user or
siteF gonventionl reltionl dtse mngement systems do not ddress this prolem t llY
insted they imp ose single interprettion of time t oth the query lnguge nd rhiteturl
levelsF e present generl solution thtD in eetD interntionlizes the timeEstmp ttriute
domin provided y hfwF his work is lso pplile to time representtion in temp orl
dtse mngement systems no dgrss 8 ehn IWVTF
he fo us of this pp er is on rhiteturl requirements for time vlue supp ortD though
we lso ddress query lnguge issuesF e present summry of mo ditions to v welton
IWWHto supp ort temp orl dtD nd then develop n underlyin g system rhitetureF he min
onept underlying the design is the seprtion of the universl sp ets of time from those tht
re user dep endentF he supp ort for these sp ets of time is prtitioned t oth the query
lnguge nd the rhiteturl levelsF his seprtion llows ustomiztion of userEdep ende nt
time sp ets y lo l site p ersonnelF
he prop osl employs limited notion of extensiilityF erhiteturl supp ort is provided
for ddition nd mo dition of the dtse mngement system omp onents tht imp ose
prtiulr interprettion on temp orl vluesF e prop ose limitedD ut prtilD pplition
of the tehniques prop osed for extensile dtse mngement systems ftory et lF IWVVD
grey 8 rs IWWHD grey et lF IWVTD rs et lF IWWHD tonerker et lF IWWHF yur
pproh is relted to tht of extensile systems supp orting strt dt typ es @ehsAF
roweverD we elieve tht ehs lone re indequte for the temp orl extensions develop ed
hereD nd we rgue why in etion SF
he pp er is orgnized s followsF etion P disusses generl strtions used to deE
sri e time nd its use in so ietyD motivting the si dt mo del we prop oseF etion Q
riey desri es v onstruts supp orting the onepts of etion PF he primry fo us of
this pp erD system rhiteture supp orting the prop osed lnguge feturesD is desri ed in
etion RF he nl two setions disuss res of relted reserhD summrize the ontriutions
of this pp erD nd identify res of future reserhF
P hysil imeD glendrsD nd glendri ystems
his setion desri es the si mo del of time we prop oseF e rst exmine how time is
represented internlly within the hfwD nd then intro due the onepts of lendrs nd
lendri systemsF
PFI hysil ime
e ssume the ontinuous timeEline is quntized into hronons of xed durtionD nd the
grnulrity of time vlue t the query lnguge level is extly one hrononF he set of I
hronons form niteD linerD nd totllyEordered set of time vlues with dened identity
reltionF
sn physil reltionD time vlues re represented y timeEstmpsDnumerivlues repreE
senting hrononsF yp ertions on time vlues re p erformed y exeuting nlogous op ertions
on timeEstmps orresp onding to those temp orl vluesF he ext semntis of this internl
representtion re desri ed elsewhere hyreson 8no dgrss IWWPD ut the detils re not
relevnt hereF
e note tht timeEstmpsD while hving preise semntis tied to physil lo ksD re
indep end ent of n interprettion implied y user p ersp etiveF uh n interprettionD of
whih there ould e severlD re provided y lendrsD whih we now desri eF
PFP glendrs
e lendr is humn strtion of the physil timeElineF yne lendr fmilir to mny
is the qregorin lendrD sed on the rottion of the irth on its xis nd its revolution
round the unF ome western ultures hve used the qregorin lendr sine the lte ITth
entury to mesure the pssge of timeF es nother exmpleD sslmis generlly use lunr
lendrD sed on the mount of time required for the wo on to rotte round the irthF
he qregorin nd lunr lendrs re exmples of dily nd monthly lendrsD utD
in generlD lendr n mesure time using ny wellEdened time unitF por exmpleD n
employee time rd n e regrded s lendr whih mesures time in eight hour inrements
nd is only dened for ve dys of eh weekF e note tht mny dierent lendrs existD
nd tht no lendr is inherently etter4 thn notherY the vlue of prtiulr lendr is
wholly determined y the p opultion tht uses itF le I lists severl exmple lendrsF
hesription
glendr
evised universl o ordinted time
gP
gommon western solr with months
qregorin
gommon estern lunr
vunr
estern solr with yers nd dys
tulin
PTH dy yles
wesoEmerin
er onsists of semesters
edemi
pinnil yer egins t xew er
gommon pisl
pinnil yer strts in pll
edemi pisl
pinnil yer strts in yto er
pederl pisl
V hour dys nd S dy weeks
ime rd
PR hour dy divided into three shifts of V hours
QEshift ork hy
ime sed on rdiotive dey
gr onEIR
ime sed on geologi pro esses
qeologi
le IX gommon glendrs
e emphsize tht the usge of lendr dep ends on the ulturlD leglD nd even usiE
ness orienttion of the userF por exmpleD usiness enterprises generlly p erform ounting
reltive to some sl yerF roweverD the denition of sl yer vries dep ending on the
enterpriseF niversities my hve their sl lendr oinide with the demi yer in orE
der to simplify ountingF yther institutions use the more ommon hlfEyerly or qurterly
denitions of sl yerF P
glendrs hvetwo typ es of hrteristisD intrinsi hrteristis tht dene the uniE
versl qulities of the lendrD nd extrinsi hrteristis tht dene the userEdep ende nt or
vrying qulities of the lendrF
he intrinsi hrteristis of lendr dene the intrinsi semntis of the lendr
or omp onents tht dep end diretly on suh semntisF por exmpleD the durtion of time
units @eFgFD weekD monthAnd their interreltionships re intrinsi omp onents of lendrF
puntions p erforming lendr dened omputtions re lso intrinsiF por exmpleD in the
qregorin lendr one ould onstrut eld extrtion funtionD month nme ofD tht returns
the nme of the month of given dteF imilrlyD funtion hrvest moon dte ould e
used to ompute the dte of the hrvest mo on in given yerF
he extrinsi hrteristisD termed propertiesD of lendr vry dep endi ng on the
orienttion of the userD s disussed oveF e typil lendr prop erty is the lnguge in
whih time vlues re expressedF por exmpleD in the qregorin lendr inglish is used to
express dtes in the nited ttesD nd prenh is used to express dtes in prneF yther
prop erties inlude the formt of time onstnts @tnury ID IWHH4D nd I tnury IWHH4
denote the sme qregorin dteD ut in dierent formtsAD nd lo l djustments to time suh
s dylight svings time in the nited ttesF
rop ertiesD in onjuntion with lendrsD re ruil to supp orting interntionl use of
the hfw @FfF higitl IWWIAF e hve identied fourteen prop erties tht re universl
to ll lendrs o o et lF IWWPF vo l dpttion of lendr prop erties is supp orted y
dening reltionsD termed property tlesF eny tle used s prop erty tle must hvetwo
ttriutesD property nd vlueDwherevlue denes the nmed propertyF foth the prop erty nd
vlue ttriutes must hve the v typ e for stringF por exmpleD to ommo dte timezone
lultions one ould sp eify the lo tion of interest s prop ertyF sing supp orting inforE
mtionD suh s timezone displementsD susequent time lultions n e done reltive to
this lo tionF e defult prop erty tle is provided y the implementtionF he prop erties
ontined in the defult prop erty tle re tive until overridden y user dened prop erty
tleF
e hve exhiited exmples of mny lendrsD nd desri ed how prtiulr lendr
n vrying dep ending on its prop ertiesF e emphsize tht dtse mngement systems
ttempting to supp ort time vlues must e ple of supp orting ny notion of time tht
is of interest to the user p opultionF e ddress this prolem y llowing lendr to e
prmetrized y its prop erties nd y supp orting multiple lendrs within the hfwF
PFQ glendri ystems
e lendri system denes the set of time vlues for n enterpriseY it is the query lnguge
strtion of the physil timeElineF e lendri system is dened s olletion of lendrs
where eh lendr is dened over nonEoverlpping p erio ds of timeD termed epohsF st is
p ossileD nd likelyD tht lendri system hs gps in its timeEline tht re not overed y
ny lendrF
pigure I illustrtes single lendri systemD the ussin lendri systemF he gure
shows the physil time line divided into sequene of ep o hsF sn the gureD the physil
timeEline is not shown to sleF
sn prehistori ep o hsD the qeologi lendr nd gr onEIR dting @nother form of
lendrAre used to mesure timeF vterD during the omn empireD the lunr lendr
develop ed y the omn repuli ws usedF op e tuliusD in the Ist gentury fFgFD intro dued Q 70,000 B.C. 600 B.C. 100 B.C.1917 A.D. 1929 A.D. 1931 A.D.
Geologic Carbon-14 Roman Julian Gregorian Communist Gregorian
Calendar Calendar Calendar Calendar Calendar Calendar Calendar
pigure IX he ussin glendri ystem
solr lendrD the tulin lendrF his lendr ws in use until the IWIU folshevik
revolution when the qregorin lendrD rst intro dued y op e qregory s s s in ISUPD ws
doptedF sn IWPWD the oviets intro dued ontinuous shedule workweeksed on four dys
of workfollowed y one dy of restD in n ttempt to rek trdition with the seven dy weekF
his new lendrD the gommunist lendrD hd the filing tht only eighty p erent of the
workfore ws tive on ny dy D nd ws ndoned fter only two yers in fvor of the
qregorin lendrD whih is still in use to dyF
PFR ummry
glendrs nd lendri system dene time t the query lnguge levelF wultiple lendrs nd
lendri systems llow supp ort for mny dierent notions of timeF sn onjuntion with lenE
dr prop ertiesD they provide n imp ortnt step towrd generliztion nd interntionliztion
of this limited ut imp ortnt omp onent of the hfwF
Q v vnguge wo ditions
his setion desri es lendr indep enden t lnguge mo ditions to vF e dd dt
typ es nd op ertions to v tht do not dep end on the semntis of prtiulr lendrF sn
dditionD we desri e lnguge onstruts for lendri system nd prop erty tle sp eitionF
he presenttion is signintly ridged desription of the query lnguge mo ditions
we prop ose elsewhere o o 8 no dgrss IWWIF
he sp ei lnguge eing mo died is vPD the most reent stndrdiztion of the
v lngugeD urrently under developmentF vP extended the previous v stndrd with
severl new fetures inludi ng time dt typ es welton IWWHF e elimin te the temp orl
extensions prop osed in vP nd inorp orte our ownF @st n e shown tht our prop osl
susumes the temp orl extensions we repleFA e do not ssume detiled knowledge of vPD
only tht the reder is fmilir with the generl onepts of vF sn this pp erD referene
to vP4 mens the vP lngugeD while referene to v4 implies generi version of
the lngugeF
nless sp eill y notedD we use the fmilir qregorin lendr in exmplesD nd rely
on the reder9s intuition until the neessry lnguge onstruts re denedF
QFI ht yp es
yur desire ws to develop temp orl dt typ es with rih semntis tht pture the intuitive
nd fmilir onepts of time whileD t the sme timeD minimizin g impt on the lnguge
s wholeF here re three imp ortnt temp orl notionsD moments in timeD p erio ds in timeD
nd durtions of timeF e dene three new timeEoriented dt typ esD eventsD intervlsD nd R
spns orresp onding to eh of these notionsD resp etivelyF ixmple queries involving these
dt typ es re shown in le PF
ixmple uery
ht ype
hen ws id hiredc4
hid id work for elie during IWSTc4
intervl
row long ws id in sho olc4
spn
le PX ixmples of imeEyriented ueries
en event is n isolted instnt in timeY it is sid to o ur during some hronon tFpor
exmpleD if the implementtion xes the grnulrity of hronon s one seondD then n event
is known to hpp en during prtiulr seondD nd two events whih o ur during single
seond re ssumed to hpp en simultneouslyF
p eition of event vlues is done with stringElike nottionF en event onstnt
is synttilly delimited y vertil rs @|4AF he string of hrters ontined within
the rs is interpreted to e n event onstnt dened y lendrF es exmples of event
onstntsD |widnight heemer QID IWWI| is vlid event onstnt in the qregorin lE
endrD nd |unset mdn ID IVUP| is vlid event onstnt in the sslmi lendrF
gonverselyD |heemer QID IWWI| is not vlid event onstnt sine it do es not fll within
single hrononF
en intervl onstnt is synttilly delimited y squre rkets @4AF he string
of hrters ontined within the squre rkets is interpreted to e n intervl onstntF
por exmpleD IUUTD tuly IUUTD tuly RD IUUTD |xoon tuly QD IUUT|D|xoon tuly
RD IUUT| nd xoon UGQGIUUT to xoon UGRGIUUT re vlid intervl onstntsF
e note tht intervl onstnts re not restrited to the form strting eventD endE
ing eventF sn the previous exmplesD the formt of the intervl vlues enlosed within the
squre rkets vries onsiderlyF e llow intervl vlues to e ny ritrry string of
hrtersF he mening of tht string of hrters is determined y lendrF ine input
nd output formts re lendr prop ertiesD the interprettion nd disply of ritrry strings
s intervl onstnts n e supp ortedF
e spn denes durtion of timeD tht isD p erio d of time with no sp ei strting
or ending hrononsF por exmpleD the spn one week is known to hve durtion of seven
dysD ut one week n refer to ny lo k of seven onseutive dysF e spn n e either
p ositive or negtive durtion of timeF pn onstnts re synttilly delimited y p erent
signs @74AF por exmpleD 7I week7D 7P yers7 nd 7EIW seonds7 re vlid spn onstntsF
he durtion of spn is either ontext dep enden t or ontext indep en dentF e xedspn
represents the sme durtion indep end ent of its usgeF gonverselyD the durtion represented
y vrile spn dep ends on the ontext in whih it pp ersF por exmpleD the onstnt
7epril7 represents xed spn sine the month of epril lwys ontins thirtyEone dysF
en exmple vrile spnD in the qregorin lendrD is the onstnt 7I month7 whih n
represent nywhere from twentyEeight to thirtyEone dysD dep endin g on ontextF
rile spns provide onveniene ut n use semnti diultie s if not refully
designedF gonsider the following expression hte IWVVF
|IPXHH w wy QID IWWI| C 7I month7
he result of the expression is n eventF sfD s one might exp etD the expression omputes the S
lst dy of tune then the result returned is |IPXHH w tune QHD IWWI| sine tune hs only
thirty dysF roweverD onsider this expressionF
@|IPXHH w wy QID IWWI| C 7I month7A E 7I month7
essuming tht the ddition op ertion still returns the vlue |IPXHH w tune QHD IWWI|D
sutrting 7I month7 n return either |IPXHH w wy QID IWWI| or |IPXHH w wy QHD
IWWI| dep ending on the durtion of 7I month7F foth interprettions re vlidD nd neither
should e exluded y the hfwF
he mening of 7I month7 is sp ei to the lendr tht denes itF st is left to the
lendr to sp eify the pproprite semntisF qenerlity nd usility re inresed sine the
lendr is free to sri e ny pproprite meningF
e note tht xed spns nd vrile spns re not dierent dt typ esY they p ossess
the ext sme semnti prop ertiesF hey dier only in how their menings re ssigned nd
omputedD nd these re lendr sp ei issuesF
es n exmple of using the temp orl dt typ esD onsider n employment dtse onE
tining p ersonnel informtionF e would like to store informtion suh s the nme nd idenE
tition num er of the employeeD his or her irthdy nd geD nd the p erio d of tht p erson9s
employmentF e reltion with the shem employee@nmeD idD irthdyD geD when employedA
n e used to store the employee reordsF he v sttement to rete se reltion with
this shem is shown elowF
rete tle employee @nme hrter @PHAD idhrter @SAD
irthdy eventD ge spnD when employedintervlAY
QFP glendri ystem nd rop erty eletion
his setion desri es how lendri systems re seleted nd how lendr prop erties re
sp eiedF glendri systems n e sp eied glolly or lo lly within queryF imilrl yD
prop erty tles n e sp eied s either session defults or for indivi dul dt itemsF
QFPFI glendri ystem p eitio n
glendri systems re sp eied y lexil sop e in sequene of v sttementsF he sop e
of glolly delred lendri system is ll sttements up to ut not inlud in g the next
glol delrtion of lendri systemF qlol lendri systems re delred y delre
lendri system ommndF gonverselyD for prtiulr itemD lo l delrtion n e
used to override the delrtion t the glol sop eF vo l delrtions re mde using n s
luseF
pigure P shows n exerpt of n v mo duleF his exmple illustrtes ll of the wys in
whih lendri systems nd prop erty tles my e sp eiedY it is not intended to e relistiF
he russin lendri system is delred in the glol sop eF he sop e of this delrtion
extends to the next glol delrtionD nming the merin lendri systemF he russin
lendri system pplies to the irthdy nd ge ttriutes in the trget list of the selet
sttement sineD unlike the when employed ttriuteD no lendri system is lo lly delred for
these ttriutes vi n s luseF imilrlyDtherussin lendri system is used to resolve the
nme ofD nd to interpret the onstnts |P tinvr IWPS| nd IWUS @tinvr4 funtion month
is phoneti trnsltion into the vtin lph et of the ussin word for tnury4AD while the T
XXX
delre lendri system s russinY
delre x ursor for
selet nmeD idD irthdyD
ge with property tle D when employed s merin
from employee
nme of@irthdyA a 9tinvr9 nd where month
irthdy ` |Ptinvr IWPS|nd
ge b 7TH yers7 s merin with property tle
when employed overlps IWUSY
proedure set x properties
sqlode
set properties with x property tleY
delre lendri system s merinY
proedure open x ursor
sqlode
open xY
XXX
pigure PX ixmple of glendri ystem nd rop erty eletion
merin lendri system is used to interpret the spn 7TH yers7Fe note thtD in this
instneD the funtion month nme of is dened vi the russin lendri system nd returns
ussin month nmesF e ssume tht the implementtion denes glolly sop ed defult
lendri system tht is pplies if no lendri system is glolly delredF
QFPFP rop erty p eiti on
rop erties my e sp eied on oth glol nd p erEitem sisF he prop erties ontined
in prop erty tle re tivted y exeuting set properties ommndF hose prop erties
remin in eetD nd n inuen e ny intervening temp orl op ertionsD until expliitl y deE
tivted y nother set properties ommndF sn dditionD prop erty tle n e sp eied
for single op ertionF
he mehnisms for prop erty seletion re dynmiF his ontrsts with the mehnisms
for lendri system seletion whih re sttiF his distintion is onsistent with our sp eiE
tion of prop erties s extensionl|sine the extension of dtse n not e predited
prioriD the vlue of prop erty nnot e known t ompileEtimeF tti sp eition of
prop erty tles is therefore not p ossileF
sn pigure PD the pro edure set x properties ontins ommnd tht tivtes the
prop erties ontined in the prop erty tle x property tleF snvo tion of this pro edure
uses the prop erties ontined in tht tle to e tivtedF hese prop erties remin E
tive until expliitly overridden y nother set properties ommndF por exmpleD if n U
pplition progrm lls the pro edure set x properties prior to lling the pro edure
open x ursorD then the prop erties ontined in x property tle will override the propE
erties in the defult prop erty tle when the ursor is op enedF
gonverselyD nming prop erty tle for n indivi dul dt item limits the tivtion of
those prop erties to the pro essing of tht dt itemF por exmpleD sso ited with the ttriute
ge in the selet luse is prop erty tle property tle F he prop erties in this tle
re tivted temp orrily while timeEstmps re eing onverted for the ge ttriuteF
es mentioned in etion PFPD defult tle of prop erty vlues is provided y the hfwF
he vlues in the defult prop erty tle re ustomized y lo l site p ersonnel nd re exp eted
to e pproprite for most situtions t tht siteF
QFQ fuiltEin puntions
st is onvenient to hve simple mehnisms for dt onversion nd mnipultionF o omE
plish these tsksD we hve dened nine uiltEi n funtionsF hese funtions re tegorized s
either dt onstrutors @eFgFD intervl to omp ose n intervl from two eventsAD dt deonE
strutors @eFgFD egin to return the strting event of n intervlAD or misell neous funtions
@eFgFD first to return the prior of two eventsAFe emphsize tht these funtions re lendr
indep end entF edditionl lendr sp ei funtions my e dened y lendrF por exmE
pleD funtion to extrt the month eld of n event ould e implemented for the qregorin
lendrF
QFR erithmeti ixpressions
erithmeti op ertions on temp orl vlues re neessry in mny omputtionsF por exmpleD
one my wish to determine how mny shopping dys re left until ghristmsD or the rrivl
time of trin given its deprture time nd the durtion of its tripF
e extended the si rithmeti op ertors @GD CD ED BA for eventsD intervlsD nd spnsF
yur design gols were to mximize orthogonlity whenever p ossile nd to overlod existing
op ertorsD therey minimizing the omplexity of the lngugeF ixpressions with intuitive
semntis suh s event C spn re llowed while expressions with unintuitive semntis suh
s intervl C event re notF
QFS gomprison ixpressions
en imp ortnt motivtion for inorp orting time vlues into the query lnguge is to deterE
mine the temp orl reltionships etween o jetsF por exmpleD for the employee reltion of
etion QFID one might e interested in who ws hired during prtiulr yerD or given two
employeesD who hs more yers of servieF
emp orl omprison op ertors llows one to determine these reltionshipsF e set of
suh op ertors ws dened for the eventD intervlD nd spn dt typ esF e mo died the
semntis of existing time omprison op ertorsD overlpsD `D aD bD nd aD nd dded three
new omprison op ertorsD preedesD meetsDnd ontinsF he op ertor set ws derived y
exmining the omprison op ertors of other temp orl extensions to v eriv IWVTD fenEvi
IWVPD xvthe 8 ehmed IWVWD rd IWWHF st n e shown tht our op ertors susume eh
of these prop oslsD ndD in ftD our op ertors n express ny p ossile reltionship etween
ny of the temp orl dt typ esF pull detils re provided elsewhere o o 8 no dgrss IWWIF V
QFT eggregte puntions
here re six v ggregte funtions whih op erte on sets of vluesF e extended the
semntis of ve of these funtionsD ountD sumD vgD mxD nd minD to ommo dte the
temp orl dt typ esF he sixth ggregte funtion ount@BAD whih determines the num er
of rows in tleD is not relevnt to the disussionF es with rithmeti expressionsD we
identied ll pplitions of these funtions to the temp orl typ es whih hve ler nd intuitive
semntisF por exmpleD the sum of set of spn vlues is lerly dened while the sum of
set of intervl vlues is notF
QFU ummry
glendr indep en dent onstruts were dded to v to supp ort new time dt typ esD temE
p orl uiltEin funtionsD temp orl rithmeti nd omprisonD nd ggregte funtionsF sn
dditionD we dened mehnisms for lendri system nd prop erty tle seletionD inresing
the expressive p ower of the query lnguge through lendr sp ei op ertionsF
snterestinglyD the omplexity of the lnguge hs tully deresed fter sutrting the
previous temp orl supp ort nd dding our temp orl mo ditionsF eventeen keywords deling
with qregorin lendr onstruts were deletedD nd nine keywords for lendr indep ende nt
onstruts were susequently ddedF his simpli tion is primrily due to the ft thtD in
vPD lendr sp ei onstruts re implemented s keywords in the query lngugeD while
we supp ort them through extensions of the query lngugeD in the form of lendr dened
funtionsF sn dditionD we signintly inrese the expressive p ower of the lngugeD s vP
only supp orts single lendrD the qregorin lendrD nd single lngugeD inglishF
R ystem erhiteture
he lnguge onstruts just desri ed provide their expressive p ower through extensiil ityX
lo l users n dene new lendrs nd lendri systemsD referene them in queriesD nd
n lso lter the prop erties of lendrsF upp orting this extensiili ty requires more op en
rhiteture thn tht employed in urrent dtse mngement systemsF
sn this setionD we desri e the rhiteturl mo ditions onventionl reltionl
dtse mngement system needs in order to supp ort the lnguge onstruts of the previE
ous setionF e disuss only the omp onents of the dtse mngement system whih must
e mo died or extended to supp ort our dt mo delF issentilD ut nonEgermneD omp onents
suh s onurreny ontrolD reovery mngementD nd storge ess metho ds re omittedF
RFI yverview
pigure Q ontins digrm showing the m jor omp onents of the systemF ih ox in
the gure represents omp onent of the systemY solid line rrow from one omp onent to
nother indites tht the former utilizes servies provided y the ltterF ht strutures @nonE
pro edurl omp onentsA re shown s ovlsD nd dshed line rrow indites dt struture
ontins referene to nother omp onentF he gure shows the following omp onentsF
uery pro essor| onventionl query pro essing system extended to supp ort the new
temp orl onstrutsF W Query Processor Uniform Calendric Support (UCS) Calendric system Calendric system Syntax analyzer
Semantic analyzer
Run-time support Calendar Calendar Calendar
Timestamp ADT Support
(TADT)
pigure QX ystem erhiteture yverview
niform lendri supp ort @ gA|n interfe tht mnges ess to the servies proE
vided y lendrsF ih lendri system is dened s olletion of dt strutures
within the gF ithin the rhitetureD lendri systems hve no pro edurl omE
p onentY they merely provide mehnism for essing the servies exp orted y their
lendrsF
glendr| set of routines nd tles implementing lendr dep enden t op ertionsF e
note thtD s shown in pigure QD lendrs n e shred y multiple lendri systemsF
imeEstmp eh @ehA supp ort| set of routines enpsulting op ertions on physE
il timeEstmpsF he eh implements ll temp orl op ertions tht do not require
interprettion y lendrF
sn pigure QD it is redily pprent tht the supp ort for lendr dep endent op ertions
is prtitioned from the supp ort for lendr indep en dent op ertionsF he g is resp onsile
for exeutingD y using the pproprite lendri systemD ll lendr dep endent op ertionsF
he ehD on the other hndD provides lendr indep enden t op ertionsD sp eill yD uiltEin D
rithmetiD omprisonD nd ggregte op ertions on timeEstmpsF
his distintion is the key sp et of our pprohF e isolte op ertions requiring lenE
dr interprettion y enpsulting them within lendrD nd provide lendr indep ende nt
op ertions elsewhereF his llows the rhiteture to supp ort extensiil ity nd interhngeE
ility of lendri systems nd lendrsF
es n exmpleD onsider the rithmeti op ertion of omputing the sum of two spn
vluesF rile spns require lendr interprettion while xed spns do notF hereforeD
the eh exp orts n op ertion fs dd fs whih dds two xed spnsD while lendr must
provide n op ertion for dding vrile spns to xed spnsD vs dd fsD nd n op ertion for
dd vsF he g exp orts generi spn ddition dding vrile spns to vrile spnsD vs
op ertionD s dd sF he query pro essor invokes s dd s whenever spn ddition op ertion
is p erformedF s dd s queries the eh to determine if its prmeters re vrile or xed
spnsD then lls the pproprite eh or lendr routineF
ixtensiili ty of lendri systems nd lendrs is entrl to our rhitetureF e thereE
fore supp ort denition of lendri systems nd lendrs y lo l site p ersonnelF e se
version of the hfw will likely inlud e severl lendrs nd lendri systemsD nd these
lendrs nd lendri systems will e dequte for most usersF sn dditionD we ntiipte IH
mrket for ustomized lendrs nd lendri systemsD with third prty vendors sp eili zin g
in developing suh solutionsF
glendr nd lendri system denition will e p erformed y dtse implementor
@hfsAD p erson with suient knowledge of the internl workings of the hfw to implement
lendrEdened funtions nd routines ihrdson 8 grey IWVUF he hfs is resp onsile
for supplying the supp orting omp onents of lendrs nd lendri systems nd generting
the resulting dtse mngement systemF o simplify this tskD we provide to olkit tht
epts lendr nd lendri system sp eitions provided y the hfs nd omp oses the
hfw from those sp eitions nd preexisting omp onentsF e preliminry design of the
genertion to olkit is presented in etion RFUF
e ontinue y desriing the system omp onents shown in pigure Q in more detilF e
use p ertinent exmplesD suh s supp orting vrile spn op ertionsD to illustrte the designF
RFP imeEstmp eh upp ort
es previously mentionedD the eh is resp onsile for ll temp orl op ertions tht do not
require lendr interprettionF his inludes ll op ertions on eventD intervlD nd xed spn
vlues plus uxiliry op ertions for timeEstmp mnipultionF he representtions of ll suh
vlues s stored in the dtse re neessrily lendr indep end ent hyreson 8 no dgrss
IWWPF yp ertions involving vrile spns require lendr supp ort nd re not implemented
y the ehF
he op ertions ontined in the eh derive diretly from the query lnguge op ertions
desri ed in etions QFQ{QFTF le Q shows the typ es of op ertions supp orted y the eh
long with ount of routines for eh op ertion typ eF e detiled desription of eh routine
is provided elsewhere o o et lF IWWPF
xumer of outines
ypertion
W
fuiltEin op ertions
II
erithmeti op ertions
IQ
gomprison op ertions
QH
eggregte op ertions
T
euxiliry op ertions
le QX imeEstmp eh yp ertions
es shown in pigure QD the op ertions provided y the eh re used y the runEtime
supp ort of the query pro essorD the gD nd ny lendrs dened in the systemF he query
pro essor invokes the eh to exeute ll uiltEinD rithmetiD omprisonD nd ggregte
op ertions involving nonEspn op erndsF e lendr lls the timeEstmp retion routines of
the eh while omputing timeEstmp equivlent to temp orl onstnt enountered in
the inputF he g invokes the eh to exeute xed spn op ertionsD s we disuss elowF
RFQ niform glendri upp ort
he g provides generi interfe to ll lendr dened serviesF le R lists the typ es
of op ertions p erformed y the gF he g is invoked y the query pro essor to tivte
nd detivte lendri systems nd prop ertiesD onvert temp orl onstnts to timeEstmpsD
onvert timeEstmps to temp orl onstntsD resolve lendr dened funtionsD nd exeute ll II
spn op ertionsF st mintins dt strutures dening lendri systemsD nd invokes lendr
op ertions on ehlf of the query pro essorF sn generlD the g is resp onsile for exeuting
ny op ertion whih ould p ossily e lendr dep endentF
xumer of outines
ypertion
W
pn rithmeti op ertions
Q
pn omprison op ertions
IS
pn ggregte op ertions
Q
gonstnt trnsltion
Q
imeEstmp trnsltion
I
puntion inding
P
glendri system tivtion
R
rop erty tivtion
le RX niform glendri upp ort yp ertions
p eill yD event nd intervl omputtions re lendr indep en dentF reneD op erE
tions on events nd intervlsD one trnslted into timeEstmpsD n e exeuted diretly y the
ehF por exmpleD event vluesD iFeFD timeEstmps in the physil representtionD do not reE
quire lendr interprettionY their timeEstmps ompletely desri e their vluesF hereforeD
op ertions on event vluesD suh s event preedes intervlD re simple timeEstmp mnipuE
ltions tht n e p erformed diretly y the ehF roweverD for op ertions involving spn
vluesD it is not known if the op ertion is lendr indep enden t until the timeEstmps of the
op ernds re exminedF rile spns require lendr supp ort while op ertions involving
only xed spns do notF he query pro essor is not ple of resolving this sineD in the
typ e system of the query lngugeD vrile spns nd xed spns re the sme typ eF hereE
foreD the eh provides routine is vrile spn whih determines if spn is vrile
or xedF his is onsistent with our design of the eh s n strt dt typ e for timeE
stmpsF he g lls this routine to determine if ny op ernd is vrile ndD if soD invokes
lendr to p erform the given op ertionF ytherwiseD the op ertion is pssed to the eh
whih p erforms the omputtionF snterestinglyDover twoEthirds of the g routines re these
simple trEontrol4 routines relted to vrile spnsF e will desri e in more detil the
interfe etween the g nd lendr in etion RFTF
e desri e the g op ertions supp orting lendri system seletionD prop erty tivE
tionD onstnt trnsltionD timeEstmp trnsltionD nd lendr dened funtion indin g in
the next setionF
RFR uery ro essing usystem
sn our limited ontextD the query pro essing system is resp onsile for invoking the g when
lendr supp ort might p ossily e required for ertin op ertion nd for invoking eh
routines when exeuting op ertions tht re lerly lendr indep enden tF
he eh solely provides runEtime op ertions suh s temp orl rithmetiY the g
provides op ertions tht supp ort the query pro essing system t oth ompileEtime nd runE
timeF he query pro essing system invokes the g during semnti nlysis to p erform
lendri system indin gD nd typ e heking nd inding of lendr dened funtionsD suh
s month nme ofF huring query exeutionD the query pro essor invokes the g to trnslte
temp orl onstnts into timeEstmpsD trnslte timeEstmps into output stringsD nd tivte IP
nd detivte lendri systems nd prop ertiesF e note tht the syntx nlyzer in the
query pro essing system do es not require either g or eh provided serviesF he syntx
nlyzer mustD of ourseD e le to reognize nd prse the lnguge onstruts desried in
etion QF
e ontinue y desriingD in detilD the mo ditions to the semnti nlyzer nd the
runEtime system of the query pro essorF
RFRFI emnti enlysis
emnti nlysis is resp onsile for ensuring the semnti orretness of the queryD tht isD
suh tsks s typ e heking nd inding of nmes re p erformed y the semnti nlyzerF
st is preferle to p erform these tsks t ompiltion time sine progrmmer intervention is
normlly required when stti semnti errors o urF e hve ttempted to mximize the
mount of semnti heking p ossile t ompileEtimeD though some semnti heking must
e delyed until runEtime for exiilityF
he inding of lendri systems nd lendr dened funtions o urs t ompileEtimeF
his is mde p ossile y the stti soping of delre lendri system ommnds s
disussed in etion QF hen this ommnd is prsedD the semnti nlyzer invokes the g
to verify tht the nmed lendri system tully existsF sf soD the g reords the nmed
lendri system s eing the urrently tive lendri systemF vterD when lendr dened
funtion suh s month nme of in pigure P is enounteredD the semnti nlyzer invokes the
g to ind tht funtion to its implementtionF he g veries tht the funtion is dened
vi the urrent lendri systemD nd p erforms typ e heking on the funtion9s prmetersF
sn pigure PD this direts the g to use the russin lendri system when resolving the
funtion month nme ofF
yther minor extensions to the semnti nlyzer re requiredD inlud in g typ e evlution
nd heking of temp orl rithmeti nd omprison expressions nd of relted onstruts
suh s pro edure prmetersF uh extensions do not require g or eh supp ortF
RFRFP unEtime ystem
everl sp ets of our lnguge prop osl nnot e stised y ompileEtime resolution ndD
thereforeD require runEtime resolutionF p eil lyD temp orl onstnts nnot e evluted t
ompileEtimeD in ontrst to rithmeti or string onstntsF his is euse the mening of
temp orl onstnt suh s |I tnury IWHH| dep ends not only on lendrD ut lso on the
set of tive lendr prop ertiesD whih nnot e determined t ompileEtimeF por exmpleD
onsider the delrtion of ursor x in pigure PF et ompileEtimeD the semnti nlyzer knows
tht the russin lendri system is to e used to evlute the onstnt IWUSFroweverD
v semntis stte tht the query is not evluted until the ursor is op enedD tht isD until
the pro edure open x ursor is lledD ndD in generlD it is imp ossile to tell wht the tive
set of prop erties will e t tht timeF sn this seD the semnti nlyzer sso ites with
IWUS the nme of its lendri systemF hen the ursor is op ened t runEtimeD the query
pro essor retrieves the nme of the lendri system nd invokes the g to tivte itF sf
prop erty tle were sp eied for IWUS vi with luseD the prop erties in the prop erty
tle would lso e tivtedF he onstnt is then pssed to the g for evlutionF
hile this my dely the detetion of errorsD we feel tht this exiil i ty is desirleF
es disussed in etion PFQD prop erties reD y ntureD extrinsi to lendr nd re most
ppropritely stored extensionlly where they n e mnipulted nd hngedF ine the exE IQ
tension of reltion is only known t runEtimeD ompileEtime evlution of temp orl onstnts
is preludedF
he runEtime system of the query pro essor utilizes servies exp orted y oth the eh
nd the gF hen p erforming op ertions tht ould p ossily require lendr supp ortD the
runEtime system invokes g provided routinesD nd when p erforming op ertions tht re
lerly lendr indep en dentD the runEtime system invokes eh provided routinesF
his prtitioning hs een mentioned eforeD ut we note here tht the query pro essor is
le to determine the orret mo dule to invoke sed on typing informtion nd the kind of opE
ertion eing p erformedF por exmpleD lendri system nd prop erty mnipultion sttements
suh s delre lendri systemD set propertiesD nd the with nd s luses re supE
p orted y g routinesF purthermoreD op ertions suh s spn C spn might require lendr
supp ort dep ending on if either op ernd is vrile spnF uh op ertions re routed to the
g whih mkes the determintion out the typ e of spns eing dded then either invokes
the eh if oth spns re xed or invokes lendr ny of the spns is vrileF gonE
verselyD op ertions suh s event E eventD event preedes intervlDnd interset@intervlD
intervlA whih do not involve lendr dep endent op ernds re pssed diretly to the eh
for evlutionF
RFS glendri ystem ht trutures
es previously mentionedD lendri system is represented y dt strutures within the
gY lendri systems ontin no pro edurl omp onentsF prom n rhiteturl stndp ointD
lendri system exists solely to integrte lendrs nd to supply mehnism for essing
the filities those lendrs provideF es suhD stti dt strutures identifying lendrs
nd the servies exp orted y those lendrs re ll tht is needed to implement lendri
systemF
e lendri system dt struture ontins three omp onentsD the nme of the lendri
systemD the set of lendrs nd ep o hs dened for the lendri systemD nd list of routinesF
he list of funtions is the union of the set of funtions dened y eh lendr nmed in the
lendri systemF
hen temp orl onstnt is enountered in queryD the g must selet lendr of
the lendri system to trnslte the onstnt into timestmpF his is neessry sine severl
lendrs within the sme lendri system my e ple of trnslting given onstntF
e desri e hfsEontrolled mehnism for lendr seletion elsewhere o o et lF IWWPF
RFT glendrs
he lendr is the most ritil omp onent of the rhitetureF st represents the lo l dptE
tion of temp orl semntis within the rhitetureD nd so the m jority of its ontents must e
provided y the hfsF hese ontents inlude lendr unique funtionsD routines supp orting
temp orl onstnt evlution nd timeEstmp evlutionD nd lendr dep endent ggregteD
rithmetiD nd omprison op ertionsF hese routines onstitute the servies the lendr
exp orts to the gF
le S identies the op ertions tht must e progrmmed s prt of lendr impleE
menttionF hetiled desriptions of these routines re ontined elsewhere o o et lF IWWPF
e note tht most of these op ertions involvevrile spnsF sf the lendr do es not dene
ny vrile spnsD then these funtions re not requiredF ynly the remining eight trnslE
tion routines re required to dene lendrF sf only one vrile spn is denedD then the IR
vrile spn routines n e quite simpleF his is the se with our initil desription of the
qregorin lendr whih hs single vrile spnD monthF hen multiple vrile spns
re denedD then eh routine must ontend with llY some must hndle the more omplex
omintions of twovrile spnsF
xumer of outines
ypertion
Q
gonstnt trnsltion
Q
imeEstmp trnsltion
P
euxiliry trnsltion op ertions
PI
rile spn ggregte op ertions
IR
rile spn rithmeti op ertions
V
rile spn omprison op ertions
I
rile spn to xed spn onversion
c
glendr sp ei funtions
le SX glendr yp ertions
gonstruting lendr routines my e diult for the hfsF gonsequentlyD whenever
p ossile we hve identied ommon pro essing tht must e present in ll lendrsD nd shifted
tht o de into the g to minimize the hfs9s progrmming eortF hifting pro essing to the
g is mde p ossile y using tleEdriven lgorithmsF glendrs provide tles desriin g
dt formts nd eld vlues to the gY the g uses this informtion to interpret input
dt or onstrut output dtF sn prtiulrD in etion PFP we stted tht prop erties re
used y lendrs to dpt to lo l requirementsF et the query lnguge levelD prop erties re
used to prmetrize lendrsD nd prop erty vlues et the result oflendr op ertionsF
roweverD t the rhiteturl levelD our gol is to simplify the implementtion of lendrs s
muh s p ossileF gonsequentlyD we hve moved the interprettion nd pplition ofprop erty
vlues out ofthe lendr nd into the gF glendrs re not required to interpret prop erty
vlues diretlyD nd whenever p ossileD the g preEpro esses the dt to pply the eets of
prop erty vluesF
por exmpleD pigure R shows ow digrm for the pro essing tht o urs when timeE
stmp is onverted into n output stringF @his pro essing would o ur when timeEstmp is
retrieved in feth sttement returning temp orl ttriutesFA he query pro essor invokes the
g to onvert the retrieved timeEstmp into n output string for ssignment to pro edure
prmeterF foxes in the gure denote tions whihD in turnD represent g or lendr llsF
yvls represent dt items used in or generted y the pro essingF wost tions present in
the gure re implemented in the gY lendr routines re represented y roken outline
oxesD nd we note tht there re only two suh oxesF
pigure R is illustrtive ofhow tleEdriven lgorithms re used in the gF gonsider the
VEyte timeEstmp TPQRRTVURRHHQPSHHI stored in the when employed ttriute ofpigure PF
por this timeEstmpD the merin lendri system is onsultedD nd the timeEstmp is deE
termined to e sso ited with the gregorin lendrF rnsltion egins y p erforming
lo l pro essing to determine the orret timezoneF he g heks the vlue ofthe lole
prop erty whih nmes the lo tion ofinterestF sn this seD the lo le is usonDerizonFhe
lole tle is then queried to determine the timezone in whih uson is lo tedF he lo le
tle indites tht usonD nd most ofthe stte oferizonD is lw ys on wountin tndrd
ime @wAD mking the lendr op ertion determine timezone prtiulrly simpleF he
time displement for wD whih is U hours ehind qreenwih wen imeD is retrieved nd IS Time-stamp Determine calendar Calendar descriptor
Active calendric system descriptor
Active properties Locale table
Extract locale Locale Determine timezone
Displacement Determine displacement Timezone
Apply displacement Active properties Timezone table
Determine format string Select field index table Time-stamp
Format string Field value generation Field index table Array of field values Construct output string Field value table
String
pigure RX ime lue etrievl
sutrted from the originl timeEstmpF
qenertion of the nl output string egins y invoking the gregorin lendr to
generte the rry of eld vlues shown elowF
lue
sndex
P
H
H
I
IWUS
P
XXX
XXX
he rry of eld vlues is simply n unprsed version of the timeEstmpF he ontent
of the rry of eld vlues is desri ed y the following eld index tleD whih is provided y
the lendrF
pield xme
sndex in erry of pield lues
dy
H
month
I
yer
P
XXX
XXX
he eld index tle sso ites indies in the rryofeldvlues with the omp onents of
temp orl onstntF he eld index tle indites tht the dy omp onentD PD is found in IT
the zeroth element of the rry of eld vluesD the month omp onentD HD is found in the rst
elementD nd the the yer omp onentD IWPSD is found in the seond elementF
he g determines the formt of the nl output string y retrieving the output formt
string from the urrent prop erty setF e shemtilly represent the output formt string s
followsF
`monthD english month nmesb `dyD ri numerlbD `yerD ri numerlb
t t
he formt string lists the elds in the order tht they re to pp er in the outputF he
omp onent sso ited with eh eld is either eld vlue nme tle or the nme of routine
tht omputes the eld9s stringF pield vlue nme tles nd routines re lendr providedF
por exmpleD the english month nmes eld vlue nme tle is shown in pigure TF he g
retrieves the string tnury sine the rry of eld vlues entry for month is HD nd tnury is
ontined in the zeroth entry of the eld vlue nme tleF he g itertes over the elds of
the output formt string dding one eld to the output string on eh itertionF he resulting
stringD 9tnury PD IWUS9D is returned s the vlue of the when employed ttriuteF
t t
pield lue xme
sndex
tnury
H
perury
I
XXX
XXX
xovemer
IH
heemer
II
le TX english month nmes pield lue xme le
his exmple illustrtes how muh of the the pro essing hs een moved out of the
lendr nd into the g nd ehF sn prtiulrD the lendr need only provide two
routinesD one for determining the timezone @whih is primrily tle lo okupA nd one for
onverting n djusted timeEstmp into n rryofeldvluesF he g do es the rest of the
work of reting the sso ited stringF winimizi ng eh lendr9s resp onsiili ty is imp ortnt
sine the g nd eh will e implemented oneD y the hfw implementorD wheres the
lendr9s implementtion will e the resp onsiili ty of the hfsF
RFU qenerting glendrs nd glendri ystems
o ese the tsk of integrting new lendri systems nd lendrs into the hfwD we hve
designed to olkit tht genertes lendri system dt strutures nd some of the omp onents
of lendrs from higherElevel sp eitionsF
en exmple of using the to olkit is shown in pigure SF foxes in the gure represent tions
of the to olkit or soure lnguge trnsltorF yvls represent les either red or generted
during the pro essingF p eition nd input les tht re reted y the hfs re shown
s roken line ovlsF piles ending in Fl ontin lendr sp eitionsF imilrlyD Fs les
ontin lendri system sp eitionsD nd F les ontin g lnguge progrmsF e lendr
sp eition le ontins list of pro edure signtures supp orted y the lendrF he to olkit
veries tht this list inludes ll required routines s desri ed in etion RFTF e lendri
system sp eition ontins list of lendrs nd ep o hs dened for the lendri systemF
he lendrs pp er in their input order from highest to lowestF pinllyD g progrm les
ontin the implementtions of pro edures with signtures in lendr sp eition lesF IU geologic.cal gregorian.cal russian.cs american.cs
CS generation UCS generation CS generation
russian.c ucs.c american.c
C compiler C compiler C compiler
russian.o ucs.o american.o
geologiccal.c geologiccal.o
gregoriancal.c gregoriancal.o DBMS generation
tadt.o default.prop ucslib.o
Table generation defaultprop.o
Rest of DBMS
DBMS
pigure SX qenerting n ixmple hfw
yur eventul gol is to generteD s muh s p ossileD lendr F les from the delrE
tive sp eitions ontined in Fl lesD therey minimizi ng the hfs9s progrmming eortF
es previously desri edD we hve tken step towrd this gol y simplifying the lendr
routinesF purther enhnements re disussed in etion TF
sn pigure SD dtse mngement system is eing reted with two lendri systemsD
the russin lendri system nd the merin lendri systemF yne lendri system must
e delred s the defultF he g dt strutures referening these lendri systems re
uilt y the to olkitD ompiledD nd stored s o jet o de in usFoF imilrl yD the internl
lendri system dt strutures referening lendrs nd pro edures re uiltD ompiled
nd stored s o jet o de in russinFo nd merinFoFpor eh lendr in the hfwD
the required nd optionl funtions for tht lendr re reted y the hfs in the les
geologilFD ronEIRlFD XXXD nd gregorinlF nd then ompiledD nd defult
prop erty tle is uilt y the hfsF vstlyD we note tht predened o jet lirries re provided
for the eh nd the reminder ofthe gF
his rhiteture shres the hrteristis ofmost extensile hfwsD in tht ertin
sp ets re ound t hfwEgenertion timeD other sp ets re ound t shemEdenition
timeD nd still other sp ets re ound during query evlutionF p eil lyD in our design
lendrs nd lendri systems re delred when hfw is genertedY the lendri system
is ound t shem denition time @or more preiselyD when n v mo dule is ompiledAD nd
prop ertiesD suh s output formtD re ound t query evlution timeF IV
RFV erhiteturl smplitions of ixtensiility
e wellEknown onern with extensile hfws is tht extensions re errorEprone|they intert
with the ore hfwD ut re develop ed seprtelyD nd usully y less exp eriened p ersonnelF
hese errors n et not only the orretness ofthe extensionD ut the orretnessD p erforE
mneD nd seurity ofthe hfw itselfF sn our ontextD the hfs must e onerned with
proteting the hfw from errors intro dued y lendrsF roweverD this protetion must e
lned with the degree ofexiili ty needed to meet given site9s requirementsF
here re severl wys tht site9s requirements n e met while still ensuring tht
lendrs do not dversely et the hfwF wny siteEsp ei dpttions n e omE
mo dted through the mnipultion ofprop ertiesD with little exp osure to seurity violtionsD
nd little impt on orretness or p erformneF por greter extensiili tyD the hfs n insist
tht only vendor supplied lendrs e instlledD ssuming the site9s requirements n e met
through vendor develop ed pkgesF sfthe vendor o de is wellEtestedD then it is sfessumpE
tion tht the lendr will not dversely et the hfwF sfthe site9s requirements nnot e
met y ville pkgesD the rhiteture hs een designed to simplify the onstrution of
lendrs s muh s p ossileF wuh ofthe pro essing hs een mov ed outside ofthe lendrs
nd into the g nd the ehD nd the genertion to olkit is designed to minimize the tul
progrmming eort required for lendrF sf the hfs n e trusted to write orret o deD
the rhiteture ommo dtes high degree ofexiili ty F
e relted issue is how to isolte lendrs from the hfw internlly within the rhiteE
tureF es previously mentionedD the intertion etween the lendr nd other mo dules hs
een minimized s muh s p ossileF glendrs invokeonlyeh op ertionsD nd this is neE
essry sine the timeEstmp representtion is enpsulted within the ehF elsoD whenever
p ossileD prmeters pssed from the g to lendr nd from lendr to the ehD re
pssed y vlue rther thn y referene to minimize the hne of memory ontmintionF
vstlyD the rhiteture ommo dtes vriety ofimplementtion strtegies forlendr dE
dress spesF glendrs n shre the hfw9s ddress speD or exist in seprte ddress
speD either their own or the user9s ddress speF hese options represent trdeo etween
p erformne nd risk of ontmintionF righest p erformne is p ossile in the ddress spe
ofthe hfwD t the risk of hving the lest isoltionF he p erformne dierene etween
the remining two options is negligil eF roweverD we note tht the o de spe required to
duplite lendrs in individul user pro esses ould e sustntilD nd filure of lendr
ould use filure of the user pro essF vstlyD iflendrs o upy their ownD seprte ddress
spesD their servies n oneivly e mde ville systemEwideD s opp osed to the hfw
exlusivelyD thus enpsulting lendr servies for the omputing system s wholeF
he rhiteture ommo dtes sp etrum ofstrtegies forlendr extensiil ity F he
hfs must lne exiil ity nd p erformne ginst the risk of errors when seleting or
developing new lendrs for n instlltionF he rhiteture ids in this pro ess y esing
the development ofnew lendrsD nd simplifying their intertion with other omp onentsF
sfdesiredD gret degree ofexiility is v illeF ytherwiseD the design ttempts to simplify
the extension pro ess s muh s p ossileF
S elted ork
everl reserhers hve investigted time in dtses from oneptul viewp ointF enderson
develop ed forml frmework to supp ort oneptul time spes using inheritne hierrhies IW
enderson IWVPD enderson IWVQF rer mo del lso supp orts multiple oneptul timesY this work
n e onsidered prtil extension ofthe onepts develop ed y endersonF rowev erD our
work diers in tht it is designed s the rst step in generl extension ofv to supp ort timeD
nd s suhD forms the sis for exploring temp orl semntis eyond those of enderson9sF
gliord nd o develop ed frmework for desriing temp orl domins using nive set
theory nd lger gliord 8 o IWVUF his work llows hierrhy oflendr indep ende nt
domins to e uilt nd temp orl op ertors to e dened etween o jets of single domin
nd etween o jets ofdierent dominsF he frmewor kispowerful ut lks the ility to
desri e time domins tht re inonsistent with domins oflrger unitsF p or exmpleD weeks
re inonsistent with months sine whole num er ofweeks do not ordinrily orresp ond to
single monthF yur work removes this limittion y mking the semntis ofny oneptul
time unit userEdenleF he user is not tied to ny predened notion oftime or time dominF
ellen motivted the intervl s fundmentl temp orl entity ellen IWVQF re formlE
ized the set ofp ossile reltionships whih ould hold etween tw o intervls nd develop ed
n inferene lgorithm to mintin the set of temp orl reltionships etween entitiesF e
use ellen9s work on intervl reltionships s the sis for dening new temp orl omprison
op ertors in vF
yther time extensions to v hve een prop osedF hte prop osed ugmenting v with
dte nd time dt typ es hte IWVVF re extended v with filities to supp ort single
lendrD the qregorin lendrF elso inluded were syntx nd semntis for rithmeti
nd o olen expressions involving timeF e single unied dt typ eD the intervlD ws dened
nd used to represent oth durtions oftime nd events in timeF his unition llows
high degree oforthogonlity in temp orl expressions ut uses semnti diulties sine
the distintion etween event nd durtion o jets is lurredF elsoD the sp eiliztion ofthe
solution to single lendr limits its generlityF
wny other reserhers hve develop ed sophistited timeEoriented dt mo dels nd exE
tended v to supp ort these dt mo dels eriv IWVTD fenEvi IWVPD xvthe 8 ehmed IWVWD
rd IWWHF qenerllyD this line ofreserh hs ignored the issue of temp orl onstnts or
hs ssumed the use of single lendr systemF edditionl pp ers onerning temp orl dt
mo dels nd query lnguges other thn v n e found in the olleted ili ogrphies on
time in dtses folour et lF IWVPD wuenzie IWVTD o o IWWID tm 8 no dgrss IWVVF
sn the ommeril renD s previously mentionedD severl systems with supp ort for temE
p orl dt typ es exist yrle IWVUD ndem IWVQF hese implementtions re limited in
sop e nd reD in generlD unsystemti in their designF hte provides thorough ritique of
one ofthe systemsD hfP hte 8 hite IWWHD hte IWVVF
he extensiili ty oflendrs nd lendri systems is limited formofdtse extenE
siili ty grey 8 rs IWWHF yur prop osl supp orts query lnguge extensiility in the form
oflendr funtionsD nd presenttion extensiility in the form of time disply ustomiztionF
e note tht the temp orl typ es utilized in the query lnguge re not extensileD though the
domin ofspns n e enlrged with v rile spns dened through lendrF
everl extensile prototyp es oer the pility to onstrut strt dt typ es @ehsA
tonerker et lF IWWHD nd it is resonle to sk whether time n e dequtely supp orted
s n ehF e feel tht it nnotF ime is fundmentl dt typ e|mny hfws provide
it nd most pplitions use itF sndeedD the vP prop osl welton IWWHD in ddition to the
v vrint supplied with sfw9s hfP hte 8 hite IWWHD oth provide sp eil supp ort for
timeF es suh it is pproprite for temp orl dt to e supp orted y the hfw diretly rther
thn supp orted y lo l extensionF purthermoreD lendr seletion would e wkwrd to PH
sp eify in query if dded s dtse extension rther thn providing se query lnguge
onstruts to the userF sn prtiulrD ompileEtime heking of lendr funtionsD whih is
p ossile using stti sopingD would e preluded if time were supp orted stritly s n ehF
T gonlusions nd puture ork
e hve prop osed n extension to v nd system rhiteture ddressing the prolem
of time vlue representtion in onventionl reltionl dtse mngement systemF he
ontriutions of this pp er n e summrized s followsF
e rgued tht mny dierent lendrs re in useD due to the ulturlD linguistiD leglD
nd usiness onerns of usersD nd we showed how supp orting multiple lendrs nd
prmetriztion of lendrs y prop erties n ddress these needsF
e intro dued the novel onepts of spnsD lendri systemsD lendrsD nd lendr
prop ertiesF
e extended vP to supp ort multiple lendrs nd lendri systemsD ndD in the
pro essD redued the omplexity of the lnguge while inresing its expressive p owerF
e prop osed n rhiteture tht p ermits the dtse implementor @hfsA t lo l site
to dene new lendrs nd lendri systemsD nd llows the dtse dministrtor
nd users to prmetrize those lendrsD providing limited extensiil ity of this simple
ut imp ortnt omp onent of the hfwF
yur rhiteture moves most of the pro essing of time into two mo dulesD the temp orl
strt dt typ e mo duleD nd the uniform lendri supp ort mo duleD nd out of the
hfsEsupplied lendr mo dulesD therey seprting the universl sp ets of time from
the user dep endent sp etsF
he key sp et of the prop osl is tht the hfw supp ort needed for the user dep endent
sp ets of time is prtitioned from the supp ort for the universl sp ets of timeD nd this
prtitioning is present t oth the query lnguge nd system rhiteture levelsF
e re urrently implementing prototyp e dtse mngement system using the rE
hiteture desri ed in this pp erF his inludes prototyping severl lendrs nd lendri
systems nd the genertion to ols desri ed in etion RFUF e detiled design desriing the
interfes etween ll mo dules in the rhiteture n e found elsewhere o o et lF IWWPF
e pln severl enhnements nd dditions to the urrent prop oslF e hop e to further
utomte the pro dution of lendrs y dening smll delrtive lnguges for most sp ets
of lendrsD llowing the lendr sp ei routines to e generted without the hfs eing
required to write the g routines in most sesF yur urrent design for the genertion to ols
ssumes tht input is xedEformtD tht isD tht temp orl onstnts hve struture tht is
known priori y the systemF hile existing hfws lso mke this ssumptionD we feel it
is overly restritiveF pinllyD we would like to investigte strtegies for integrting historil
indeterminy hyreson 8 no dgrss IWWI into the rhitetureF PI
U eknowledgements
gurtis hyresonD uhen rsuD nd ghristin F tensen mde omments on erly drfts of this
pp er tht gretly improved the presenttionF gurtis hyreson nd uhen rsu lso mde
signint ontriutions to the rhiteturl designF
upp ort for this reserh ws provided in prt y the xtionl iene poundtion
through grnt ssEVWHPUHU nd y the sfw gorp ortion through ontrt 5IIPRF
V filiogrphy
ellen IWVQ ellenD tFpF wintining unowledge out emp orl sntervlsF4 gommunitions
of the essoition of gomputing whineryD PTD xoF IID xovF IWVQD ppF VQP{VRQF
enderson IWVP endersonD FvF wo deling ime t the goneptul vevelD4 in roeedings of
the snterntionl gonferene on htsesX smproving sility nd esponsivenessF
idF F heuermnnF teruslemD ssrelX edemi ressD tune IWVPD ppF PUQ{PWUF
enderson IWVQ endersonD FvF wo deling ivents nd ro esses t the goneptul vevelD4
in roeedings of the eond snterntionl gonferene on htsesF idF FwF heen
nd F rmmersleyF he fritish gomputer o ietyF gmridgeD qret fritinX iley
reyden vtdFD IWVQF
eriv IWVT erivD qF e emp orlly yriented ht wo delF4 egw rnstions on htse
ystemsD IID xoF RD heF IWVTD ppF RWW{SPUF
ftory et lF IWVV ftoryD hFD tF frnettD tF qrzD uF mithD uF sukudD fF wihell nd F
iseF qixisX en ixtensile htse wngement ystemF4 siii rnstions
on oftwreingineeringD IRD xoF IID xovF IWVVD ppF IUII{IUQHF
fenEvi IWVP fenEviD tF he ime eltionl wo delF4 hhF hisserttionF gomputer
iene heprtmentD gveD IWVPF
folour et lF IWVP folourD eFD FvF endersonD vFtF hekeyser nd rFuFF ongF he ole
of ime in snformtion ro essingX e urveyF4 igert xewsletterD VHD eprF IWVPD ppF
PV{RVF
grey 8 rs IWWH greyD wF nd vF rsF ixtensile htse wngement ystemsF4
egw sqwyh e ordD IWD xoF RD heF IWWHD ppF SR{THF
grey et lF IWVT greyD wFtFD hFtF heittD tFiF ihrdson nd iFtF hekitF y jet
nd pile wngement in the iyh ixtensile htse ystemD4 in IWVT vhf
gonfereneF vhfF uyotoD tpnX eugF IWVTD ppF I{PUF
gliord 8 o IWVU gliordD tF nd eF oF e impleD qenerl truture for emp orl hoE
minsD4 in roeedings of the gonfereneonemporl espets in snformtion ystemsF
epgiF prneX wy IWVUD ppF PQ{QHF PP
higitl IWWI hig higitl quide to heveloping snterntionl oftwreF4 higitl ressD IWWIF
hte 8hite IWWH hteD gF tF nd gF tF hiteF e quide to hfPF4 edingD weX eddisonE
esleyD IWWHF olF ID Qrd editionF
hte IWVV hteD gFtF e rop osl for edding hte nd ime upp ort to vF4 sqwyh
eordD IUD xoF PD tune IWVVD ppF SQ{UTF
hyreson 8no dgrss IWWI hyresonD gF iF nd F F no dgrssF emp orl sndeterminyF4
ehnil ep ort WIEQHF gomputer iene heprtmentD niversity of erizonF
heF IWWID QI pgesF
hyreson 8no dgrss IWWP hyresonD gF iF nd F F no dgrssF imestmp emntis
nd epresenttionF4 emps QQF gomputer iene heprtmentD niversity of
erizonF peF IWWPD PU pgesF
prser IWVU prserD tF ime the pmilir trngerF4 edmondD eX empus fo oksD IWVUF
rs et lF IWWH rsD vFD ghngD FD vohmnD qFD whersonD wFD ilmsD FD vpisD qFD
vindsyD fFD irheshD rFD greyD wFD nd iF hekitF trurst widEplightX es he
hust glersF4 siii rnstions on unow ledge nd ht ingineeringD PD xoF ID wrF
IWWHD ppF IRQ{ITHF
wuenzie IWVT wuenzieD iF filiogrphyX emp orl htsesF4 egw sqwyh eordD
ISD xoF RD heF IWVTD ppF RH{SPF
welton IWWH weltonD tF @edFA oliittion of gommentsX htse vnguge vPF4 emerE
in xtionl tndrds snstituteD shingtonD hgD IWWHF
xvthe 8ehmed IWVW xv theD F fF nd F ehmedF e emp orl eltionl wo del nd
uery vngugeF4 snformtion ienesD RW @IWVWAD ppF IRU{IUSF
yrle IWVU yrle gomputerD snF yegvi erminl ser9s quideF4 yrle gorp ortionD
IWVUF
ihrdson 8grey IWVU ihrdsonD tFiF nd wFtF grey F rogrmming gonstruts for
htse ystem smplementtion in iyh D4 in roeedings of the egw sqwyh
ennul gonfereneF idF F hyl nd sF rigerF esso ition for gomputing whinE
eryFnprnisoD geX egw ressD wy IWVUD ppF PHV{PIWF
rd IWWH rdD xF ixtensions to v for ristoril htsesF4 siii rnstions on
unow ledge nd ht ingine eringD PD xoF PD tune IWWHD ppF PPH{PQHF
il ershtz et lF IWWH il ershtzD eFD wF tonerker nd tF llmnF htse ystemsX
ehievements nd ypp ortunitiesF4 egw sqwyh eordD IWD xoF RD heF IWWHD ppF
T{PPF PQ
no dgrss 8 ehn IWVT no dgrssD F nd sF ehnF emp orl htsesF4 siii gomputerD
IWD xoF WD epF IWVTD ppF QS{RPF
no dgrss IWWH no dgrssD F emp orl htsesX ttus nd eserh hiretionsF4 egw
sqwyh eordD IWD xoF RD heF IWWHD ppF VQ{VWF
o o 8 no dgrss IWWI o oD wF nd F no dgrssF wixed glendr uery vnguge upp ort
for emp orl gonstntsF4 emps ehnil ep ort PWF gomputer iene heprtE
mentD niversity of erizonF ytF IWWID SS pgesF
o o et lF IWWP o oD wFD F no dgrssD gF hyreson nd F rsuF e htse wngement
ystem erhiteture upp orting wultiple glendrsF4 emps QPF gomputer
iene heprtmentD niversity of erizonF peF IWWPD QH pgesF
o o IWWI o oD wF hF filiogrphy on emp orl htsesF4 egw sqwyh eordDPHD
xoF ID wrF IWWID ppF IR{PQF
tm 8 no dgrss IWVV tmD F nd F no dgrssF e fili ogrphy on emp orl htsesF4
htse ingineeringD UD xoF RD heF IWVVD ppF PQI{PQWF
tonerker et lF IWWH tonerkerD wFD vF owe nd wF rirohmF he smplementtion
of yqiF4 siii rnstions on unow ledge nd ht ingineeringD PD xoF ID
wrF IWWHD ppF IPS{IRPF
ndem IWVQ ndem gomputersD snF ixpyw eferene wnulF4 gup ertinoD geD
IWVQF PR