Dealing with Schema Anomalies in History ... - VLDB Endowment

10 downloads 1992 Views 732KB Size Report
change, how rhould one update the echema non-drtructiveiy? Thir ir an open ..... MAINTENANCE. ScrNo. Part. Place. Ts Tc. 91. Wheel. Atlanta. 10 20. IOS. Door.
Dealing

Temporal Schema Anomalies in History Databases

with

N.C. Martin,

S.B. Navathe

and R. Ahmed

Databa.se Center Univ. of Florida,

Current well.

Databarer

databaser)

containing

have

capability

by

deetructivaly

been

updating

diecard

temporal

hirtorieal

proposed

appending

Becauee cannot

Abrtract do not proceu

databarer

new

provide

data

to

relationr

in&cad

outdated

explorer

meane

different

Finally, of

databaee

data itaelf,

of

achemae.

technique@

Thus,

from

rchemae uring temporal

in

any

for

investigates database. It

maintaining

multiple

Logic (STL)

multiple

hirtorically

difficult not

in a manner rimilar

it may place an additional

the ueere must to

Moreover,

ryrtem, come method from outdated, yet

Schema Temporal

data

data, they

do not dircard

database

it presentr

retrieving

that

applicable

databuee

hirtorically valid, database echemae. This paper the probleme rerulting from restructuring a hirtory then

achemae ir maintained

temporal

them.

hirtory

propoeal for a practical hiitory databw murt be provided for accarring data

rchemae.

(history

more

FL 52611

change, how rhould one update the echema non-drtructiveiy? Thir ir an open question. If we auume that l history of the

information

information

to

Cainerville,

their

now retrieve time

solve

these

problema.

dwtructive

updating

discarded.

Destructive

in that

valid

logic.

information

ir

destructive

rederign

Becaure hirtorical

redesign

Current mapehot

databases

of the univeme

it ir

can

provide

becaure current databuu update information with new information. mechanirma

improvementr updating

to

reconsider

to provide Hirtory

procerring Updater

marked By

databaeer

allow

rtunpr

give

only

a

ir provided replacing

old

the

hirtorical

information.

with the time during

rpecified

by marking

ueere

to

Updatea date with

in etatic

problematic

If for

A

policy

of

databaees.

new :information

Furthermore,

propoeed

hirtory

ir

detabbucr more

about old

the unount

of data

impractical. here involvea

non-drtructive

updating of database rchemae coupled with a tranrlation mechanirm based on temporal logic which provider the ueer with a coherent

virtue!

uhemu.

Thir

schema built on top of the multiple method

dutructive

changer

automatic

tranrlation

avoids

the problema

to the datablue procedure.

schema It l voide

destructive schema change by maintaining

rtampr,

proceuing. current for

time rtamp

the

new

history

There

time

information future which

I: EKamplc

~1,%%~,W~

by appending

of time

Table

temporal

which that information

temporal

eccerr

for

updater.

are achieved

manipqletion

to

rchema

underlying

of rimple by providing the problem

old database

nonan of

rchemu..

non-dertructive

support

non-dertructive

ueen complex

of

do

be *collected.

data is maintained,

The approach

databm ia rimilar

queries

provide

databaaer

allowing

have, however, led

pouibility

for history

database8

through

is valid.

destructively,

and procuring the

rupport

to hirtory

information

with

they do not allow the ueer acceu to previour updatea improve efficiency. Recent

in data rtorage

rerearcherr

uren

A mapshot

Though lop and rollback processing provide a primitive

used in tranraction

concept of time, data. Drtruetive

their

a query.

databw

ir poaeible

may be quite large making e tranrfer

of diecouree.

old

stored ie current.

needed,

itema may not be available. 1. Introduction

formulating

restructuring

the

in

it leada to come even more

for reetructuring

Such

of the

on the urre

one or more echemu

m

mapping probhme. Traditional techniquea

because the information

ae a

frame

from

if the query rpanr achemu,

to the hirtory

burden

will

and can

be

become

valid

at a time following the current time. Non-dartructive updating introducr new problenu a truly evolving databaee. If the database schema ir allowed

in to

Proceedingsof the 13th VLDB Conference,Brighton 1987

EMPLOYEE EmpNo Sal 20K 2s 32K 41 3SK 134 35K 2s

Position Mechanic Inspect. Mechanic Inspect.

l-s IO 23 45 35

Tc 35 55 Now Now

MAINTENANCE Part ScrNo

Place

7s

Te

Wheel Door Door Wing

Atlanta N.Y. LA. Boston

10 35 5s

20 47

91 IO5 105 142

60

Database AIRPORT PIPCC Atlrntn

L.A.

Boston N.Y.

#Hangars 5 2 6 I

62 72

177

-.

x

2. Exampler To clarify databarer

let

of Temporal the irruer

ue examine The

maintenance.

in restructuring

a rimple

example.

information

containr

databaee

initial

(1) Modify

Schema Anomalier

involved

Thir

pertaining

databaee

conrirtr

data from MAINTENANCE

airplane of three

any attributer

information AIBPORT

about the employeea involved in the repaim; and which contaitu information about the locationr at

thm

irua,

take place.

repaim

in the Temporal

examined

Thh

Belational

are applicable

example

Model

to other history

of the Temporal

TBM rtamping

[l]

within

rupportr

a variation

the framework

to capture

the

relatione

(TVR).

TBIvl

behavior

among attributea

theory

in an effective

timertamp

attributes

(TSA’r):

between the old and new rchemae.

time-varying

time-

relation

attributer

database

TI

time-varying varying

rychronour

mlation.

schema hu (TI) to

difficult.

mlationr

Te = time to which tuple ia effective.

time-varying,

with

a the variable

current

which

[Ta,Te].

always

The

to the

equivalent

TRM

allowr

In TBM,

time-varying

relationr,

the real world. an event

both time-varying logical

Logical

actually

occurred

of both proactive

Bqistration

time

N

to the in&ant

double time-stamping algorithmically

in TBM

resulk

and semantically

of time when ruccerrful

updater

application

l ttributee.

time-rtamp

in TBM. in

by defining

Incorporation

Beorganicationr attributee

23. Probleme

can no longer

in a Icheme which ir both

state of the databue, new attributes

cannot

to enter hirtorical Suppose databue. EmpNo

increase

be collected.

a new attribute

of the inrpector

ruppoee requeeting

number

Thur

Becaure

dercribe

information

data into a reorganired

In particular,

the

probleme.

for tuplee which

the additional

of data

by the

are alwayr

ie non current.

been added, the items

dart and time end.

time

and

currant,

h

a mpair

new

time-varying

mlation,

ouch

additionr

probleme

ariee

due to the exietence

mlation.

When theee fomign conflicte Adding

ASSIGNED ae raying

to

the

l tili

may

keyr

of

C*UH

to

a

in

a

pcobleme.

of foreign

mfer to other

These

keyr

in the

time-varying

to a databuo

relation

of the employeee be mpmeented

ir to be tided.

by

the

time-vying

u in Table 2. Now the mlation

47) warn urigned of thir

becaure

mlatione attributee

ie

that new mlation mfen explicitly to other For example ruppoee a new mlation rtating

that come employeee

introduction

number

may ariee. a new time-varying

troublerome when exirting mlatibnr. ir

incmue

mlation.

itr exirtence

working

The meaning doer not extend

new

relation

could be interpreted

for the company

to no particular

Thii

airport

(ruch u befom

the

of the mlation through

the e&m

life of the database.

rehems. ir decided

Relationr

adding not

unclear

it may be imporrible

to a history to keep

and the EmpNo

the mechanic effecting that mpair in the MAINTENANCE mlation. The databw administrator ham the following optionr.

178

stamp

mlation

rince it ie alwayr

doee

EmpNo

a previour

required

ir to be added it

which,

L the

in

the data in the new relation

databam

relation

came reriour

be collected

between

with Adding

Though

mlatione

rimple.

which

in a relation

hu

ie

from

rtampm. Thir contained

am no time

mlation

between

which

however,

information

the earlier

ml&ion

am current

to a time

mlationr

at the came time ee the data in the new mlation.

of

Attributer

with Adding

in that

the data in the old relation

the aerignmente 2.2. Problenu

iteme

them

Becaure

the

to a non

information,

contain no time the information

a new, time-varying

in

time can be incorpomted

if needed, for any particular additional

of the

changer

allowing

and retro&ive

or user-defined

part

reprerent

in the real world,

repmention the model,

an integral

to better

time refen

information from

into a

adding

and non time-varying

time forme

in order

the

mlation by

murt be able to mtrieve

thir fact.

in the new relation

current

temporal

by adding temporal

Thue there ir conflict

together

time.

relation&

them

t

Becaure

with the time-rtampr

Ta and Te are the integere

“Now”

ree, the approach

to adding an attribute

L hi&o&al,

relation

of the time-stamp

we rhall

information

which though

because,

encoding

domain

itr

of (2) in which a mapping ir

accomplirhed

adding

Ftetrieving

The ryrtem

outdated difficult

be

ir rimilar

have been expanded

way.

Time-Start

valid in the interval

h

a non time-varying

can

and Te, mlation

explicitly

value ia auociated

with

Time Stampr

changing

outdated

an attribute

in (1).

with Adding

Because

TI = time from which tuple ir effective

TI and Te, if it ir continuously

if

models.

and Time-End (Te). Tbeee time & l ttributee correepond the lower and uppar bounda of the time interval.

In a TVR,

MAINTENANCE

provided

of time-varying

relation

the old relation

ir

and efficient

time-varying

over to the new

will be bat.

[l], but the

(TBM)

to deal with

ir dcrigned

that information

the probleme

relational

behavior

are deleted,

in thie paper ir a variation

attribute

of

of claeeical

independent

In this model, every

two mandatory

Model

relation

all the previous

will be transferred

avoiding

database

Belational

option

along with a new relation, MAINTENANCEIZ], with ik but do not tranrfer old data into the new echema, thur

2.2. Probleme 2.1. An Overview

thir

propored

databme

(TBM)

rchema, rchema,

Under

will appear under newly added l ttributu;

Null valuer (2) Keep

MAINTENANCE which containr information about of particular airplaner; EMPLOYEE which contain8

prcMnted

called.

rchenia.

relations: the npaim

which

the schema of the MAINTENANCE

a new rcheme

example

to

rchema

into

hirtory

Table 2 : ASSIGNED

the of

Empno 134 25

Airport N.Y. LA.

Ts loo 100

TC NOW Now

Proceedingsof the 13th VLDB Conference,Brighton 1987

ie

uwr In “inrertion

the

above

anomalier”

Codd originally anomalier attributer,

dircurrion

for hirtory

we

concentrated

on

databare-borrowing

used in 171. We could similarly

the

the term

dircurr

deletion

relationrhipr.

Alro,

the problenu

of attributa,

the time varying be thought

entities

nlationr

non-time

varying,

l nomaliee.”

of as “update

of the paper addmuer

of updating

or changing

and nlationrhipr,

developing

the

or of making

retrieved.

an approach

reducer

Any approach data from

hirtorical changing

echemu

the burden

in the rest

provide

a coherent

represent

provide

two

view of the data.

a comprehanrible

of the wr

capability

Fir&, it murt ir, it murt be able to

That

Reorganiring to update

hirtory

ie only

entail

rimply

however,

That

ir, it

may be beyond

the

to Schema tirganiration

hirtory

databaeee

database

in non-hirtory

There

Second,

view of the data.

Approach

All

one current replacing

dertructive

Thir

through

update

a new schema.

schema updating

being able problem

destructive

schema and updatea

it with

traditional

and Ahn

approach

I24

ir

to thir

schema

for hirtory

the databaee

rtate

evaluated.

A rollback

databaee

indexed

information index,

rtatic

for

logical

foundatione

index

which

are

relational

reeult

temporal

index

temporal

information

including

valid

a query hirtory valid

from Valid

provided

against

time provider

a particular

time

querier

in a rollback tranraction

a meane of dealing

to the

databare, time

will

of tranraction with

ground

theory,

theoretic.

againrt

theory

thii

the

queriu

ie that

world

in&ding

knowledge

they

conetraintr

the

multiple

and

m axioms in a to be proved

claimed

for ruch logical

support

fbr more real

rpuiGcation

be extended

hiitorically

which the

conetraink

view ecu the data ae

provide

Can ruch rupport

maintaining that it can.

again&

aa ~tatomeak

IQ]. One advantage

viewe of databwr

of the

The modeI theoretic

integrity

the integrity

and

Two viewr

IS].

The proof theoretic

atomic formulae,

Gmt order

order

have been developed:

repreeenting

queriee are evaluated.

on fit

of

temporal

to the problem

import-t

a&emu?

We

of fed

3.2.1. Firet Order Temporal

the

are

in

temporal

logicr

Kowalrki

[lS] propoaer

of Allen

McDermott here

temporal

in

Ill]

and proporu

the problem

development

He rtarta

language.

recently,

language called the eimihc

hie Gnt

to the one order

a modal temporal to expraw

He, however,

language;

been

of updaten in deductive of

with

have

[lo] and the

1121. Mom

a l trategy

a Gnt order language

purpose temporal

time

calculue

and Hayee

[14] tollowe

the

language.

tailored

of

a Gmt order temporal

event calcu11~ to deal with

rituationr.

thuwiee

a few of theee are the rituational

modal temporal

the

Logic

Gmt order

Saved

the intention

ia inkruted

a language

logic

language

applicabIe

of a

In a general in all temporal

We propoee a *p&al purpoee kmporaI to the requimmentr of echema updatee.

language

temporal

ae oppored

a particular

and the proof

formulae

propoeed

the rtatic

of the included

with

of databu

logic theoriw

logical

ir to be

againat

echemu

time rtampr,

am founded

eeee the data as a rtructure

databarer.

temporal

against

rtampr,

the combination

They

at which

a particular

databaee

the effect time

a query

can be made

frame,

aeeociated

Thur

the

by tranraction

time rtampr

database.

query

a mapping

there hu been a meurgence of inter&

view of databaeee

the user

a eequence of databaee

time,

Because time

pouible.

which

recordr

ae Gat order

propoeed,

to the

thir deficiency. which allowr

By eelecting

database.

a particular

database

againrt

transaction

entered.

a rtandard

reeulting effect

by

wu

an extension

mechanirm

to rpecify etater

euggert

databaeee

however,

Ae shown above,

ir inadequate

which in part correctr

a “rollback”

propoee providing

and

information

updating.

databuen. Snodgrau

relational

information.

ie eeeentially

e&emu.

databama

the

on the ueer by providing

Recently,

model theoretic

to under&and.

The Traditional

of

rehem? for a given ueer query.

databaeee

thingti.

the uee of a echema which

must not require

eolved

Schema Anomalier

old data and new data with equal facility.

it murt

Xl.

provide

MAINTENANCE

union

5.2. The Logic Approach

to deal with there

to dealing with the problem of accerring hirtory databucr with dynamically

murt

a

Such a query, though poeeible, could be quite Writing queries will become more difficult ae the

appropriate

in the with Temporal

both

get

database schema ir reetructumd becauw querier muet be written to embrace all rchemu ever in effect. Our propoeed approach

logic. Dealing

and

and vice versa, can

Our dircuuion

anomalies. 3. Approachw

accem

explicitly

cumbersome.

which would refer to the ride cffectr of deleting deleting time rtampr or deleting entire entities or

deGnition

to

MAINTENANCE[Z]

to the

record record. the rerult

3.2.2 Modal

the By of

Propolitionr different

give a full

thought

time and

different

old and new data

false.

logic

grew

worldr Complete

The diffculty with thir approach ir itr comprehenribility. Ueare murt be familiar with all databue rchemu in effect for the rcope of their queries. For example the rimple query “Lirt the aerial number of the planw repaired at Atlanta” nquirer the

which

and nlationr the rame

between

modal logiu

that

modal rtructure. work

hu

modal

propoeitione

between rtrategiee rtructun [lS]

to

can be true

In and

for modal logiu from a theory

Temporal

are generated

concentrated

logic.

theee worlde.

may be both

a modd

about

in which the worlde

Some recent

of

of u pertaining

thm

propoeition

and eound inference

new eentencee

dercribea

out

logic can be thought

of ae deGning the relationehipe

generate

time.

Logic modal

in modal worlds

uniformly.

Pmeedings of the 13th VLDB Conference, Brighton 1987

Temporal

Temporal

logiu

are

by the paoeage of

on the IIM of modal

179

temporal

logic ae a language

requenccr logiu

of progranu,

for reasoning

crpecially

about the execution

concurrent

program8

[16,17].

Taking the model theoretic view of databaaer, seem admirably ruited to the problem of reasoning

echemu. which

Esch achema

ir modeled

ir reprerented

A language

to expreee the relationrhipe

between

echemae murt

able to expreee relationrhips

between

logical theoriu.

modal accoae which

ir

therefore

relatione

between

theoriee

It ie bued on a temporal

and Wolper [la].

The

detaile

thi

of

logic developed

approach

only r&eon

by Manna

are provided

about

If

the

The termination

M infinity.

ordered

a dircrete

closed

rituation.

a theory

choice of a temporal deductive

choren

totally

reprerentr

databaee

of Schema Temporal

ie viewed

the databaee

achema

to comparable

of the databua

translate

queriae

echema,

rtate

in the

databw,

4.X Aaeociating

of

queriee

against

previour

the temporal

logic

need only

a current

against

into queriee against

databaee

ae a model

are proved

theoretic

data

by retrieving

but

ie not

preeent

in the echema

to the echema containing

from all form into

the data.

Schema Temporal

Logic Formulae

formulae

which

model

echemae.

The previour

the

current

echemae correepond

about which STL nwnr.

an STL

of the current

context

of the STL theoriw

clauur

indicate

of

databue

to the worldr Queriu

in the

genemted

schema are interpreted

of the previoue

celatiom

the

sat of STL

a

collection

modal rtructure theory

with Schemu

with

schema.

contained

The ground

in the

echema;

eentencee indicate the mlatione contained in other echemu. Queriee are made l gainet the set of STL formulae.

deal with

relatione

they contain database

pouible

no data.

e&emu

In thi

put

databw

particular

rchemu

domain

the requence

a total order terminated

forms

becauee of

by the preeent

and the origin. Schema Temporal Logic (STL) ie an attempt deeign a temporal logic which fits theee narrow requirementr.

to

mentioned

ground atomic formulae. ie anewemd immediately.

Opuaton

Informally, about

caiculur

extended

operatore generate Pnv All

anewered

thi temporal modal logic ir a logic oriented eequencee. It ie the clwical propoeitional

to reaeoning

by three temporal

are, Prev,

All,

Theee temporal

Intuitively

theee opemton

and Some.

true atatementa

in the followini

f iff in the previoue

f iff in all previour

oper+on.

previoue

In STL, generated databaw repreeentr contained univeree

by changee ie viewed a first

clause,

are the echemu

theory

in the database of diecouree,

which

(the

becaure

which

databue.

ae a model theoretic order

reuonr

universe

have been

If the history

deductive

databaee,

about

by the p-rage ia the earliert

is a half

proceu until

ie repeated

the query

cannot

which cannot

be

be found

for the queriee againet the ie anrwered

or

no further

ir poeeible.

relatione

from previoue

echcmu

through

Thir

suppose the query requiree relation the query ir anrwered

A. If A ir a ground

again& the current

echema.

If, on

the other hand, A ie not found among the ground C~BUMS, STL of the form A -> B. If l uch a eentence eeuchee for a untencer ie found, the query ie tranrlated eo that it ia a query againrt B If no ruch rntence can be found, rather than againrt A. the query failr and STL rerponde

that B cannot be found.

open

of time. The time in the

The echemu included in a hirtory database conrirt sot of cloeed intervale on the total order. The originr terminationr of there intervale co-pond to the creation

180

it

the data

of diecouree).

it ir temporal,

interval on a total order generated origin of thir half open interval databw.

that the query

deduction principle. The rule ueed here ie that if A For muet be found, and A -> B, then B murt be found.

world f ie true.

to the hiitory

reepondr

a natural

Logic Worlde the rtatw

Thir

rehemas

example, 4.2 Schemae uModal

If all relatione can be found, the query If mme ground atomic formula cannot

and STL

4.4. Inference Strategy STL retrievw

worlde f ie true

Some f iff in some previour

faile

tranrlation

world f ie true

The

first matched againet the

are

and the namee of the relationr

are returned.

caeee:

the

be found, STL tranrlatee a query into one againet the previous echema ueing the eentencee. If l uch a eentence cannot be found, the query

4.1. Temporal

in the query

by

in the

a previoue databaee. Other typee of temporal rtatemente are not mquired in thii problem domain. For example, one need not

alternative

the

from the databsle echema. Such queriee can fail incorrectly in a situation which containr more than one echema if the data ir

a form appropriate

in the next

the current

thur

about thir ryrtem.

in

Logic

To tranelate queriee made againrt

need

Each of there intervals,

In STL, each echema ir euociated 4. Detailr

the

STL

the databue;

about

the queries

of the

Becaure

intervale,

modal logic for reuoning

databaee,

eection.

rtatu

of these rchemaa.

arbitrarily

reprerent

present

a variant of one appearing

[16] and ir, in turn,

ir

queried. To inrure that data ir retrieved correctly rchemae, the query murt be tranrlated from ite initial

We have developed a model temporal logic, called Schema Temporal Logic (STL), to deal with temporal rchema anomalies

schemes

be

or echemae.

timer

interval

however,

Modal logice were deeigned precieely for thir rituation. Each theory or echema repreeentr a world and therefore the modal proporitione repreeent

reorgankation la&

tint order theory

by a

by the data it containr.

of

6. Example of an STL Solution to Temporal Schema Anomaliu To see how STL deale with the hirtory database echema

update

problem

let ue examine

of a

databaee.

and and

with each schema in the reorganired

two different

Proceedings

We will rhow the databaee reorganirationr

the example

repreeented

and the modal

hirtory

in table 1 after

formlae

auociated

databaeee.

of the 13th VLDB Conference.Brighton 1987

6.1 Example

Database

after First Reorganication.

Suppose the database in table 1 has been noqanised t = 100 to produce the database in table S. Three reorganirationa have taken place. Two new attribute haa been

.

at time

added to MAINTENANCE

producing

a new relation

schema (Table

the previour

schema (Table

be in&dad

in the

EMPLOYEE

gets carried

“loo”

new achema.

at the time

information;

3A) holds the old data which cannot For

axample,

the data

of raorganisation.

In gene&,

a

to “close”

in the old achema will be computed

and actual values rtoced.

New data is inserted

in the current

achema (Table 4).

heociated with the new databaw rchemu am a acts of this schema relatea formulae

These formulae tell how the information in to the previous schemas. The set of modal

aasociatad

with

The modal formula

thii

associated

in table SA; the formulae

database

is ae shown

with the praviour

auociated

in table

6.

achema is shown

with the current

schema are

shown in table SB.

Table

3: DE m

A. Relation MAINTENANCE SerNo Part 91 Wheel IO5 Door 105 Door 142 Wing

Alter

According

Sal 20K 32K 3JK 35K

MAINTENANCE SerNo Part AIRPLANE ScrNo Type

Position Mechanic Inspect. Mechanic Inspect. Place Tr

to the Previous

Schema

Accordin:

to the Current

Schema

MAINTENANCE Part ScrNo Door IO5 97 Wheel Door I05 AIRPLANE SetNo 91 IO5 127

Tr

Position Mechanic Inspect. Mechanic Inspect. Inspect. Inspect.

IO

23 45 36 I00 I21

According Ts IO 23 45 36

Tc 35 55 Now Now

Inspect. Te

ASSIGNED EmpNo I34 25 I56 I56

Tc I43 Now Now

TS ICI0 I00 100

YHaogarr 5 i I

TS Ill I24 I52

Mechanic I34 I34 I34

Inspect. 25 I56 25

Place N.Y L.A. N.Y.

Type 747 127 741

AIRPORT Place Atlanta L.A. Boston N.Y.

Te 35 55 Now Now 120 Now

Place K N.Y. L.A.

Tc II3 I32 I62 Ts IO0 loo loo I20

Tc Now Now 120 Now

Reorganization

to the Previous

Schema

Ts Tc IO 20 35 47 55 62 60 72

EMPLOYEE

EmpNo

8. Relations EMPLOt ‘BE Sal 2OK 25 41 32K 35K I34 35K 25 40K I56 45K I56

Rcor~anization

Ts Tc IO 20 35 47 55 62 60 12

Table 5: Modal Formulae Place Atlanta N.Y. L.A. Boston B. Relations

25 I47 134 25

According

Place Atlanta N.Y. L.A. Boston

in

relation does not. All of the time which read “Now” are changed to

schema all “Now’s”

modal formulae.

MAINTENANCE Part SerNo 91 Wheel I05 Door I05 Door I42 Win&

After

over to the next schema, wheraae data

from the old MAINTENANCE stampe in the old schema drtabaae

SB) holds current

A. Relation

also called

MAINTENANCE; a new relation, AIRPLANE, has been introduced; and a new ralationrhip, ASSIGNED, has been added. The new database

Table 4: DB Some

A. Modal

Formula

Associated

(I) MAINTENANCE to the Current

Schema

AIRPORT Place Atlanta L.A. Boston N.Y. Mechanic ASSIGNED EmpNo Place

B. Modal

Ts

(2) AIRPORT

Ts

TC

proceedings of the 13th VLDB Conference, Brighton 1987

Associated

(EmpNo.

DB

Example

with Prcv. Schema Part, Place, Ts. Te) with Curr. Schema

Sal. Position,

Ts. Tc)

(Place, rHanprr)

(3) MAINTENANCE

Te

(!&No.

Formulae

(I) EMPLOYEE

*Hangrrs 5 2 6 I

Auociatcd

(SerNo.

(4) AIRPLANE

(SerNo.

(5) ASSIGNED

(EmpNo.

Part, Inspector.

Mechanic.

Ts >- 100. Te)

Type, Ts >- 100. Tc) Type. Ts >- 100. f-e)

(6) MAlNTENANCE(SerNo. Part. Place, Ts. TC x 100) -> Prcv .MAINTENANCE(ScrNo. Part, Pl8ce. TS. Te)

181

6.2. Mapping

Qurriea

of the Example

Databare

after First

atampr

Reorg8nication To procem

a query

involving

a relation

with

added

attributes, the modal formulae tranrlate the query against the current databw into querier again& the current databue and previous

databaeee.

For example

SELECT

SerNo FROM WHERE

earlier wu

be trarulated

example

during

the query:

precirc boundarier Queriea return “unknown”

MAINTENANCE

ae a parameter.

one

of the TSQL

two

querier:

again&

the

language.)

one again&

a certain

For example

second.

(Ice

SerNo FROM WHERE

query

Pm

MAINTENANCE

the syrtem

can find the required

nor

Place = “Atlanta”

SerNo FROM

To perform MAINTENANCE

from

which

retrieved.

Formula S providu which

rpecify

h

the

attribute

ruch a relation,

dart of

a time

fir& lookr in the

ie a relation SerNo” but

greater

called can

it ir rertricted

or equal

will

to 109.

aho return

form A -> B where A ie a relation

Ehema

however,

in the

Querlar current handled.

achema.

schema

which

retrieve from

againrt

the

becauee it matchee the ground

wt of modal formulw

or only

The query

for that tihema.

information previous

only

achemu

from

can

alro

the be

MAINTENANCE

changer

4 hu

to the database

the

again been morganised.

are the deletion

MAINTENANCE

relation,

relation,

only

from

relation.

On the other hand,

Becauee none of the other

ASSIGNED.

will

will

appear

appear

as in table SC.

SerNo FROM WHEN

the previous

MAINTENANCE

changed,

the modal formulae The need to be changed.

MAINTENANCE

all formulae

achema. moved

Ta > 100

information

only

from

the current

MAINTENANCE

relation. reorganised which they

information

182

The database

in

database

in table 6B hae been

uaociated

thii

with the mlatioru with

databw

alao

altered by moving

relationa

in the cumnt which

are not

u being in the preview

The modal formulae

created by the recond reorganisation

associated

with

of the example

are rhown in table 7.

which have been

by adding temporal information, the rehem8 from are ntrievad murt be returned with the tuple. In

that way data from old whemu confured

from relatioru

npmented

(i.e., those demignated

are not changed.

the Khemaa databue

To retrieve

nlationr

echcma.

the cumnt

amociated with formulae are

auociated

The formulae forward

whema) retrieve

in 8B t

of the

The two pnvioue

u in tablea 6A and 6B.

the database

Place,

removal

from table 4.

forward SELECT

of the attribute,

and the

are changed, they are all moved to the new current

Because the database information

will

databw

6A ir not changed;

Te < 199

retrlevcr

Here, the ryrtem

>= 0,Te < 100)).

The only

in table

he new database

WHEN

in

reprerented

databurr SerNo FROM

ir unknown.

“unknown(ASSIGNED(Ta

encoded

can give an indication

6.3 Example Databaee after a Second Reorganization Suppow now that at time t = 200 the

from

For example, SELECT

the ryrtem

from

called “SerNo” can be retrieved. Formula 6 ia m STL queries from the MAINTENANCE can be anewered

atomic formula

named MAINTENANCE

Te = 60

Using the information

“unknown”.

the modal formulae,

(u to why the information

previotu

may

ASSIGNED

WHEN

return

in the preview

relationahipr the query

be

etart ir rpecified in the query being proceued, a hart of 0 la auumed. Thus STL looks for a formula of the

found

added

Sal FROM EMPLOYEE WHERE EmpNo = SELECT EmpNo FROM

time

relation

involving

in the above example,

Because no time

which a attribute such a formula,

the ground

the query to one eyrtam will return

>= 0,Te < 109))“. querlu

SELECT

STL

to ICC if there

to queriar

in neither

MAINTENANCE

Place = “Atlanta”.

thii traneformation

formulae

relation.

“unknown”.

relation

which trandak Therefore the

the rentencea

Similarly, return

WHERE

AIRPLANE

TI = 60,

“unknown(AIRPLANE(Ta

UNION

atomic

with the query

for a

[lo]

The new translated

again& another

ground

if presented

SerNo FROM WHEN

clauses,

SELECT

information

time frame, but will not know the

of that currency. generate negative propositiona will which with the negation of the negative proposition

firer

the

would be: SELECT

will in the

Place = “Atlanta”

into

databua;

di=uuion

of ambiguity

due to the lack of information

The user will know that the l ulier

rchemsr.

current

SELECT would

Some mewure

were not requested.

result from ouch retrievalr

with

without

data from the current

time rtampe

schema for which

will not be the time

Pmce&ings

of the 13th VLDB Conference, Brighton 1987

Table 6: Database m

Al~cr Second Reorganization

A. Relation According IO the First Schema MAINTENANCE ScrNo Part 91 Wheel IOS Door IO5 Door 142 Wing

Place Atlanta N.Y. L.A. Boston

Ts 10 35 55 60

C. Modal Formulae Associated with Currcnl Schema (I) EMPLOYEE (EmpNo. Sal. Position, Ts. Tc)

Tc 20 47 62 72

(2) AIRPORT (Place. *Hangars) (3) MAINTENANCE (4) AIRPLANE

B. Relations According to the Previous Schema MAINTENANCE ScrNo PIlt 105 D@X 97 Wheel IO5 DlXX

Place N.Y LA. N.Y.

Inspector 25 I56 25

ASSIGNED EmpNo Place 134 N.Y. 25 N.Y. 156 N.Y. I56 L.A.

Ts 100 IO0 100 I21

TC Now Now I20 Now

Mechanic 134 134 I34

Ts III 124 IS2

TC 113 132 162

(ScrNo. Part. Inspector, Mechanic, Ts >- 200. Ts)

(ScrNo, Type. Ts .- 100. Te)

(5) ASSIGNED (EmpNo. Type. Ts, Tc < 200) -, Prev ASSIGNED (EmpNo. Type, Ts, Te) (6) MAINTENANCE(SerNo. Part. Place, Inspector. Mechanic, Ts. Tc < 200) -> Prcv MAINTENANCE(ScrNo. Part, Place, Inspector. Mechanic, Ts. fc)

C. Relations According to the Current Schema EMPLOYEE EmpNo Sal 25 20K 47 32K 134 35K 25 35K I56 40K I56 45K

Position Mechanic Inspector Mechanic Inspector Inspector Inspector

Ts IO 23 45 36 100 120

MAINTENANCE !krNo Part Inspector Mechanic Ts

AIRPORT Place Atlanta L.A. Boston N.Y.

Tc :: Now Now 120 Now

#Hangars 5 : I

6.4. Mapping

Qucricr

Ts I00 100 100

Database

after Second

Now the query: Tc SELECT

AIRPLANE ScrNo TYW 747 97 727 10s I27 747

on the Example

Reorganiration

&No

FROM

WHERE

Te I43 Now Now

muat be translated fit-at databare, current

“Atlanta”

into a union of three queriw:

one against

databane.

SELECT

MAINTENANCE

Place =

the recond,

one again&

the

and one against

the

Thin query will be:

SerNo FROM

Prev Prev MAINTENANCE

WHERE

Place = ‘Atlanta”,

UNION

ScrNo FROM Prev MAINTENANCE

SELECT

. Table 7: Modal Formulae Associated Example Database

WHERE

Place = “Atlanta”

UNION A. Modal Formula Associated with First Schema (I) MAINTENANCE

8. Modal Formulae Associated with Previous Schema (I) MAINTENANCE

SerNo FROM MAINTENANCE WHERE Place = “Atlanta”.

SELECT

(ScrNo. Part. Place. Ts. Te)

(ScrNo. Part. Place, Inspector. Mechanic. Ts >- 100, Te)

(2) ASSIGNED (EmpNo. Type. Ts >- 100, Te) (3) MAINTENANCE(SC~NO. Part. Place. Ts. Tc < 100) ‘> Prev MAINTENANCEJSerNo. Part, Place, Ts, Te)

STL performa

achema ia queried. querying

again&

by firat

rchcma.Thir

new

looking

at the

The query can m the current ir retrieved query

by

ia again

tranalated by the modal formulae asrociatcd with the previous schema into two queries: one againat ita previous rchema (Prev) and one againrt translation

of the 13th VLDB Conference, Brighton 1987

translation

The rert of the information the previour

the firat achema (Prev

achema can completely

Prdgs

thir

ground atomic formulae of the current achema. be partially answered from the current rchema,

ratirfy

Prev).

the query

Becaure

it receives,

the first

no further

ia ncccaaary.

183

Conclusion The clear including

conclusion

temporal

non-destructive situation

information

updates

requiring

attempted

to

will introduce

to them.

Modai

temporal

for rolving

achemu

difficulties

work

through

updater.

is that

a policy

of

in an evolving This paper has has ruggerted a

and

logic

seems

to

that

be

occur

a

promising

when

Because modal logier describe

temporal collections

of worlds with well defined interactions, they appear to offer eernantiu tailored to the problem of retrieving information from multiple rehemas. Each schema repwentr a single world within the modal rtructure the reasoning retrieved

from

required

about which the modal logic reaaonr.

required

to determine

another

to retrieve

Formal

Theories

whether

information

echema can be divorced

information

within

Thus, need be

from

the logic

the schema.

Publishing,

1985) pp. 136.

[lS] Robert

Kowaiski.

for many helpful

like to thank

Alex

Papachrirtidir

diiuuione.

Oxford

and Rafi Ahmed. Language”,

[Z] Richard

Snodgrass

Comnuter,

19:2, September

[S] Richard

Snodgraae

Databues,”

6:1, January

An&in,

[4] Ariav,

Gad, Aaron

Temporal

Data Model”

[S] Clifford, Historical Record

‘A Temporal

UF-CIS

Relational

Technical

Verification

in the Event About

Science 6, 1982, pp. 101-156.

Logic: The Lewir-Modal

Systems

Press), 1973.

1984, pp. 68-93.

E. A. Ememon, and A. P. Sirtla. “Automatic

of Finite-State

Logic Specifications”,

Concurrent

Systems Using Temporai

ACM Transactions

and Syrtemr,

8:2, April

A. Pneuli,

Temporal

Analyril

Princider

of Programming

Information

Report

on Programming

1988, pp. 244-288.

S. Shelah, and J. St&.

of Fairness”,

“On the

&WC. 7th ACM wmwrium

Lanmmgee, Lu

on

Vegas, January

1980,

and R. Ahmed.

Databuee”,

“TSQL--A

Proc. of Temnorai

Systems, North-Holland,

Language Aenectr

Interface

of

May 1987.

TR-

Databues”,

1988, pp. 36-42.

and Ileoo Ahn. “A Taxonomy

SIGMOD,

Cognitive

University

[17] E. M. Clarke,

for Temporai

and Ilsoo Ahn. “Temporal

Proc. Int’l

Ablex

[IS] Zohar Manna and Pierre Wolper. “Synthesis of Communicating Processes from TemporaI Logic Specifications”, ACM Transactions on Programming Lannuanes and Syrtemq

1191 S.B. Navathe, [I] S.B. Nsvathe,

Updates

in

(Nomood:

pp. 168-17s. Referencea

ModaI and a query && April 1986.

“Database

[IS] 1. Jay Zeman Modal (London:

[la] D. Gabbay, would

Manifesto”,

Sense World,

Calculus”, Imperial College, July 1986. 1141 Drew McDermott. “A Temporal Logic for Reasoning

Languages

Acknowledgments The authors

of the Common

Processes and Planr”,

the problems

are updated.

this

difficulties

rchema

these

possible solution candidate

from

in a database

datablw

explore

[12] P. J. Hayes “The Second Naive Physic.

to draw

cont. Management

of time in

of Data, ACM

TX, May 1986, pp. 136-246. Belier,

and Howard

James and Abdullah RelationaI

L. Morgan.

New York Univerisitv, Databases:

“A

December

1984.

Ur Tansel. “On an Algebra Two Views”

for

ACM SIGMOD

1986, pp. 247-265.

[0] Gadia,

Shashi K. “Toward

Temporai

Databw”

a Multihomogeneous

Model for a

IEEE Cont. on Data Engineering

1986, pp.

390-597. [7] E. F. Codd. “A Relational Data Burke”, [8] Iierve

CACM,

Gailaire,

and Databaeee:

Model of Data for Large Shared

13:6, June 1970.

Jack Minker,

A Deductive

and Jean-Marie

Approach”,

Nicolaa.

Computing

“Logic

Surveys,

162, June 1984. [Q] Raymond Relational Brodie,

Raiter.

“Towude

Database

Theory”,

J. Mylopoalos,

a Logical

Fleconrtructionr

in On Conceptual

and J. Schmidt

(edr.),

Modeling,

of M.

(Springer-Verlag,

1985). [lo] J. McCarthy and P. J. Hayes. “Some Philosophical Problems from the Standpoint of Artificiai Intelligence”, in Machine Intellinence 4, (Edinburg: Edinburg University Press, lQ69). [ll]

Jamer Allen.

Intervals”,

184

CACM,

“Maintaining

Knowledge

26:11, November

about Temporal

1983, pp. 832-843.

Permission to copy without fee all or part of this material is grantedprovided that the copies are not made or distributed for direct commercial advantage, the VLDB copyright notice and the title of the publication and-its date appear, and notice is given that copying is by permissionof the Very Large Data Base Endowment. To copy otherwise, or to republish, requires a fee and/or specialpermissionfrom the Endowment.

Proceedingsof the 13th VLDB Conference,Brighton 1987