Supporting

Valid-time

Indeterminacy

Curtis

E.

Dyreson

and

Richard

T.

Snodgrass

TR

JAMES

COOK

UNIVERSITY

OF

NORTH

QUEENSLAND

DEPARTMENT

OF

COMPUTER

SCIENCE

TOWNSVILLE

QUEENSLAND

AUSTRALIA

Title

Supporting

Valid-time

Indeterminacy

Primary

Author

-LRB-

s

-RRB-

Curtis

E.

Dyreson

and

Richard

T.

Snodgrass

Contact

Information

Curtis

Dyreson

Department

of

Computer

Science

James

Cook

University

Townsville

Queensland

Australia

curtis@cs.jcu.edu.au

Richard

T.

Snodgrass

Department

of

Computer

Science

University

of

Arizona

Tucson

Arizona

rts@cs.arizona.edu

Date

December

ISSN

Copyright

c

Curtis

E.

Dyreson

and

Richard

T.

Snodgrass

All

rights

reserved

Abstract

In

valid-time

indeterminacy

it

is

known

that

an

event

stored

in

a

database

did

in

fact

occur

but

it

is

not

known

exactly

when

the

event

occurred

In

this

paper

we

extend

the

SQL

data

model

and

query

language

to

support

valid-time

indeterminacy

We

represent

the

occurrence

time

of

an

event

with

a

set

of

possible

instants

delimiting

when

the

event

might

have

occurred

and

a

probability

distribution

over

that

set

We

also

describe

query

language

constructs

to

retrieve

information

in

the

presence

of

indeterminacy

These

constructs

enable

users

to

specify

their

credibility

in

the

underlying

data

and

their

plausibility

in

the

relationships

among

that

data

A

denotational

semantics

for

SQL

's

select

statement

with

optional

credibility

and

plausibility

constructs

is

given

We

show

that

this

semantics

is

reliable

in

that

it

never

produces

incorrect

information

maximal

in

that

if

it

were

extended

to

be

more

informative

the

results

may

not

be

reliable

and

reduces

to

the

previous

semantics

when

there

is

no

indeterminacy

Although

the

extended

data

model

and

query

language

provide

needed

modeling

capabilities

these

extensions

appear

initially

to

carry

a

significant

execution

cost

A

contribution

of

this

paper

is

to

demonstrate

that

our

approach

is

useful

and

practical

An

efficient

representation

of

valid-time

indeterminacy

and

efficient

query

processing

algorithms

are

provided

The

cost

of

support

for

indeterminacy

is

empirically

measured

and

is

shown

to

be

modest

Finally

we

show

that

the

approach

is

general

by

applying

it

to

the

temporal

query

language

constructs

being

proposed

for

Overview

Most

databases

record

the

history

of

an

enterprise

Such

databases

associate

with

each

event

a

timestamp

indicating

when

that

event

occurred

Often

a

user

knows

only

approximately

when

an

event

happened

For

instance

she

may

know

that

it

happened

between

PM

and

PM

sometime

last

week

or

around

the

middle

of

the

month

These

are

examples

of

valid-time

indeterminacy

Information

that

is

valid-time

indeterminate

can

be

characterized

as

do

n't

know

when

information

or

more

precisely

do

n't

know

exactly

when

information

This

kind

of

information

has

various

sources

including

the

following

ffl

Granularity

mismatch

In

many

cases

the

granularity

with

which

data

is

recorded

is

finer

than

the

precision

to

which

the

occurrence

time

of

an

event

is

known

For

example

an

occurrence

time

known

to

within

one

hour

recorded

on

a

system

with

timestamps

in

the

granularity

of

a

second

happened

sometime

during

that

hour

but

during

which

second

is

unknown

ffl

Dating

techniques

Many

dating

techniques

such

as

dating

-LSB-

-RSB-

are

inherently

imprecise

ffl

Uncertainty

in

planning

Projected

completion

dates

are

often

inexactly

specified

e.g.

the

project

will

complete

three

to

six

months

from

now

ffl

Unknown

or

imprecise

event

times

In

general

occurrence

times

could

be

unknown

or

imprecise

For

example

perhaps

we

do

not

know

when

a

student

in

the

first

grade

was

born

The

student

's

date

of

birth

could

be

recorded

in

the

database

as

either

unknown

-LRB-

she

was

born

between

the

beginning

and

the

end

of

time

-RRB-

or

imprecise

-LRB-

she

was

born

between

five

and

seven

years

ago

-RRB-

ffl

Clock

measurements

Every

clock

measurement

has

some

imprecision

-LSB-

-RSB-

This

paper

proposes

the

valid-time

indeterminate

data

model

and

its

implementation

The

model

adds

valid-time

indeterminacy

to

SQL

-LSB-

-RSB-

We

identified

several

design

goals

to

be

met

in

extending

SQL

with

indeterminacy

First

we

wanted

the

syntactic

extensions

to

be

minimal

yet

highly

expressive

Timestamps

should

include

a

representation

for

valid-time

indeterminacy

and

users

should

be

able

to

control

via

query

language

constructs

the

amount

of

indeterminacy

present

in

derived

information

Second

we

wanted

the

extensions

to

be

upward

compatible

with

SQL

In

the

absence

of

valid-time

indeterminacy

the

syntax

and

semantics

should

reduce

to

that

of

SQL

Third

the

semantics

should

be

simple

and

intuitive

In

particular

information

should

not

be

invented

during

queries

And

finally

it

was

critical

that

valid-time

indeterminacy

have

little

impact

on

the

performance

of

the

DBMS

either

in

space

to

store

indeterminate

timestamps

or

in

query

evaluation

time

Unfortunately

these

design

goals

conflict

as

discussed

further

in

Section

Earlier

work

required

a

three-valued

-LSB-

-RSB-

or

four-valued

logic

-LSB-

-RSB-

Probabilistic

approaches

-LRB-

e.g.

-LSB-

-RSB-

-RRB-

are

highly

expressive

but

have

a

query

evaluation

cost

which

is

proportional

to

the

number

of

probable

alternatives

The

number

of

such

alternatives

can

easily

number

in

the

millions

for

a

single

indeterminate

time

and

thus

probabilistic

approaches

are

impractical

if

directly

applied

in

a

temporal

context

More

recent

work

models

indeterminacy

by

using

a

constraint

network

At

best

using

a

restricted

network

query

evaluation

complexity

has

been

shown

to

be

cubic

-LSB-

-RSB-

in

the

number

of

constraints

Our

approach

uses

probabilistic

weights

yet

achieves

a

linear

query

evaluation

complexity

with

a

nominal

increase

in

storage

cost

The

next

section

introduces

an

example

requiring

the

storage

of

valid-time

indeterminate

information

this

example

will

be

used

throughout

the

paper

We

then

examine

the

representation

of

valid-time

indeterminacy

After

that

we

explore

what

it

means

to

retrieve

information

from

a

database

with

valid-time

indeterminacy

We

outline

syntactic

and

semantic

extensions

to

SQL

to

support

retrieval

of

valid-time

indeterminate

information

and

argue

their

correctness

We

then

show

how

valid-time

indeterminacy

can

be

implemented

Although

retrieving

valid-time

indeterminate

information

may

appear

to

be

expensive

we

demonstrate

that

an

efficient

implementation

exists

The

final

sections

apply

these

same

notions

to

a

temporal

query

language

trace

related

work

summarize

our

approach

and

discuss

future

work

Proofs

for

all

theorems

can

be

found

in

the

Appendix

Motivating

Example

An

example

database

is

shown

in

Figure

This

database

models

a

single

company

with

two

warehouses

and

one

airplane

factory

The

warehouses

supply

parts

to

the

factory

Each

warehouse

keeps

a

Sent

relation

which

records

when

parts

were

shipped

from

the

warehouse

to

the

factory

The

factory

maintains

the

In

Production

relation

which

is

a

production

history

of

airplanes

built

by

the

factory

This

relation

includes

a

period

the

other

two

relations

include

instant

paper

will

use

the

-LSB-

-RSB-

term

period

to

denote

an

anchored

duration

of

time

e.g.

the

year

in

place

of

the

term

interval

-LSB-

JCE

-RSB-

which

appears

more

commonly

in

the

literature

as

interval

is

used

in

SQL

to

denote

an

unanchored

duration

of

time

e.g.

one

year

timestamps

For

each

relation

we

assume

an

underlying

timestamp

granularity

of

one

Valid-time

indeterminacy

naturally

arises

in

both

base

relations

and

derived

relations

The

During

attribute

of

the

In

Production

base

relation

is

an

indeterminate

period

This

is

because

the

granularity

of

the

In

Production

relation

is

a

month

A

month

is

an

indeterminate

value

that

represents

a

set

of

possible

days

Production

on

an

airplane

started

on

some

day

in

the

indicated

month

but

we

can

not

be

sure

which

one

For

example

production

on

the

Centurion

with

serial

number

started

sometime

between

-LRB-

inclusive

-RRB-

March

and

March

For

this

example

we

assume

that

production

is

equally

likely

to

have

started

or

ended

during

any

day

in

an

indicated

month

although

in

general

we

allow

nonuniform

likelihoods

The

Received

relation

is

not

maintained

by

either

the

factory

or

a

warehouse

rather

it

is

a

derived

relation

the

product

of

educated

guesswork

Parts

are

shipped

by

truck

from

a

warehouse

and

arrive

at

the

factory

no

earlier

than

four

and

no

later

than

twenty-four

days

after

they

leave

a

warehouse

The

Received

relation

is

computed

from

each

warehouse

's

Sent

relation

by

adding

a

-LCB-

day

fudge

factor

to

the

When

attribute

The

valid

times

in

the

Received

relation

are

indeterminate

that

is

we

know

roughly

when

the

parts

were

received

but

we

do

not

know

exactly

which

day

they

were

received

We

will

assume

that

each

day

in

the

recorded

range

of

days

is

equally

likely

For

example

the

batch

of

engines

received

from

the

Boeing

warehouse

arrived

on

one

of

the

days

in

the

set

fJune

June

June

but

we

have

no

reason

to

favor

one

day

over

another

Queries

can

make

use

of

indeterminate

information

in

the

database

Suppose

that

a

few

of

the

Centurion

airplane

owners

report

a

faulty

wing

strut

Naturally

we

would

like

to

query

the

database

to

determine

which

warehouse

-LRB-

s

-RRB-

supplied

the

defective

parts

and

specifically

which

lots

are

implicated

-LRB-

we

give

such

a

query

in

Section

-RRB-

In

SQL

with

valid-time

indeterminacy

we

could

query

to

determine

which

shipment

of

wing

struts

overlaps

the

production

of

a

Centurion

airplane

Overlap

is

the

operation

of

temporal

intersection

There

are

two

well-defined

limits

on

an

answer

to

a

query

in

an

incomplete

information

database

the

definite

answer

and

the

possible

answer

-LSB-

-RSB-

The

definite

answer

is

the

information

that

satisfies

the

query

in

all

possible

extensions

of

the

database

while

the

possible

answer

is

the

information

that

satisfies

the

query

in

some

possible

extension

of

the

database

-LRB-

we

formalize

these

bounds

in

Section

-RRB-

For

example

consider

a

temporal

selection

on

the

Received

relation

that

selects

those

tuples

received

prior

to

June

Even

though

the

exact

date

the

shipment

of

lot

number

from

the

Boeing

warehouse

arrived

is

unknown

it

is

clear

that

this

shipment

arrived

before

June

-LRB-

the

shipment

arrived

on

some

day

in

the

set

fMay

May

May

-RRB-

This

tuple

and

no

other

is

in

the

definite

answer

to

the

query

Lot

number

from

the

Cessna

warehouse

is

in

the

possible

answer

to

the

query

It

is

possible

that

this

shipment

arrived

prior

to

June

-LRB-

and

also

possible

that

it

did

not

-RRB-

Similarly

lot

number

from

the

Boeing

warehouse

possibly

arrived

prior

to

June

The

first

shipment

from

the

Boeing

warehouse

is

also

in

the

possible

answer

because

a

definite

answer

is

also

a

possible

answer

but

not

vice-versa

Between

the

possible

and

definite

limits

lie

other

answers

For

instance

assume

that

it

is

equally

likely

for

each

day

in

fJune

June

June

that

lot

number

arrived

For

the

shipment

to

have

arrived

prior

to

June

it

had

to

arrive

on

either

June

or

June

If

all

the

days

are

considered

to

be

equally

likely

then

there

is

a

probability

of

only

-LRB-

chances

out

of

-RRB-

that

the

the

shipment

was

received

prior

to

June

So

it

is

improbable

that

lot

number

expository

purposes

only

we

adopt

a

non-SQL

format

for

temporal

constants

e.g.

May

rather

than

Sent

by

Boeing

-LRB-

Lot

Num

Part

When

-RRB-

Sent

by

Cessna

-LRB-

Lot

Num

Part

When

-RRB-

Lot

Num

Part

When

wing

strut

May

engine

June

Lot

Num

Part

When

wing

strut

May

wing

strut

June

In

Production

-LRB-

Model

Serial

Num

During

-RRB-

Model

Serial

Num

During

Centurion

-LSB-

March

March

-LCB-

June

June

-RSB-

Cutlass

-LSB-

June

June

-LCB-

July

July

-RSB-

Centurion

-LSB-

June

June

-LCB-

August

August

-RSB-

Caravan

-LSB-

April

April

-LCB-

May

May

-RSB-

Received

-LRB-

Warehouse

Lot

Num

Part

When

-RRB-

Warehouse

Lot

Num

Part

When

Boeing

wing

strut

May

May

Cessna

wing

strut

May

June

Boeing

engine

June

June

Cessna

wing

strut

June

July

Figure

An

example

database

arrived

prior

to

June

However

it

is

probable

that

both

lot

number

-LRB-

probability

chances

out

of

-RRB-

and

lot

number

did

arrive

-LRB-

probability

-RRB-

The

definite

possible

and

probable

answer

to

the

temporal

selection

are

portrayed

in

Figure

If

the

query

language

can

make

use

of

a

probability

distribution

over

the

possible

times

associated

with

an

indeterminate

instant

a

richer

query

language

results

one

not

restricted

to

the

definite

and

possible

answers

The

richness

of

the

query

language

however

must

not

compromise

efficient

implementation

nor

detract

from

the

intuitiveness

of

the

language

There

are

two

stages

to

determining

an

answer

to

a

query

The

first

stage

retrieves

the

data

that

is

relevant

to

the

query

The

second

stage

constructs

an

answer

that

satisfies

the

conditions

specified

in

the

query

We

provide

separate

controls

on

the

indeterminacy

for

each

stage

Correlation

credibility

-LRB-

potentially

-RRB-

changes

the

information

available

to

query

processing

by

replacing

each

indeterminate

time

value

with

a

relevant

determinate

time

value

A

typical

replacement

is

the

expected

value

or

probabilistic

mean

For

example

the

expected

start

of

production

for

the

Centurion

with

serial

number

is

March

-LRB-

the

expectation

of

the

uniform

distribution

over

a

sequence

of

values

is

the

half-way

point

in

that

sequence

-RRB-

In

SQL

with

indeterminacy

the

user

can

express

this

preference

by

selecting

an

appropriate

correlation

credibility

value

The

chosen

correlation

credibility

potentially

modifies

every

time

value

in

the

associated

relation

removing

the

indeterminacy

Ordering

plausibility

controls

the

construction

of

an

answer

to

the

query

For

instance

a

Centurion

owner

could

query

which

shipment

of

wing

struts

plausibly

arrived

during

production

of

The

Definite

Answer

Warehouse

Lot

Num

Part

When

Boeing

wing

strut

May

May

The

Probable

Answer

Warehouse

Lot

Num

Part

When

Boeing

wing

strut

May

May

Cessna

wing

strut

May

June

The

Possible

Answer

Warehouse

Lot

Num

Part

When

Boeing

wing

strut

May

May

Cessna

wing

strut

May

June

Boeing

engine

June

June

Figure

Answers

to

example

queries

his

or

her

plane

Intuitively

such

a

query

relaxes

the

constraints

on

the

relationship

between

the

production

times

and

the

day

a

shipment

was

received

from

do

they

definitely

overlap

to

is

it

probable

that

they

overlap

or

perhaps

to

is

it

even

remotely

possible

that

they

overlap

The

user

selects

the

kind

of

overlap

that

she

or

he

requires

by

setting

an

appropriate

ordering

plausibility

value

It

is

probable

that

lot

number

from

the

Cessna

warehouse

was

received

during

production

of

the

Centurion

with

serial

number

but

one

can

not

be

absolutely

sure

that

it

did

There

is

a

natural

division

between

indeterminacy

in

the

data

and

indeterminacy

in

the

query

The

support

for

valid-time

indeterminacy

that

we

add

to

SQL

allows

the

user

to

control

both

kinds

of

indeterminacy

Correlation

credibility

replaces

indeterminacy

in

the

data

while

ordering

plausibility

governs

the

probability

of

relationships

among

the

data

Extending

the

Data

Model

with

Indeterminacy

In

this

section

we

discuss

how

to

represent

indeterminate

instants

periods

and

intervals

in

the

data

model

In

Section

we

discuss

how

these

representations

are

implemented

Model

of

the

Time-line

We

briefly

summarize

the

simple

standard

model

of

time

that

we

adopt

for

this

paper

The

model

is

presented

in

detail

elsewhere

-LSB-

-RSB-

Time

has

a

standard

geometric

metaphor

In

this

metaphor

time

itself

is

a

line

segment

-LRB-

assuming

a

bounded

universe

-RRB-

a

point

on

the

time-line

is

called

an

instant

the

time

between

two

instants

is

known

as

a

time

period

-LRB-

period

for

short

-RRB-

and

a

length

or

unanchored

segment

of

the

time-line

is

an

interval

The

time-line

segment

is

partitioned

into

a

finite

number

of

smaller

segments

each

of

which

is

called

a

chronon

-LSB-

JCE

-RSB-

A

chronon

is

the

smallest

amount

of

time

that

can

be

represented

in

the

implementation

The

chronons

are

consecutively

labeled

with

the

integers

in

the

sequence

N

where

N

is

the

number

of

values

that

a

timestamp

can

represent

The

domain

of

time

values

is

the

set

of

chronons

and

two

special

values

and

which

are

used

to

represent

the

beginning

of

time

instant

and

the

ending

of

time

instant

respectively

Indeterminate

Instants

An

instant

is

a

point

on

the

time-line

An

instant

is

determinate

if

it

is

known

when

-LRB-

i.e.

during

which

particular

chronon

-RRB-

it

is

located

Often

however

we

do

not

know

the

exact

chronon

during

which

an

instant

is

located

instead

we

only

know

that

the

instant

is

located

sometime

during

a

set

or

range

of

chronons

We

call

such

an

instant

an

indeterminate

instant

The

indeterminacy

refers

to

the

location

of

the

instant

rather

than

to

the

existence

of

the

instant

An

indeterminate

instant

is

described

by

a

lower

support

an

upper

support

and

a

probability

mass

function

-LRB-

p.m.f.

-RRB-

-LSB-

-RSB-

The

supports

are

chronons

that

delimit

when

the

instant

is

located

the

instant

is

no

earlier

than

during

the

lower

support

and

no

later

than

during

the

upper

support

Between

the

supports

lies

a

period

of

indeterminacy

The

period

of

indeterminacy

is

a

contiguous

set

of

possible

chronons

The

instant

is

located

during

some

chronon

in

this

set

but

which

chronon

is

unknown

We

denote

a

set

of

possible

chronons

that

extends

from

the

lower

support

to

the

upper

support

using

the

notation

e.g.

May

May

The

Probability

Mass

Function

Although

the

instant

is

located

during

some

possible

chronon

not

all

the

possible

chronons

are

equally

likely

For

example

it

could

be

that

the

instant

is

most

likely

located

during

the

earliest

chronon

in

the

period

of

indeterminacy

The

probability

mass

function

gives

the

probability

of

each

chronon

The

probability

mass

function

P

for

the

indeterminate

instant

is

P

-LRB-

i

-RRB-

Pr

-LSB-

i

-RSB-

i

Ng

where

Pr

-LSB-

i

-RSB-

is

the

probability

that

the

instant

is

located

during

chronon

i

Since

the

instant

is

not

any

time

outside

the

period

of

indeterminacy

Pr

-LSB-

i

-RSB-

and

Pr

-LSB-

i

-RSB-

All

indeterminate

instants

are

considered

to

be

independent

that

is

Pr

-LSB-

i

j

-RSB-

Pr

-LSB-

i

-RSB-

Pr

-LSB-

j

-RSB-

Like

most

other

probabilistic

approaches

in

databases

-LSB-

-RSB-

no

provisions

are

made

for

joint

or

dependent

probabilities

An

indeterminate

instant

is

denoted

using

the

notation

-LRB-

P

-RRB-

Mass

Function

Sources

The

probability

mass

function

for

an

indeterminate

instant

is

supplied

by

the

user

In

many

common

cases

the

probability

mass

function

for

an

indeterminate

instant

stems

from

the

source

of

the

indeterminacy

ffl

Granularity

mismatch

The

uniform

or

equi-probable

mass

function

is

a

useful

assumption

For

example

an

instant

known

to

within

one

hour

and

recorded

on

a

system

with

timestamps

in

the

granularity

of

a

second

happened

sometime

during

that

hour

but

during

which

particular

second

is

unknown

and

there

is

no

there

is

no

a

priori

reason

to

favor

one

second

over

another

ffl

Dating

techniques

A

property

of

radioactive

dating

techniques

is

that

the

estimate

is

described

by

a

normal

bell-shaped

curve

distribution

ffl

Uncertainty

in

planning

Analysis

of

past

data

-LRB-

the

past

data

may

be

readily

available

in

a

temporal

database

-RRB-

can

sometimes

provide

a

good

indicator

of

future

performance

-LRB-

when

used

carefully

-RRB-

For

instance

we

may

not

know

exactly

when

an

airline

will

depart

However

an

analysis

of

past

departure

times

for

that

route

type

of

airline

and

day

of

the

week

-LRB-

the

analysis

could

be

much

more

elaborate

-RRB-

may

show

that

this

flight

tends

to

leave

later

than

scheduled

Based

on

this

analysis

a

probably

late

distribution

could

be

used

for

the

departure

time

of

that

flight

ffl

Unknown

or

imprecise

instants

Typically

if

the

location

of

an

instant

is

unknown

the

distribution

is

also

unknown

In

these

situations

a

user

can

specify

that

the

distribution

is

missing

-LRB-

see

below

-RRB-

ffl

Clock

measurements

Clock-specific

distributions

model

the

imprecision

of

specific

clock

measurements

-LSB-

-RSB-

Dey

and

Sarkar

provide

several

additional

means

of

determining

the

underlying

mass

function

-LSB-

-RSB-

In

some

case

a

user

just

may

not

know

the

underlying

mass

function

because

that

information

is

unavailable

or

the

mass

function

might

exceed

the

implementation

capacities

of

the

system

-LRB-

Section

describes

the

implementation

and

the

constraints

it

imposes

on

mass

functions

-RRB-

In

such

cases

the

distribution

can

be

specified

as

missing

A

distribution

that

is

missing

represents

a

complete

lack

of

knowledge

about

the

distribution

It

is

a

kind

of

second-order

incompleteness

that

is

the

distribution

that

is

missing

is

incomplete

information

about

indeterminate

information

Unlike

some

other

probabilistic

data

models

-LSB-

-RSB-

we

do

not

allow

partially

known

distributions

While

the

terminology

introduced

so

far

suggests

a

difference

between

indeterminate

and

determinate

instants

it

is

instructive

to

note

that

an

indeterminate

instant

can

be

used

to

model

a

determinate

instant

A

determinate

instant

is

modeled

by

an

indeterminate

instant

with

a

singleton

set

of

possible

chronons

A

determinate

instant

records

that

an

instant

is

located

sometime

during

a

particular

chronon

Without

loss

of

generality

we

assume

that

a

determinate

instant

represents

any

real-world

instant

during

a

chronon

Hence

at

an

abstract

level

the

exact

real-world

instant

modeled

by

a

determinate

instant

is

never

precisely

known

At

best

only

the

chronon

during

which

it

is

located

is

known

Indeterminate

Periods

and

Intervals

A

determinate

period

is

the

time

between

two

In

our

model

of

time

it

is

represented

by

a

sequence

of

chronons

denoted

by

the

starting

and

terminating

chronons

in

the

sequence

A

period

bounded

by

indeterminate

instants

-LRB-

called

the

starting

and

terminating

instants

-RRB-

is

termed

an

indeterminate

period

An

indeterminate

period

could

start

during

any

member

of

the

set

of

possible

chronons

of

the

starting

instant

Likewise

the

indeterminate

period

could

end

during

any

member

of

the

set

of

possible

chronons

of

the

terminating

instant

Since

the

location

of

the

starting

and

terminating

instants

are

known

only

imprecisely

it

follows

that

it

is

unknown

precisely

when

an

indeterminate

period

begins

or

ends

A

determinate

interval

is

a

precisely

known

duration

of

time

e.g.

six

days

and

is

represented

as

a

count

of

chronons

An

indeterminate

interval

on

the

other

hand

is

an

imprecise

duration

the

period

data

type

is

not

in

-LSB-

-RSB-

it

is

included

in

-LSB-

-RSB-

that

describes

a

set

of

possible

durations

An

indeterminate

interval

is

represented

by

an

imprecise

number

of

chronons

e.g.

from

two

to

three

chronons

The

representation

of

an

indeterminate

interval

has

an

associated

probability

mass

function

which

gives

the

likelihood

of

each

possible

duration

We

turn

now

from

the

data

model

to

the

query

semantics

Syntactic

Extensions

to

SQL

In

this

section

we

summarize

the

syntactic

extensions

to

SQL

to

support

the

storage

and

retrieval

of

valid-time

indeterminate

information

from

a

database

Full

coverage

of

the

syntactic

extensions

can

be

found

elsewhere

-LSB-

-RSB-

In

the

next

section

we

provide

a

formal

semantics

for

these

constructs

To

support

valid-time

indeterminacy

three

syntactic

extensions

to

SQL

are

needed

-LRB-

-RRB-

to

indicate

that

a

temporal

attribute

is

indeterminate

-LRB-

-RRB-

to

specify

the

correlation

credibility

and

-LRB-

-RRB-

to

specify

the

ordering

plausibility

The

first

syntactic

extension

to

indicate

that

an

attribute

is

indeterminate

involves

the

schema

specification

statements

In

the

create

table

statement

a

user

may

add

either

the

modifier

INDETER

MINATE

or

INDETERMINATE

COMPACT

after

an

instant

period

or

interval

attribute

specification

to

specify

that

the

value

may

be

indeterminate

The

two

modifiers

toggle

between

alternative

storage

strategies

for

indeterminate

timestamps

discussed

in

Section

-LRB-

the

compact

version

is

a

less

expressive

smaller

timestamp

-RRB-

We

also

add

an

optional

with

phrase

to

the

end

of

the

create

table

statement

that

allows

the

user

to

specify

standard

or

nonstandard

mass

functions

These

two

categories

of

mass

functions

are

also

discussed

in

Section

The

default

is

WITH

STANDARD

DISTRIBUTION

To

the

alter

table

statement

we

provide

clauses

that

allow

any

of

these

aspects

to

be

changed

Below

are

some

examples

of

the

extended

create

table

and

alter

table

statements

CREATE

TABLE

Received

-LRB-

Warehouse

CHARACTER

-LRB-

-RRB-

Lot

Num

INTEGER

Part

CHARACTER

-LRB-

-RRB-

When

INDETERMINATE

DATE

-RRB-

CREATE

TABLE

In

Production

-LRB-

Model

CHARACTER

-LRB-

-RRB-

Serial

Num

CHARACTER

-LRB-

-RRB-

During

INDETERMINATE

PERIOD

-LRB-

DATE

-RRB-

-RRB-

ALTER

TABLE

Received

ALTER

COLUMN

When

TO

NONSTANDARD

DISTRIBUTION

The

second

syntactic

extension

supports

correlation

credibility

The

from

clause

in

the

select

statement

declares

the

relations

over

which

the

query

is

to

be

evaluated

and

associates

correlation

name

-LRB-

s

-RRB-

with

each

relation

The

specified

correlation

credibility

is

denoted

via

a

WITH

CREDIBILITY

phrase

and

is

applied

to

each

time

value

-LRB-

instant

period

or

interval

-RRB-

in

the

relation

associated

with

the

specified

correlation

name

The

credibility

is

one

of

the

following

four

values

INDETERMINATE

-LCB-

Retain

all

the

indeterminacy

by

leaving

the

time

values

unchanged

EXPECTED

-LCB-

Replace

each

indeterminate

time

value

with

the

expected

value

Select

this

to

compute

the

expected

result

for

a

query

MAX

-LCB-

Replace

each

indeterminate

time

value

with

the

lower

support

-LRB-

except

for

an

instant

that

starts

a

period

in

which

case

use

the

upper

support

-RRB-

For

periods

this

value

eliminates

all

the

indeterminacy

For

instants

it

uses

the

earliest

possible

instant

while

for

intervals

the

shortest

possible

interval

is

chosen

MIN

-LCB-

Replace

each

indeterminate

time

value

with

the

upper

support

-LRB-

except

for

an

instant

that

starts

a

period

in

which

case

use

the

lower

support

-RRB-

For

periods

this

value

converts

all

the

indeterminate

information

to

determinate

information

For

instants

it

chooses

the

latest

possible

instant

while

for

intervals

the

longest

possible

interval

is

used

The

credibility

phrase

is

optional

and

has

an

initial

default

value

of

INDETERMINATE

This

default

value

can

be

changed

using

a

SET

CREDIBILITY

statement

The

third

syntactic

extension

concerns

the

ordering

plausibility

The

ordering

plausibility

is

the

plausibility

in

the

where

predicate

among

the

instants

periods

and

intervals

that

participate

in

the

predicate

The

default

ordering

plausibility

is

specified

using

a

SET

PLAUSIBILITY

statement

The

default

ordering

plausibility

can

be

over-ridden

in

a

select

statement

by

appending

a

WITH

PLAUSIBILITY

phrase

to

the

end

of

the

where

clause

The

ordering

plausibility

is

an

integer

value

between

and

-LRB-

inclusive

-RRB-

and

has

an

initial

default

value

of

An

ordering

plausibility

of

indicates

that

any

possible

answer

is

desired

-LRB-

i.e.

the

where

predicate

can

be

satisfied

by

any

possible

extension

-RRB-

an

ordering

plausibility

of

requests

the

definite

answer

-LRB-

i.e.

the

where

clause

must

be

satisfied

by

all

possible

extensions

-RRB-

An

example

query

illustrating

the

various

constructs

is

shown

in

Figure

Intuitively

the

query

will

determine

within

the

specified

plausibility

and

credibility

levels

which

wing

strut

shipments

were

received

during

production

of

each

Centurion

The

from

clause

specifies

that

all

information

regardless

of

its

credibility

from

the

In

Production

relation

should

be

used

-LRB-

via

the

specified

credibility

of

INDETERMINATE

-RRB-

The

where

clause

selects

pairs

of

Centurion

and

wing

strut

tuples

that

overlap

with

a

plausibility

of

Finally

the

target

list

determines

when

the

shipment

of

possibly

defective

parts

was

received

When

this

query

is

applied

to

the

database

shown

in

Figure

the

relation

shown

in

Figure

is

computed

We

will

discuss

in

detail

in

Section

how

this

query

is

evaluated

to

obtain

the

indicated

result

Semantic

Extensions

to

SQL

In

this

section

we

extend

the

semantics

of

SQL

to

support

indeterminacy

The

presentation

focuses

on

SQL

's

select

statement

We

first

provide

a

brief

review

of

the

semantics

of

the

select

statement

We

then

extend

the

semantics

to

support

indeterminacy

The

evaluation

of

a

select

in

the

extended

semantics

has

a

possible

and

a

definite

interpretation

as

well

as

other

interpretations

that

lie

between

those

bounds

We

show

that

the

possible

interpretation

is

both

reliable

in

that

it

does

not

invent

information

and

maximal

insofar

as

it

can

not

be

strengthened

to

produce

more

results

However

the

indeterminate

semantics

does

not

demonstrate

that

indeterminacy

can

be

efficiently

implemented

Consequently

we

introduce

an

operational

semantics

The

operational

semantics

provides

all

the

necessary

support

for

indeterminacy

with

three

changes

to

the

SQL

semantics

First

it

redefines

the

temporal

ordering

relation

Before

Second

it

introduces

a

domain

for

the

evaluation

of

where

clause

predicates

And

third

it

adds

a

Replace

operator

to

effect

correlation

credibility

Each

of

the

changes

incorporates

the

determinate

semantics

-LRB-

as

the

default

-RRB-

Hence

the

semantics

of

existing

queries

is

left

unchanged

We

show

that

the

operational

semantics

correctly

implements

the

indeterminate

semantics

SET

PLAUSIBILITY

SELECT

r.Warehouse

r.Lot

Num

p.Serial

Num

r.When

FROM

Received

AS

r

WITH

CREDIBILITY

INDETERMINATE

In

Production

AS

p

WITH

CREDIBILITY

INDETERMINATE

WHERE

p.Model

Centurion

AND

r.Part

wing

strut

AND

r.When

OVERLAPS

p.During

Figure

An

example

query

Warehouse

Lot

Num

Serial

Num

When

Boeing

May

May

Cessna

May

June

Cessna

June

July

Figure

Result

of

the

example

query

Review

of

SQL

Semantics

In

this

section

we

present

a

simplified

semantics

for

the

select

statement

Our

goal

in

this

presentation

is

to

highlight

those

aspects

of

the

statement

that

will

be

impacted

by

valid-time

indeterminacy

a

theme

which

we

will

develop

in

subsequent

sections

We

will

use

the

notation

-LSB-

-LSB-

x

-RSB-

-RSB-

SQL

to

denote

the

meaning

of

the

syntactic

SQL

construct

x

The

top-level

of

a

denotational

semantics

for

the

select

statement

applied

to

a

database

d

is

given

below

-LSB-

-LSB-

SELECT

htarget

listi

FROM

hfrom

listi

WHERE

hpredicatei

-RSB-

-RSB-

SQL

-LRB-

d

-RRB-

-LSB-

-LSB-

htarget

listi

-RSB-

-RSB-

SQL

-LRB-

-LSB-

-LSB-

WHERE

hpredicatei

-RSB-

-RSB-

SQL

-LRB-

-LSB-

-LSB-

hfrom

listi

-RSB-

-RSB-

SQL

-LRB-

d

-RRB-

-RRB-

-RRB-

The

select

statement

first

applies

the

from

clause

to

the

database

This

clause

computes

the

Cartesian

product

of

the

relations

specified

in

the

hfrom

listi

The

meaning

of

the

from

clause

is

-LSB-

-LSB-

hfrom

listi

-RSB-

-RSB-

SQL

-LRB-

d

-RRB-

-LSB-

-LSB-

hrelationni

-RSB-

-RSB-

SQL

-LRB-

d

-RRB-

-LSB-

-LSB-

-RSB-

-RSB-

SQL

-LRB-

d

-RRB-

-LSB-

-LSB-

hrelationni

-RSB-

-RSB-

SQL

-LRB-

d

-RRB-

where

-LSB-

-LSB-

hrelationii

-RSB-

-RSB-

SQL

-LRB-

d

-RRB-

ri

ri

d

and

ri

is

named

hrelationii

The

result

computed

by

the

from

clause

an

intermediate

relation

r

is

then

used

as

an

argument

for

the

where

clause

This

clause

selects

those

tuples

that

satisfy

the

hpredicatei

in

the

where

clause

-LSB-

-LSB-

WHERE

hpredicatei

-RSB-

-RSB-

SQL

-LRB-

r

-RRB-

ft

j

t

r

-LSB-

-LSB-

hpredicatei

-RSB-

-RSB-

SQL

-LRB-

t

-RRB-

g

Note

that

the

correlation

names

appearing

in

hpredicatei

will

need

to

be

mapped

to

the

attributes

in

the

tuple

t

This

is

generally

done

by

passing

the

symbol

table

as

a

second

argument

to

-LSB-

-LSB-

-RSB-

-RSB-

SQL

For

simplicity

we

omit

that

argument

We

will

restrict

the

presentation

to

predicates

that

are

logical

formulae

constructed

from

comparison

operations

and

boolean

connectives

and

will

rely

upon

the

readers

background

knowledge

of

SQL

to

supply

the

meaning

of

each

SQL

hpredicatei

e.g.

the

standard

Boolean

logic

applies

-LSB-

-LSB-

hpredicatei

AND

hpredicatei

-RSB-

-RSB-

SQL

-LRB-

t

-RRB-

-LSB-

-LSB-

hpredicatei

-RSB-

-RSB-

SQL

-LRB-

t

-RRB-

-LSB-

-LSB-

hpredicatei

-RSB-

-RSB-

SQL

-LRB-

t

-RRB-

In

the

final

step

the

output

of

the

where

is

projected

onto

the

desired

domains

specified

by

the

htarget

listi

-LSB-

-LSB-

htarget

listi

-RSB-

-RSB-

SQL

-LRB-

r

-RRB-

ss

-LSB-

-LSB-

htarget

listi

-RSB-

-RSB-

SQL

-LRB-

r

-RRB-

Here

we

also

ignore

the

mapping

of

correlation

names

to

attributes

of

r.

Supporting

the

Syntactic

Extensions

Since

the

current

SQL

semantics

does

not

support

indeterminacy

the

extended

syntax

can

only

be

supported

in

a

new

extended

semantics

which

we

denote

as

-LSB-

-LSB-

-RSB-

-RSB-

ind.

The

extensions

presented

in

Section

include

two

additional

controls

on

the

indeterminate

information

the

correlation

credibility

and

the

ordering

plausibility

These

values

will

appear

as

additional

parameters

ffi

and

respectively

to

-LSB-

-LSB-

-RSB-

-RSB-

ind.

Both

values

can

be

specified

using

SET

DEFAULT

statements

The

meanings

of

the

SET

DEFAULT

statements

are

given

below

Assume

S

is

any

SQL

statement

-LSB-

-LSB-

SET

DEFAULT

CREDIBILITY

ffi

S

-RSB-

-RSB-

ind

-LRB-

ffi

d

-RRB-

-LSB-

-LSB-

S

-RSB-

-RSB-

ind

-LRB-

d

-RRB-

-LSB-

-LSB-

SET

DEFAULT

PLAUSIBILITY

S

-RSB-

-RSB-

ind

-LRB-

ffi

d

-RRB-

-LSB-

-LSB-

S

-RSB-

-RSB-

ind

-LRB-

ffi

d

-RRB-

The

default

values

can

be

over-ridden

within

the

select

statement

itself

Here

we

show

how

to

over-ride

the

plausibility

default

in

Section

we

show

how

to

over-ride

the

credibility

default

-LSB-

-LSB-

SELECT

htarget

listi

FROM

hfrom

listi

WHERE

hpredicatei

WITH

PLAUSIBILITY

-RSB-

-RSB-

ind

-LRB-

ffi

d

-RRB-

-LSB-

-LSB-

SELECT

htarget

listi

FROM

hfrom

listi

WHERE

hpredicatei

-RSB-

-RSB-

ind

-LRB-

ffi

d

-RRB-

The

initial

default

credibility

is

INDETERMINATE

and

initial

default

plausibility

is

An

Overview

of

the

Indeterminate

Semantics

In

this

section

we

give

an

overview

of

the

indeterminate

semantics

and

discuss

several

properties

that

a

semantics

involving

incomplete

information

should

possess

In

later

sections

we

show

that

our

semantics

does

indeed

have

these

essential

properties

The

indeterminate

semantics

for

the

select

statement

is

outlined

below

This

semantics

has

the

same

structure

as

the

SQL

semantics

-LSB-

-LSB-

SELECT

htarget

listi

FROM

hfrom

listi

WHERE

hpredicatei

-RSB-

-RSB-

ind

-LRB-

ffi

d

-RRB-

-LSB-

-LSB-

htarget

listi

-RSB-

-RSB-

ind

-LRB-

-LSB-

-LSB-

WHERE

hpredicatei

-RSB-

-RSB-

ind

-LRB-

-LSB-

-LSB-

hfrom

listi

-RSB-

-RSB-

ind

-LRB-

ffi

d

-RRB-

-RRB-

-RRB-

The

SQL

and

indeterminate

semantics

differ

in

two

ways

First

the

indeterminate

semantics

has

additional

parameter

-LRB-

s

-RRB-

but

note

that

ffi

is

utilized

only

in

the

from

list

and

is

utilized

only

in

the

where

predicate

and

target

list

Second

the

select

statement

has

a

different

meaning

in

the

indeterminate

semantics

Let

's

consider

what

the

meaning

should

be

intuitively

A

select

statement

applied

to

a

database

containing

only

complete

information

and

evaluated

under

SQL

semantics

has

a

single

interpretation

In

contrast

a

retrieval

from

a

database

containing

incomplete

information

has

at

least

two

interpretations

One

interpretation

is

that

the

query

selects

information

that

possibly

matches

the

retrieval

constraints

The

second

interpretation

is

that

the

query

selects

information

that

definitely

matches

the

retrieval

constraints

Which

interpretation

is

adopted

is

specified

by

the

user

via

syntactic

constructs

in

the

query

It

is

important

however

to

guarantee

that

a

query

avoids

producing

impossible

results

That

is

a

query

should

be

constrained

to

compute

a

subset

of

the

possible

interpretation

and

a

superset

of

the

definite

interpretation

We

formalize

this

by

introducing

the

concept

of

a

completion

An

indeterminate

instant

can

be

thought

of

as

a

set

of

possible

instants

one

of

which

is

the

actual

instant

but

which

one

is

unknown

Each

of

the

possible

instants

represents

a

different

complete

description

of

reality

Each

possibility

is

termed

a

completion

of

the

The

following

definition

captures

this

intuition

Definition

-LRB-

Completion

of

an

indeterminate

instant

-RRB-

Let

-LRB-

P

-RRB-

A

completion

of

is

i

where

i

is

a

determinate

instant

such

that

i

The

set

of

all

completions

for

an

instant

is

denoted

C

-LRB-

-RRB-

Completions

of

periods

and

intervals

also

exist

A

completion

of

an

indeterminate

period

is

one

in

which

its

delimiting

-LRB-

indeterminate

-RRB-

instants

are

both

replaced

by

their

completions

A

completion

of

an

indeterminate

interval

is

one

of

the

possible

durations

The

concept

can

also

be

generalized

to

apply

to

tuples

relations

and

databases

A

completion

of

x

be

it

a

tuple

relation

or

database

is

xc

where

xc

is

the

same

as

x

but

with

each

indeterminate

instant

period

and

interval

replaced

by

a

completion

of

that

value

The

set

of

all

completions

for

an

entity

x

is

denoted

C

-LRB-

x

-RRB-

In

the

indeterminate

semantics

the

possible

interpretation

of

the

select

statement

is

attained

by

using

a

plausibility

of

while

the

definite

interpretation

is

given

by

adopting

a

plausibility

of

We

focus

on

the

where

clause

to

show

the

difference

in

these

two

interpretations

The

definite

interpretation

of

the

where

clause

is

given

below

-LSB-

-LSB-

WHERE

hpredicatei

-RSB-

-RSB-

ind

-LRB-

r

-RRB-

ft

j

t

r

C

-LRB-

t

-RRB-

-LRB-

-LSB-

-LSB-

hpredicatei

-RSB-

-RSB-

SQL

-LRB-

-RRB-

-RRB-

g

The

definite

interpretation

selects

only

those

tuples

that

are

selected

by

the

SQL

semantics

-LRB-

note

the

use

of

-LSB-

-LSB-

hpredicatei

-RSB-

-RSB-

SQL

-RRB-

in

every

completion

of

the

tuple

The

possible

interpretation

differs

only

slightly

It

selects

only

those

tuples

that

are

selected

by

the

SQL

semantics

in

some

completion

of

the

tuple

-LSB-

-LSB-

WHERE

hpredicatei

-RSB-

-RSB-

ind

-LRB-

r

-RRB-

ft

j

t

r

C

-LRB-

t

-RRB-

-LRB-

-LSB-

-LSB-

hpredicatei

-RSB-

-RSB-

SQL

-LRB-

-RRB-

-RRB-

g

This

semantics

is

reliable

in

the

sense

that

it

never

produces

incorrect

For

a

semantics

to

be

reliable

the

result

of

a

where

clause

on

a

completion

of

a

relation

r

in

the

SQL

semantics

should

be

consistent

with

the

result

in

the

indeterminate

semantics

on

the

relation

r.

Theorem

-LSB-

-LSB-

WHERE

hpredicatei

-RSB-

-RSB-

ind

-LRB-

r

-RRB-

is

reliable

that

is

for

any

where

clause

W

C

-LRB-

r

-RRB-

-LSB-

-LSB-

-LSB-

W

-RSB-

-RSB-

SQL

-LRB-

-RRB-

C

-LRB-

-LSB-

-LSB-

W

-RSB-

-RSB-

ind

-LRB-

r

-RRB-

-RRB-

-RSB-

introduced

the

completion

of

a

temporal

tuple

and

of

a

temporal

relation

-LSB-

-RSB-

Our

definition

extends

this

notion

to

indeterminate

instants

periods

and

intervals

and

to

conventional

tuples

relations

and

databases

containing

such

values

we

adopt

the

notions

of

reliability

and

later

maximality

used

by

Gadia

-LSB-

-RSB-

Proof

Proofs

are

given

in

the

Appendix

The

semantics

is

also

maximal

in

that

if

the

semantics

were

extended

to

be

more

informative

i.e.

allow

more

completions

then

the

result

may

no

longer

be

reliable

From

the

previous

theorem

we

know

that

-LSB-

-LSB-

W

-RSB-

-RSB-

ind

-LRB-

r

-RRB-

contains

all

the

needed

completions

We

need

to

determine

that

it

contains

no

extraneous

completions

Theorem

-LSB-

-LSB-

WHERE

hpredicatei

-RSB-

-RSB-

ind

-LRB-

r

-RRB-

is

maximal

i.e.

for

any

where

clause

W

C

-LRB-

-LSB-

-LSB-

W

-RSB-

-RSB-

ind

-LRB-

r

-RRB-

-RRB-

-LSB-

C

-LRB-

r

-RRB-

-LRB-

c

-LSB-

-LSB-

W

-RSB-

-RSB-

SQL

-LRB-

-RRB-

-RRB-

-RSB-

Note

that

these

two

theorems

in

concert

demonstrate

that

for

all

where

clauses

W

and

indeterminate

relations

r

C

-LRB-

-LSB-

-LSB-

W

-RSB-

-RSB-

ind

-LRB-

r

-RRB-

-RRB-

-LSB-

-LRB-

r

-RRB-

-LSB-

-LSB-

W

-RSB-

-RSB-

SQL

-LRB-

-RRB-

Observe

that

if

the

database

has

only

complete

information

there

is

only

one

completion

and

effectively

just

a

single

interpretation

of

a

query

since

the

possible

and

definite

interpretations

are

equivalent

So

the

credibility

and

plausibility

have

no

effect

whatsoever

on

existing

databases

which

contain

only

complete

information

and

the

semantics

of

extant

SQL

queries

and

databases

is

unchanged

by

extensions

to

support

indeterminacy

This

important

property

is

termed

temporal

upward

compatibility

-LSB-

-RSB-

In

the

context

of

indeterminacy

it

is

also

equivalent

to

stating

that

the

indeterminate

data

model

is

a

generalization

-LSB-

-RSB-

of

the

determinate

-LRB-

SQL

-RRB-

data

model

The

possible

and

definite

interpretations

are

just

two

of

the

many

interpretations

available

in

the

indeterminate

semantics

Other

interpretations

result

from

choosing

other

credibility

and

plausibility

values

These

interpretations

are

related

Increasing

the

plausibility

setting

in

a

select

statement

yields

a

more

definite

interpretation

It

is

essential

however

to

ensure

that

these

other

interpretations

will

not

generate

spurious

results

We

guarantee

this

by

demonstrating

-LRB-

in

Section

-RRB-

that

evaluating

a

select

statement

in

the

indeterminate

semantics

is

monotonic

in

the

plausibility

Each

result

at

a

higher

plausibility

setting

is

a

subset

of

the

result

at

a

lower

plausibility

Supporting

Ordering

Plausibility

Both

the

possible

and

definite

interpretations

of

a

query

in

the

indeterminate

semantics

are

stated

in

terms

of

the

SQL

semantics

Unfortunately

a

straightforward

implementation

of

these

interpretations

would

be

highly

impractical

since

it

would

require

computing

the

predicate

over

every

possible

completion

of

a

tuple

in

the

inner

loop

of

query

processing

There

could

be

many

completions

for

each

tuple

depending

on

the

duration

of

the

period

of

indeterminacy

As

an

example

there

are

seven

billion

completions

of

a

single

indeterminate

period

that

has

delimiting

instants

with

a

period

of

indeterminacy

of

one

day

assuming

a

chronon

size

of

one

second

Consequently

we

introduce

an

operational

semantics

-LSB-

-LSB-

-RSB-

-RSB-

op

that

implements

the

indeterminate

semantics

We

later

show

that

the

operational

semantics

is

efficient

satisfies

the

goals

outlined

above

and

is

fully

consistent

with

the

indeterminate

semantics

-LSB-

-LSB-

-RSB-

-RSB-

ind.

Probabilistic

Ordering

The

ordering

plausibility

-LRB-

primarily

-RRB-

impacts

the

meaning

of

the

where

clause

The

semantics

of

the

where

predicate

without

indeterminacy

is

based

on

a

well-defined

ordering

of

the

instants

in

the

underlying

relations

Every

temporal

predicate

-LRB-

e.g.

OVERLAPS

-RRB-

and

temporal

constructor

-LRB-

e.g.

PERIOD

-LRB-

hinstant

valuei

hinstant

valuei

-RRB-

-RRB-

refers

to

the

ordering

given

by

Before

to

determine

the

truth

value

of

the

predicate

or

the

instant

or

period

returned

by

the

constructor

For

example

consider

the

following

OVERLAPS

predicate

-LSB-

-LSB-

OVERLAPS

PERIOD

-LRB-

-RRB-

-RSB-

-RSB-

SQL

Before

-LRB-

-LSB-

-LSB-

-RSB-

-RSB-

SQL

-LSB-

-LSB-

-RSB-

-RSB-

SQL

-RRB-

Before

-LRB-

-LSB-

-LSB-

-RSB-

-RSB-

SQL

-LSB-

-LSB-

-RSB-

-RSB-

SQL

-RRB-

A

set

of

determinate

instants

has

a

single

temporal

ordering

Given

a

temporal

expression

consisting

of

temporal

predicates

and

temporal

constructors

this

ordering

either

satisfies

the

expression

or

fails

to

satisfy

it

A

set

of

indeterminate

instants

however

typically

has

many

possible

temporal

orderings

due

to

the

many

completions

of

those

instants

Some

of

these

temporal

orderings

are

plausible

while

others

are

implausible

The

user

specifies

which

orderings

are

plausible

by

setting

an

appropriate

ordering

plausibility

value

We

stipulate

that

a

temporal

expression

is

satisfied

if

there

exists

a

plausible

ordering

between

pairs

of

instants

that

satisfies

each

predicate

in

the

expression

This

semantics

reduces

to

that

of

the

determinate

case

when

there

is

only

one

ordering

In

the

SQL

semantics

Before

is

the

relation

on

the

representation

of

instants

-LRB-

i.e.

on

chronons

-RRB-

Before

-LRB-

ff

-RRB-

In

the

operational

indeterminate

semantics

the

temporal

ordering

is

instead

based

on

the

probability

that

one

instant

is

before

another

We

define

that

probability

first

and

then

give

the

new

ordering

operation

Definition

-LRB-

Probabilistic

ordering

-RRB-

For

any

two

indeterminate

instants

and

the

probability

that

is

before

is

Pr

-LSB-

-RSB-

P

i

j

Pr

-LSB-

i

-RSB-

Pr

-LSB-

j

-RSB-

i

j

Ng

Figure

-LRB-

a

-RRB-

shows

the

value

of

Pr

-LSB-

-RSB-

-LRB-

to

two

decimal

places

-RRB-

for

each

pair

of

instants

in

the

relation

Received

e.g.

Pr

-LSB-

-RSB-

Those

instants

are

placed

on

a

time-line

in

Figure

-LRB-

b

-RRB-

The

probabilistic

ordering

assumes

that

there

are

no

dependencies

between

the

probabilities

associated

with

indeterminate

instants

Hence

it

can

not

be

used

to

accurately

compute

the

probability

of

orderings

such

as

Pr

-LSB-

-LRB-

-RRB-

-RSB-

To

handle

indeterminate

instants

in

a

flexible

manner

we

define

a

new

operator

BeforeI

that

includes

an

additional

parameter

the

ordering

plausibility

The

value

of

can

be

any

integer

between

and

-LRB-

inclusive

-RRB-

In

general

higher

-LRB-

closer

to

-RRB-

ordering

plausibilities

stipulate

that

only

highly

probable

orderings

be

considered

plausible

Definition

-LRB-

Indeterminate

Before

-RRB-

Let

and

be

a

pair

of

indeterminate

instants

BeforeI

-LRB-

ff

-RRB-

fg

if

-LRB-

Pr

-LSB-

-RSB-

-RRB-

-RRB-

-LRB-

Pr

-LSB-

-RSB-

-RRB-

-RRB-

fTrueg

if

-LRB-

Pr

-LSB-

-RSB-

-RRB-

-RRB-

-LRB-

Pr

-LSB-

-RSB-

-RRB-

-RRB-

fF

alseg

if

-LRB-

Pr

-LSB-

-RSB-

-RRB-

-RRB-

-LRB-

Pr

-LSB-

-RSB-

-RRB-

-RRB-

fTrue

F

alseg

if

-LRB-

Pr

-LSB-

-RSB-

-RRB-

-RRB-

-LRB-

Pr

-LSB-

-RSB-

-RRB-

-RRB-

-LRB-

a

-RRB-

table

of

Pr

-LSB-

-RSB-

-LRB-

b

-RRB-

relative

time-line

location

Figure

Pr

-LSB-

-RSB-

for

the

indeterminate

instants

in

Received

In

the

operational

semantics

BeforeI

is

defined

on

the

power

set

of

the

standard

boolean

domain

-LRB-

a

four-sorted

domain

cf.

-LSB-

-RSB-

-RRB-

There

are

four

possible

outcomes

for

BeforeI

on

a

pair

of

instants

In

the

first

case

the

relationship

does

not

hold

nor

does

its

negation

and

BeforeI

evaluates

to

the

empty

set

In

the

second

the

relationship

holds

but

its

negation

does

not

and

BeforeI

evaluates

to

fTrueg

In

the

third

case

the

relationship

does

not

hold

but

its

negation

does

BeforeI

evaluates

to

fF

alseg

The

fourth

case

covers

the

other

possibility

that

both

the

relationship

and

its

negation

hold

simultaneously

BeforeI

evaluates

to

fTrue

F

alseg

Note

that

in

the

operational

semantics

BeforeI

treats

ordering

probabilities

that

are

between

and

as

That

is

it

treats

two

instants

that

have

a

small

chance

of

occurring

before

each

other

as

well-ordered

in

time

To

distinguish

the

well-ordered

case

from

this

other

case

we

define

the

ordering

probability

to

be

whenever

its

value

is

between

and

Definition

-LRB-

Refined

definition

of

probabilistic

ordering

-RRB-

Let

and

be

a

pair

of

indeterminate

instants

-LSB-

-RSB-

Pr

-LSB-

-RSB-

if

Pr

-LSB-

-RSB-

if

Pr

-LSB-

-RSB-

otherwise

This

function

replaces

Pr

in

the

definition

of

BeforeI

With

this

substitution

to

evaluate

every

possible

ordering

however

improbable

an

ordering

plausibility

of

suffices

The

missing

mass

function

is

treated

specially

If

one

-LRB-

or

more

-RRB-

of

the

instants

being

ordered

has

the

missing

mass

function

then

the

mass

is

assumed

to

be

distributed

in

such

a

way

that

there

is

a

small

but

non-zero

probability

ffl

of

ordering

the

two

instants

For

instance

if

we

introduce

an

instant

that

has

an

overlapping

period

of

indeterminacy

with

but

a

missing

mass

function

then

-LSB-

-RSB-

ffl

and

-LSB-

-RSB-

ffl

Consequently

in

the

semantics

an

instant

with

a

missing

mass

function

behaves

exactly

like

a

value

in

that

we

stipulate

that

the

participation

of

such

an

instant

in

a

BeforeI

operation

makes

the

BeforeI

evaluate

to

the

empty

set

-LRB-

for

all

plausibilities

greater

than

-RRB-

However

since

there

is

a

small

probability

that

an

instant

with

a

missing

mass

is

before

another

instant

-LRB-

when

their

periods

of

indeterminacy

overlap

-RRB-

BeforeI

will

be

return

fTrue

F

alseg

for

an

ordering

plausibility

of

Predicates

Logical

Formulae

and

Constructors

We

are

now

in

a

position

to

supply

the

operational

semantics

for

the

where

clause

predicate

We

will

assume

without

loss

of

generality

that

this

predicate

is

a

logical

formulae

composed

of

Before

operations

on

pairs

of

instants

a

complete

set

of

temporal

predicates

can

be

constructed

with

such

formulae

-LSB-

-RSB-

-LSB-

-LSB-

AND

-RSB-

-RSB-

op

-LRB-

r

-RRB-

-LSB-

-LSB-

-RSB-

-RSB-

op

-LRB-

r

-RRB-

T

-LSB-

-LSB-

-RSB-

-RSB-

op

-LRB-

r

-RRB-

-LSB-

-LSB-

OR

-RSB-

-RSB-

op

-LRB-

r

-RRB-

-LSB-

-LSB-

-RSB-

-RSB-

op

-LRB-

r

-RRB-

S

-LSB-

-LSB-

-RSB-

-RSB-

op

-LRB-

r

-RRB-

-LSB-

-LSB-

NOT

hpredicatei

-RSB-

-RSB-

op

-LRB-

r

-RRB-

fx

j

x

-LSB-

-LSB-

hpredicatei

-RSB-

-RSB-

op

-LRB-

r

-RRB-

g

Below

we

illustrate

the

semantics

with

several

examples

using

the

instants

in

Figure

-LSB-

-LSB-

-RSB-

-RSB-

op

-LRB-

r

-RRB-

BeforeI

-LRB-

-RRB-

fg

-LSB-

-LSB-

NOT

-LRB-

-RRB-

-RSB-

-RSB-

op

-LRB-

r

-RRB-

fg

-LSB-

-LSB-

-RSB-

-RSB-

op

-LRB-

r

-RRB-

fTrueg

-LSB-

-LSB-

NOT

-LRB-

-RRB-

-RSB-

-RSB-

op

-LRB-

r

-RRB-

fF

alseg

-LSB-

-LSB-

-RSB-

-RSB-

op

-LRB-

r

-RRB-

fTrue

F

alseg

-LSB-

-LSB-

NOT

-RSB-

-RSB-

op

-LRB-

r

-RRB-

fTrue

F

alseg

-LSB-

-LSB-

AND

-RSB-

-RSB-

op

-LRB-

r

-RRB-

fg

-LSB-

-LSB-

NOT

-LRB-

AND

-RRB-

-RSB-

-RSB-

op

-LRB-

r

-RRB-

fg

-LSB-

-LSB-

AND

-RSB-

-RSB-

op

-LRB-

r

-RRB-

fTrueg

-LSB-

-LSB-

NOT

-LRB-

AND

-RRB-

-RSB-

-RSB-

op

-LRB-

r

-RRB-

fF

alseg

-LSB-

-LSB-

AND

-RSB-

-RSB-

op

-LRB-

r

-RRB-

fTrueg

-LSB-

-LSB-

NOT

-LRB-

AND

-RRB-

-RSB-

-RSB-

op

-LRB-

r

-RRB-

fF

alseg

-LSB-

-LSB-

OR

-RSB-

-RSB-

op

-LRB-

r

-RRB-

fTrueg

-LSB-

-LSB-

NOT

-LRB-

OR

-RRB-

-RSB-

-RSB-

op

-LRB-

r

-RRB-

fF

alseg

-LSB-

-LSB-

OR

-RSB-

-RSB-

op

-LRB-

r

-RRB-

fTrueg

-LSB-

-LSB-

NOT

-LRB-

OR

-RRB-

-RSB-

-RSB-

op

-LRB-

r

-RRB-

fF

alseg

-LSB-

-LSB-

OR

-RSB-

-RSB-

op

-LRB-

r

-RRB-

fTrue

F

alseg

-LSB-

-LSB-

NOT

-LRB-

OR

-RRB-

-RSB-

-RSB-

op

-LRB-

r

-RRB-

fTrue

F

alseg

A

key

difference

between

the

operational

semantics

and

the

SQL

semantics

is

that

the

operational

semantics

uses

BeforeI

rather

than

Before

Here

is

the

operational

semantics

for

the

OVERLAPS

example

given

previously

-LSB-

-LSB-

OVERLAPS

PERIOD

-LRB-

-RRB-

-RSB-

-RSB-

op

BeforeI

-LRB-

-LSB-

-LSB-

-RSB-

-RSB-

SQL

-LSB-

-LSB-

-RSB-

-RSB-

SQL

-RRB-

T

BeforeI

-LRB-

-LSB-

-LSB-

-RSB-

-RSB-

SQL

-LSB-

-LSB-

-RSB-

-RSB-

SQL

-RRB-

Elsewhere

we

show

how

constructors

can

be

extended

in

the

presence

of

indeterminacy

-LSB-

-RSB-

We

reiterate

that

in

the

probabilistic

ordering

all

instants

are

assumed

to

be

independent

So

in

the

expression

BeforeI

-LRB-

-RRB-

AND

BeforeI

-LRB-

-RRB-

the

two

BeforeI

operations

operations

are

separately

evaluated

returning

a

set

of

boolean

values

that

is

subsequently

intersected

While

the

strategy

of

separate

evaluation

of

conjuncts

is

consistent

with

the

determinate

semantics

it

is

important

to

realize

that

it

is

not

equivalent

to

computing

-LRB-

Pr

-LSB-

-LRB-

-RRB-

-RSB-

-RRB-

Indeterminate

Semantics

of

the

Where

Clause

The

meaning

of

the

where

clause

in

the

indeterminate

semantics

can

now

be

given

in

terms

of

the

operational

semantics

-LSB-

-LSB-

WHERE

hpredicatei

-RSB-

-RSB-

ind

-LRB-

r

-RRB-

ft

j

t

r

True

-LSB-

-LSB-

hpredicatei

-RSB-

-RSB-

op

-LRB-

t

-RRB-

g

Note

that

the

computation

of

the

predicate

over

the

completions

of

each

underlying

tuple

has

been

replaced

with

set

operations

over

the

result

of

the

function

Admittedly

this

function

appears

to

also

be

expensive

to

compute

as

it

is

O

-LRB-

-RRB-

per

tuple

where

m

is

the

number

of

chronons

in

the

periods

of

indeterminacy

of

the

instants

to

which

is

applied

-LRB-

m

can

be

very

large

-RRB-

However

we

show

in

Section

that

the

computation

can

be

approximated

in

constant

time

With

this

result

the

operational

semantics

for

the

evaluation

of

a

temporal

expression

consisting

of

temporal

predicates

and

boolean

connectives

has

the

same

complexity

as

that

of

the

determinate

semantics

O

-LRB-

n

-RRB-

where

n

is

the

number

of

predicates

in

the

query

independent

of

both

the

number

of

chronons

and

the

number

of

completions

of

indeterminate

values

of

the

tuple

One

final

aspect

should

be

mentioned

Within

the

where

clause

or

in

the

target

list

as

discussed

below

periods

can

appear

as

attribute

values

or

as

the

result

of

a

constructor

In

both

cases

for

a

period

p

if

BeforeI

-LRB-

pfrom

pto

-RRB-

then

the

period

value

should

be

replaced

with

the

value

Additionally

any

indeterminate

predicate

applied

to

a

argument

should

yield

the

empty

set

The

Target

List

The

indeterminate

semantics

of

the

target

list

is

quite

simple

-LSB-

-LSB-

htarget

listi

-RSB-

-RSB-

ind

-LRB-

r

-RRB-

ss

-LSB-

-LSB-

htarget

listi

-RSB-

-RSB-

ind

-LRB-

-RRB-

-LRB-

r

-RRB-

The

only

wrinkle

is

that

any

constructors

in

the

target

list

e.g.

PERIOD

-LRB-

-RRB-

will

utilize

the

ordering

plausibility

Supporting

Correlation

Credibility

Correlation

credibility

extends

the

from

clause

with

an

optional

credibility

phrase

In

general

correlation

credibility

is

used

to

replace

indeterminate

time

values

with

determinate

time

values

The

replacement

strategy

to

use

depends

upon

the

credibility

value

and

whether

the

time

value

replaced

is

an

instant

period

or

interval

Below

we

define

a

Replace

function

that

effects

the

replacement

for

every

time

value

in

a

tuple

Definition

-LRB-

Replace

-RRB-

Let

tuple

t

-LRB-

X

n

-RRB-

where

X

are

non-temporal

values

and

n

are

time

values

Then

Replace

-LRB-

ffi

t

-RRB-

-LRB-

X

R

-LRB-

-RRB-

R

-LRB-

n

-RRB-

-RRB-

R

is

the

replacement

strategy

Table

lists

the

replacement

strategies

for

each

combination

of

credibility

value

and

kind

of

time

value

assuming

that

the

time

value

is

-LRB-

P

-RRB-

and

E

-LSB-

-RSB-

is

the

expected

value

As

an

example

consider

the

tuple

t

-LRB-

Centurion

-LSB-

March

March

-LCB-

June

June

-RSB-

-RRB-

For

this

period

timestamped

tuple

the

four

credibility

values

yield

the

following

results

Replace

-LRB-

INDETERMINATE

t

-RRB-

t

Replace

-LRB-

EXPECTED

t

-RRB-

-LRB-

Centurion

-LSB-

March

-LCB-

June

-RSB-

-RRB-

Replace

-LRB-

MAX

t

-RRB-

-LRB-

Centurion

-LSB-

March

-LCB-

June

-RSB-

-RRB-

Replace

-LRB-

MIN

t

-RRB-

-LRB-

Centurion

-LSB-

March

-LCB-

June

-RSB-

-RRB-

instant

period

start

period

end

interval

INDETERMINATE

EXPECTED

E

-LSB-

-RSB-

E

-LSB-

-RSB-

E

-LSB-

-RSB-

E

-LSB-

-RSB-

MIN

MAX

Table

Replacement

strategies

Using

the

Replace

function

we

are

in

a

position

to

define

the

meaning

of

the

from

clause

in

the

indeterminate

semantics

including

the

specification

of

how

the

default

credibility

can

be

over-ridden

for

a

particular

correlation

variable

-LSB-

-LSB-

hfrom

listi

-RSB-

-RSB-

ind

-LRB-

ffi

d

-RRB-

-LSB-

-LSB-

hfromni

-RSB-

-RSB-

ind

-LRB-

ffi

d

-RRB-

-LSB-

-LSB-

-RSB-

-RSB-

ind

-LRB-

ffi

d

-RRB-

-LSB-

-LSB-

hfromni

-RSB-

-RSB-

ind

-LRB-

ffi

d

-RRB-

where

each

of

the

hfromii

's

can

be

either

of

two

constructs

-LSB-

-LSB-

hrelationi

-RSB-

-RSB-

ind

-LRB-

ffi

d

-RRB-

j

t

hrelationi

Replace

-LRB-

ffi

t

-RRB-

g

-LSB-

-LSB-

hrelationi

WITH

CREDIBILITY

ffi

-RSB-

-RSB-

ind

-LRB-

ffi

d

-RRB-

j

t

hrelationi

Replace

-LRB-

t

-RRB-

g

When

the

hfrom

listi

is

given

a

credibility

of

ffi

INDETERMINATE

it

retains

all

of

the

indeterminacy

present

in

the

temporal

values

of

d

not

altering

them

at

all

Hence

-LSB-

-LSB-

hfrom

listi

-RSB-

-RSB-

ind

-LRB-

INDETERMINATE

d

-RRB-

-LSB-

-LSB-

hfrom

listi

-RSB-

-RSB-

SQL

-LRB-

d

-RRB-

Result

of

the

Example

Query

At

this

point

the

indeterminate

semantics

of

the

select

statement

has

been

specified

As

an

example

we

provide

the

tuple

calculus

semantics

for

the

query

given

in

Figure

on

page

-LSB-

-LSB-

Q

-RSB-

-RSB-

ind

-LRB-

d

-RRB-

f

-LRB-

r

Warehouse

r

Lot

Num

p

SerialNum

r

When

-RRB-

j

r

Replace

-LRB-

INDETERMINATE

Received

-RRB-

p

Replace

-LRB-

INDETERMINATE

In

Production

-RRB-

p

Model

r

Part

True

fBeforeI

-LRB-

p

Duringfrom

r

When

-RRB-

BeforeI

-LRB-

r

When

p

Duringto

-RRB-

gg

Here

the

Cartesian

product

and

projection

operators

have

been

expressed

in

the

tuple

calculus

If

this

query

is

applied

to

the

database

given

in

Figure

on

page

it

will

result

in

three

tuples

shown

in

Figure

First

the

time

values

in

the

underlying

relations

are

unchanged

because

the

query

uses

a

correlation

credibility

of

INDETERMINATE

The

where

clause

eliminates

every

tuple

from

In

Production

except

the

Centurions

Likewise

the

where

clause

also

eliminates

every

tuple

from

Received

except

the

wing

strut

tuples

The

shipment

of

lot

number

was

definitely

received

during

production

of

the

Centurion

serial

number

it

satisfies

the

overlap

with

every

plausibility

The

other

shipments

might

have

been

received

Lot

number

satisfies

the

overlap

for

plausibilities

lower

than

because

-LRB-

May

June

uniform

-RRB-

is

before

-LRB-

June

June

uniform

-RRB-

for

every

ordering

plausibility

below

The

other

shipment

however

arrived

too

late

in

June

to

be

considered

plausible

It

is

plausible

that

lot

number

arrived

before

the

end

of

production

only

for

ordering

plausibilities

of

or

less

For

production

of

the

Centurion

serial

number

all

the

shipments

arrived

too

early

except

for

lot

number

from

the

Cessna

warehouse

Correctness

The

intuitive

semantics

-LRB-

-LSB-

-LSB-

-RSB-

-RSB-

ind

-RRB-

motivated

in

Section

applies

the

predicate

to

each

completion

and

thus

is

impractical

whereas

the

operational

semantics

-LRB-

-LSB-

-LSB-

-RSB-

-RSB-

op

-RRB-

can

be

efficiently

implemented

The

correctness

of

the

operational

semantics

hinges

on

two

requirements

The

first

is

that

the

two

semantics

agree

where

the

intuitive

semantics

is

defined

that

is

for

the

possible

and

definite

interpretations

The

possible

interpretation

has

an

ordering

plausibility

of

the

definite

interpretation

has

The

interpretations

concern

only

the

ordering

plausibility

they

apply

at

any

correlation

credibility

Theorem

-LSB-

-LSB-

-RSB-

-RSB-

ind

-LRB-

r

-RRB-

and

-LSB-

-LSB-

-RSB-

-RSB-

op

-LRB-

r

-RRB-

are

equivalent

for

and

The

second

requirement

is

that

the

operational

semantics

be

monotonic

as

the

plausibility

increases

the

result

must

move

from

the

possible

interpretation

towards

the

definite

interpretation

This

ensures

that

the

semantics

at

intermediate

plausibilities

is

consistent

with

that

of

the

possible

interpretation

Theorem

-LSB-

-LSB-

S

-RSB-

-RSB-

ind

-LRB-

ffi

r

-RRB-

is

monotonic

in

Implementation

Overview

Changes

to

the

semantics

to

support

valid-time

indeterminacy

induce

changes

in

the

implementation

These

changes

are

isolated

to

the

representation

of

instants

intervals

and

periods

and

to

the

new

or

modified

temporal

operators

BeforeI

and

Replace

In

the

next

two

sections

we

describe

the

data

structures

and

algorithms

to

implement

these

new

or

modified

operators

Our

goal

is

to

provide

support

for

valid-time

indeterminacy

without

adversely

impacting

storage

requirements

or

query

evaluation

efficiency

At

first

glance

support

for

valid-time

indeterminacy

appears

to

be

expensive

Some

of

the

modified

operators

e.g.

BeforeI

are

executed

in

the

inner

loop

of

query

processing

potentially

performed

many

times

for

each

combination

of

tuples

in

the

queried

relations

Significant

slowdown

of

these

operators

would

have

a

dramatic

effect

on

the

overall

speed

of

query

evaluation

We

show

below

how

the

new

operators

can

be

implemented

efficiently

We

begin

with

the

representation

of

indeterminate

information

In

particular

we

describe

timestamp

formats

that

compactly

store

valid-time

indeterminate

instants

periods

and

intervals

We

then

show

how

the

new

operators

can

be

implemented

efficiently

focusing

on

the

probabilistic

ordering

used

in

BeforeI

Indeterminate

Timestamp

Formats

Valid-time

indeterminate

instants

periods

and

intervals

model

new

kinds

of

temporal

information

To

represent

indeterminate

temporal

values

new

temporal

data

types

or

timestamps

-LSB-

JCE

-RSB-

are

needed

In

this

section

we

briefly

describe

the

indeterminate

timestamps

We

present

only

the

indeterminate

instant

timestamps

the

interval

and

period

timestamps

are

natural

extensions

of

the

instant

timestamps

-LSB-

-RSB-

The

instant

format

described

here

builds

upon

the

determinate

instant

format

a

full

description

of

this

format

is

given

elsewhere

-LSB-

-RSB-

A

determinate

instant

timestamp

combines

a

type

tag

-LRB-

to

indicate

the

kind

of

instant

e.g.

determinate

or

indeterminate

-RRB-

with

a

signed

integer

representing

a

distance

-LRB-

in

chronons

or

more

precisely

in

-RRB-

from

the

time-line

origin

or

anchor-point

The

type

tag

occupies

three

bits

and

the

signed

integer

either

or

bits

depending

upon

the

maximum

range

and

granularity

of

the

timestamp

The

timestamps

can

store

a

range

of

historical

times

to

the

granularity

of

a

microsecond

or

times

within

a

range

of

billion

years

-LRB-

all

of

time

back

to

the

big

bang

-RRB-

to

the

granularity

of

a

second

It

is

important

to

point

out

that

the

range

and

granularity

of

an

instant

timestamp

are

stored

in

the

schema

rather

than

in

the

timestamp

Indeterminate

instants

can

not

use

the

determinate

timestamp

because

an

indeterminate

instant

is

more

than

a

single

time

it

is

two

times

and

a

probability

mass

function

To

represent

indeterminate

instants

we

add

four

new

formats

These

four

formats

are

a

combination

of

compact

or

general

with

standard

or

nonstandard

distributions

The

combinations

are

explained

in

detail

below

Each

indeterminate

timestamp

format

has

the

three

basic

parts

needed

to

describe

an

indeterminate

instant

a

lower

support

an

upper

support

and

a

probability

mass

function

These

three

parts

are

encoded

in

the

timestamp

either

implicitly

or

explicitly

Table

indicates

for

each

format

whether

the

representation

is

explicit

or

implicit

For

example

the

determinate

format

has

an

explicit

lower

support

but

an

implicit

upper

support

-LRB-

identical

to

the

lower

support

-RRB-

and

an

implicit

probability

mass

function

-LRB-

the

mass

function

is

missing

-RRB-

The

compact

indeterminate

formats

implicitly

encode

the

upper

support

The

implicit

encoding

consists

of

a

chunk-size

and

a

number

of

chunks

The

upper

support

is

computed

by

adding

the

number

of

chunks

each

of

size

chunk-size

to

the

lower

support

For

example

to

represent

a

period

of

indeterminacy

of

seven

hours

using

chunks

the

timestamp

would

record

that

there

are

seven

hour-sized

chunks

The

chunking

scheme

was

developed

to

meet

the

expectation

that

regular

periods

of

indeterminacy

e.g.

N

hours

N

days

or

N

years

will

be

the

norm

If

the

format

is

not

compact

it

is

said

to

be

general

and

the

upper

support

is

stored

explicitly

as

a

count

of

granules

from

the

anchor

point

If

the

chunk-size

and

number

of

chunks

can

be

stored

in

two

small

fields

then

chunking

is

a

very

efficient

method

of

encoding

a

terminating

time

In

our

formats

the

chunk-size

is

a

four-bit

field

and

the

number

of

chunks

a

seven-bit

field

or

eleven

bits

in

toto

Since

the

chunk-size

is

four

bits

only

a

limited

number

of

chunk-sizes

are

available

One

of

the

duties

of

the

database

implementor

is

to

specify

chunk-size

tables

one

for

each

supported

granularity

Common

chunk-sizes

are

seconds

hours

days

and

weeks

The

space

efficiency

of

the

chunking

comes

at

the

expense

of

some

run-time

computation

since

the

terminating

time

must

be

computed

on

the

fly

The

computation

costs

one

addition

to

add

the

chunks

to

the

lower

support

The

timestamp

representation

of

a

probability

mass

function

is

the

name

of

a

mass

function

-LRB-

a

identifier

-RRB-

Only

the

name

of

the

mass

function

e.g.

uniform

normal

etc.

is

stored

with

granule

is

a

coarse-grained

grouping

of

chronons

e.g.

chronons

can

be

grouped

into

days

years

or

months

The

timestamp

stores

the

distance

in

terms

of

granules

so

that

large

ranges

of

times

e.g.

million

years

can

be

stored

compactly

by

counting

in

coarse

granules

e.g.

in

millenia

Starting

Terminating

Probability

FORMAT

Time

Time

Distribution

determinate

explicit

implicit

implicit

compact

standard

explicit

implicit

implicit

compact

nonstandard

explicit

implicit

explicit

general

standard

explicit

explicit

implicit

general

nonstandard

explicit

explicit

explicit

Table

Encodings

in

the

indeterminate

formats

the

timestamp

the

actual

mass

function

is

stored

separately

as

described

further

in

Section

Instants

with

a

uniform

distribution

or

a

distribution

that

is

missing

are

termed

the

standard

distributions

Since

these

distributions

will

likely

be

common

we

optimized

representation

their

representation

as

a

single

bit

rather

than

a

identifier

-LRB-

to

toggle

between

uniform

and

missing

-RRB-

The

user

specifies

the

kind

of

timestamp

compact

or

general

and

the

kind

of

distribution

standard

or

nonstandard

to

use

when

defining

or

altering

a

temporal

attribute

as

discussed

in

Section

The

design

of

the

indeterminate

timestamp

formats

optimizes

representation

of

the

common

mass

functions

-LRB-

the

standard

mass

functions

cost

only

a

single

bit

-RRB-

The

chunking

scheme

and

the

use

of

standard

distributions

yield

a

compact

timestamp

's

limited

TIMESTAMP

format

without

fractional

seconds

and

without

indeterminacy

-LRB-

assuming

that

the

positions

in

the

timestamp

are

four-bit

nibbles

-RRB-

is

bits

Our

indeterminate

compact

timestamp

with

the

same

range

and

granularity

as

the

datetime

format

requires

only

bits

The

smallest

indeterminate

timestamp

is

just

bits

-LRB-

a

compact

standard

format

with

a

range

of

granules

and

a

chunked

period

of

indeterminacy

-RRB-

The

largest

is

bits

-LRB-

a

general

nonstandard

format

with

an

upper

and

lower

support

within

granules

of

the

granularity

anchor

point

-RRB-

Implementation

of

Operators

In

this

section

we

discuss

the

implementation

of

BeforeI

and

Replace

Implementation

of

BeforeI

We

observed

in

Section

that

the

semantics

of

temporal

constructors

and

predicates

such

as

OVERLAPS

and

PERIOD

are

ultimately

based

on

BeforeI

If

the

instants

being

compared

by

BeforeI

are

determinate

then

BeforeI

is

the

relation

on

the

domain

of

time

values

-LRB-

the

integers

extended

with

special

values

representing

the

beginning

and

end

of

time

-RRB-

Indeterminate

instants

complicate

the

implementation

of

BeforeI

In

the

indeterminate

semantics

it

may

be

necessary

to

compute

the

probability

that

one

instant

is

before

another

This

is

a

potentially

costly

computation

We

show

below

how

this

computation

can

be

made

efficient

The

Common

Interface

The

interface

to

the

BeforeI

routine

is

given

in

Figure

The

interface

determines

if

the

relatively

costly

computation

of

the

ordering

probability

can

be

avoided

If

and

are

the

same

instant

then

BeforeI

is

trivially

true

since

an

instant

is

always

equal

to

itself

BeforeI

is

also

trivial

if

's

and

's

periods

of

indeterminacy

are

disjoint

Disjointness

implies

that

one

instant

is

before

the

other

in

all

possible

cases

We

anticipate

that

disjoint

periods

of

indeterminacy

will

be

common

If

no

special

case

applies

then

the

ordering

probability

-LSB-

-RSB-

must

be

calculated

Probability

Mass

Function

Representation

In

this

section

we

describe

a

data

structure

to

store

a

probability

mass

function

We

present

the

data

structure

first

since

it

impacts

the

algorithm

design

In

general

a

function

can

either

be

computed

on

the

fly

or

pre-computed

and

its

values

cached

say

in

an

array

The

latter

strategy

is

best

for

a

probability

mass

function

BeforeI

is

executed

in

the

inner

loop

of

query

processing

performed

many

times

during

a

query

We

anticipate

that

many

useful

probability

mass

functions

are

not

easily

computable

functions

making

computing

values

on

the

fly

expensive

in

terms

of

execution

time

whereas

table-lookup

is

quite

cheap

although

potentially

expensive

in

terms

of

space

To

attain

reasonable

storage

costs

the

probability

mass

function

is

approximated

We

assume

that

the

domain

of

the

mass

function

is

normalized

to

-LSB-

-RSB-

and

that

the

mass

is

quantized

that

is

it

is

parceled

into

indivisible

discrete

chunks

of

probability

The

quanta

can

be

thought

of

as

rods

of

equal

mass

but

-LRB-

possibly

-RRB-

differing

lengths

If

a

probability

mass

function

has

P

rods

in

total

then

the

mass

of

each

rod

is

The

number

of

rods

is

called

the

precision

of

the

approximation

The

mass

function

is

sampled

at

C

evenly-spaced

points

C

is

called

the

coarseness

of

the

approximation

The

sample

points

are

f

g.

To

approximate

the

mass

function

for

each

sample

point

the

rods

to

the

left

and

right

of

the

point

are

recorded

Typically

there

is

also

a

rod

that

covers

the

point

but

this

rod

is

not

counted

-LRB-

this

is

the

error

in

the

approximation

-RRB-

The

coarseness

is

usually

much

larger

than

the

precision

For

instance

in

our

experiments

we

use

a

coarseness

of

but

a

precision

of

The

approximation

of

the

uniform

mass

function

with

a

coarseness

of

and

a

precision

of

is

shown

in

Figure

The

rod

and

point

method

of

approximating

a

probability

mass

function

has

some

limitations

The

coarseness

and

precision

restrict

the

variety

of

functions

that

can

be

approximately

represented

If

the

coarseness

equals

the

precision

then

only

the

uniform

probability

mass

function

-LRB-

every

point

is

equally

likely

-RRB-

can

be

represented

-LRB-

a

different

rod

on

every

point

-RRB-

As

the

coarseness

and

precision

diverge

more

mass

functions

can

be

represented

In

general

with

a

precision

of

P

and

a

coarseness

of

C

at

most

CP

different

probability

mass

functions

are

possible

Also

mass

functions

that

have

a

mass

of

more

than

spread

over

less

than

of

their

domain

can

not

be

approximated

To

model

such

spiky

mass

functions

two

or

more

rods

might

have

to

span

the

same

point

It

is

the

database

implementor

's

task

to

choose

the

appropriate

C

and

P

values

supporting

the

kinds

of

mass

functions

that

are

of

interest

to

the

users

of

the

system

Using

the

rod

and

point

method

a

probability

mass

function

is

approximated

with

an

absolute

error

of

less

than

That

is

the

probability

of

a

possible

instant

in

the

approximated

distribution

is

within

of

the

actual

probability

If

the

difference

between

the

probabilities

is

more

than

then

the

approximation

has

been

done

incorrectly

as

a

new

rod

should

have

been

introduced

The

approximated

mass

function

is

stored

in

a

binary

tree

rather

than

an

array

There

is

one

leaf

for

each

sample

point

For

instance

the

first

leaf

in

a

preorder

traversal

corresponds

to

the

sample

point

At

each

leaf

in

the

tree

the

number

of

rods

to

the

left

and

right

of

the

sample

point

are

stored

For

example

in

the

approximation

of

the

uniform

mass

function

shown

in

Figure

there

are

no

rods

to

the

left

and

two

rods

to

the

right

of

the

first

point

The

example

shows

that

the

function

BeforeI

-LRB-

in

instant

in

integer

-RRB-

set

of

boolean

begin

if

is

then

return

fTrueg

else

if

then

return

fTrueg

else

if

then

return

fFalseg

else

return

PROB

LEQ

-LRB-

-RRB-

end

Figure

Interface

to

BeforeI

number

of

rods

left

and

right

of

a

sample

point

will

often

sum

to

P

since

the

rod

covering

the

node

is

uncounted

The

tree

for

the

approximated

uniform

mass

function

is

shown

in

Figure

-LRB-

a

-RRB-

In

the

tree

shown

in

Figure

C

and

P

are

small

values

consequently

the

entire

tree

can

be

easily

stored

in

just

a

few

bytes

But

when

C

and

P

are

large

it

is

infeasible

to

store

the

full

tree

nor

do

we

need

to

store

the

full

tree

We

are

primarily

interested

in

recording

where

each

rod

ends

Observe

that

if

both

children

have

the

same

count

then

no

rod

ends

within

the

subtree

rooted

at

the

parent

-LRB-

and

all

nodes

in

the

subtree

will

have

the

same

count

-RRB-

All

such

subtrees

can

be

pruned

keeping

only

the

root

of

the

subtree

which

is

specially

marked

When

traversing

a

pruned

subtree

the

tree

traversal

algorithm

treats

a

specially

marked

node

as

the

root

of

a

virtual

subtree

and

traverses

the

subtree

as

though

it

were

stored

The

pruned

tree

for

the

example

distribution

is

shown

in

Figure

-LRB-

b

-RRB-

The

specially

marked

nodes

have

dashed

line

borders

The

tree

pruning

technique

saves

quite

a

bit

of

space

The

pruned

tree

has

at

most

leaves

-LRB-

one

leaf

might

be

needed

per

rod

end

-RRB-

and

could

have

as

few

as

P

leaves

In

contrast

the

unpruned

tree

has

C

leaves

-LRB-

in

general

C

P

-RRB-

The

number

of

interior

nodes

also

varies

with

as

few

as

P

interior

nodes

and

as

many

as

interior

nodes

in

a

tree

Each

interior

node

is

two

-LRB-

C

-RRB-

bit

pointers

while

each

leaf

node

is

two

-LRB-

P

-RRB-

bit

fields

to

store

the

number

of

rods

For

C

and

P

the

storage

cost

of

a

pruned

search

tree

is

between

K

and

bytes

The

distribution

tree

efficiently

stores

the

approximated

probability

mass

function

but

the

approximation

impacts

the

computation

of

-LSB-

-RSB-

changing

the

problem

to

a

rod

counting

problem

An

Overview

of

Computing

-LSB-

-RSB-

Calculating

the

probability

that

one

instant

is

before

another

using

the

approximated

mass

function

can

be

reformulated

as

a

rod

counting

problem

Assume

that

there

are

two

rows

of

P

rods

The

two

rows

which

we

shall

call

the

row

and

the

row

are

parallel

to

each

other

as

shown

in

Figure

As

shown

in

the

figure

the

length

of

each

rod

can

vary

The

rod

counting

problem

is

to

count

the

pairs

of

rods

one

rod

from

each

row

such

that

the

rod

from

the

row

is

before

the

rod

from

the

row

Each

such

pair

represents

a

contribution

of

to

-LSB-

-RSB-

The

rod

counting

problem

is

complicated

by

the

fact

that

several

rods

may

be

located

within

a

single

chronon

so

some

rods

in

could

be

strictly

before

those

in

yet

may

still

contribute

to

-LSB-

-RSB-

For

the

purpose

of

computing

-LSB-

-RSB-

each

chronon

has

an

indivisible

mass

that

is

all

the

rods

entirely

within

the

same

chronon

should

be

treated

as

a

single

rod

with

a

mass

equivalent

to

the

total

mass

of

the

constituent

rods

For

example

consider

an

indeterminate

instant

Figure

The

approximated

uniform

mass

function

with

P

and

C

-LRB-

a

-RRB-

the

complete

tree

-LRB-

b

-RRB-

the

pruned

tree

Figure

The

tree

for

the

approximated

uniform

mass

function

with

P

and

C

with

a

uniform

mass

function

and

a

set

of

possible

chronons

consisting

of

only

two

chronons

There

are

c

rods

within

each

chronon

consequently

each

chronon

in

this

indeterminate

instant

has

an

indivisible

mass

of

The

rod

counting

problem

also

differs

from

the

original

problem

of

computing

the

probability

that

one

instant

is

before

another

instant

in

a

subtle

but

significant

way

the

sum

of

the

mass

in

pairs

of

rods

where

's

rod

is

before

's

rod

is

not

quite

the

same

as

-LSB-

-RSB-

Consider

a

pair

of

rods

neither

of

which

is

before

the

other

-LRB-

the

rods

are

at

the

same

place

in

the

overall

ordering

of

rods

-RRB-

Each

rod

represents

the

probability

that

the

instant

is

located

during

a

certain

range

of

chronons

but

how

the

probability

is

distributed

among

the

chronons

within

that

range

is

unknown

Although

neither

rod

is

before

the

other

it

is

probably

the

case

that

some

chronon

within

the

range

represented

by

the

rod

is

before

a

chronon

in

the

range

represented

by

the

other

rod

The

rod

counting

problem

does

not

count

the

small

probability

-LRB-

-RRB-

of

this

case

and

thus

undercounts

-LSB-

-RSB-

Below

we

quantify

the

error

on

the

rod

counting

technique

The

algorithm

for

counting

pairs

of

rods

is

based

on

a

divide-and-conquer

technique

Each

step

in

the

algorithm

is

illustrated

in

Figure

The

first

step

is

to

chose

a

pivot

A

pivot

is

a

rod

in

's

row

or

rods

The

pivot

splits

the

rods

in

row

into

three

groups

those

before

the

pivot

before

those

after

the

pivot

after

and

the

pivot

itself

The

second

step

is

to

identify

where

the

left-end

of

the

pivot

belongs

in

the

ordering

of

's

rods

The

left-end

of

the

pivot

divides

's

row

of

rods

into

three

parts

those

before

the

left-end

of

the

pivot

before

those

after

the

left-end

after

and

perhaps

a

rod

that

overlaps

the

left-end

overlap

The

third

step

is

the

conquer

step

Observe

that

all

the

rods

in

before

S

pivot

are

before

all

the

rods

in

after

Each

pair

of

rods

one

chosen

from

each

of

these

two

groups

adds

to

a

running

sum

of

-LSB-

-RSB-

If

the

running

sum

-LRB-

scaled

by

-RRB-

exceeds

the

plausibility

then

the

algorithm

terminates

since

the

plausibility

has

been

met

and

BeforeI

is

fTrueg

This

is

called

an

early

exit

condition

Similarly

all

the

rods

in

before

are

before

the

rods

in

after

Each

pair

of

rods

one

chosen

from

each

of

these

two

groups

adds

to

a

running

sum

of

Pr

-LSB-

-RSB-

If

the

running

sum

-LRB-

scaled

by

-RRB-

exceeds

then

the

algorithm

terminates

since

BeforeI

is

fF

alseg

This

is

the

only

other

early

exit

condition

If

an

early

exit

is

not

taken

then

two

subproblems

remain

to

be

solved

The

algorithm

has

yet

to

determine

the

relationships

between

the

rods

in

before

and

those

in

before

S

overlap

as

well

as

the

relationships

between

the

the

rods

in

after

S

pivot

and

those

in

after

Each

of

these

subproblems

is

solved

recursively

in

the

next

round

of

the

algorithm

Choosing

the

pivot

The

choice

of

pivot

is

an

important

factor

in

controlling

the

algorithm

The

algorithm

chooses

as

the

pivot

the

rod

corresponding

to

half

of

the

remaining

rods

in

-LRB-

those

rods

that

have

yet

to

be

counted

-RRB-

This

choice

enables

the

algorithm

to

reach

an

early

exit

condition

quickly

Overall

the

total

work

performed

by

the

algorithm

is

to

count

all

pairs

of

rods

But

the

counting

can

stop

when

enough

pairs

are

counted

to

determine

if

either

-LSB-

-RSB-

or

Pr

-LSB-

-RSB-

is

satisfied

-LRB-

the

early

exit

conditions

-RRB-

It

is

better

if

in

the

first

few

pivot

choices

an

algorithm

maximizes

the

pairs

of

rods

it

counts

since

it

will

then

hit

an

exit

condition

in

fewer

pivots

Theorem

The

kth

pivot

will

count

-LRB-

k

-RRB-

c

pairs

For

example

for

a

precision

of

after

the

fourteenth

pivot

the

algorithm

will

have

counted

of

the

total

number

of

pairs

In

other

words

to

approximate

the

ordering

probability

to

within

at

most

fourteen

pivots

must

be

performed

As

we

pointed

out

earlier

the

approximation

by

rods

and

points

leads

to

an

undercounting

of

-LSB-

-RSB-

However

this

undercounting

is

small

Theorem

The

undercount

is

less

than

Implementation

Details

for

Computing

-LSB-

-RSB-

The

code

for

the

pivoting

algorithm

is

shown

in

Figure

The

counting

stops

when

the

count

of

pairs

exceeds

the

needed

number

of

true

pairs

or

false

pairs

-LRB-

it

simultaneously

solves

for

both

-LSB-

-RSB-

and

Pr

-LSB-

-RSB-

-RRB-

or

when

all

the

possible

pivots

have

been

tried

-LRB-

an

undercount

has

occurred

and

we

assume

that

-LSB-

-RSB-

is

false

-RRB-

The

most

important

feature

of

this

code

is

that

the

majority

of

instructions

are

cheap

integer

operations

shifts

assignments

and

additions

There

are

only

two

multiplications

no

divisions

and

no

floating

point

operations

Although

for

pedagogical

reasons

we

have

presented

the

pivoting

code

as

a

recursive

procedure

the

procedure

is

implemented

using

a

queue

and

iteration

thus

avoiding

the

expense

of

recursive

procedure

calls

and

supporting

breadth-first

recursion

One

final

observation

calculating

the

number

of

true

and

false

pairs

has

been

reduced

to

a

table-lookup

since

the

ordering

plausibility

can

take

on

only

different

values

pivot

row

row

a

-RRB-

Choosing

a

pivot

pivot

before

S

pivot

after

b

-RRB-

Add

this

contribution

to

-LSB-

ffleq

-RSB-

pivot

after

before

c

-RRB-

Add

this

contribution

to

-LSB-

-RSB-

before

S

pivot

before

S

overlap

after

after

d

-RRB-

Two

subproblems

generated

Figure

A

rod

counting

operation

The

Replace

Function

The

Replace

function

changes

an

indeterminate

time

value

in

one

of

four

ways

It

could

replace

the

value

with

the

lower

support

replace

it

with

the

upper

support

replace

it

with

the

expected

value

or

leave

the

value

unchanged

The

straightforward

pseudo-code

for

Replace

for

an

instant

is

given

in

Figure

The

code

for

starting

and

terminating

period

time

values

as

well

as

for

intervals

is

similar

and

omitted

for

brevity

In

this

pseudo-code

we

assume

that

the

expected

value

for

the

probability

mass

function

has

been

pre-computed

for

the

normal

interval

-LSB-

-RSB-

This

value

is

cached

and

used

by

the

Replace

function

to

compute

the

expected

value

for

a

non-normal

interval

i.e.

a

period

of

indeterminacy

Impact

of

Indeterminacy

on

the

Determinate

Implementation

In

parallel

with

the

theorem

of

reducibility

given

in

Section

conventional

SQL

queries

on

determinate

relations

will

incur

no

additional

execution

overhead

under

the

new

semantics

and

executing

such

queries

on

indeterminate

relations

will

add

little

overhead

since

BeforeI

's

for

a

plausibility

of

are

very

efficient

function

PROB

LEQ

-LRB-

in

event

in

integer

-RRB-

set

of

boolean

const

P

integer

C

integer

tree

tree

probability

mass

function

tree

-LRB-

C

P

-RRB-

plausibility

map

array

-LSB-

-RSB-

of

var

false

pairs

true

pairs

pivot

mid

integer

leaf

tree

node

pointer

procedure

ROD

COUNTING

-LRB-

in

from

to

from

to

integer

-RRB-

begin

Check

the

exit

conditions

if

-LRB-

true

pairs

-RRB-

-LRB-

false

pairs

-RRB-

then

return

if

-LRB-

-LRB-

to

from

-RRB-

-RRB-

-LRB-

-LRB-

to

from

-RRB-

-RRB-

then

return

Calculate

pivot

pivot

from

-LRB-

-LRB-

to

from

-RRB-

div

-RRB-

Figure

out

's

contribution

before

pivot

from

after

to

pivot

Figure

out

the

chronon

in

which

the

pivot

ends

using

binary

search

mid

binary

search

-LRB-

tree

pivot

-RRB-

Find

the

rod

in

just

after

the

pivot

's

chronon

using

binary

search

leaf

binary

search

-LRB-

tree

mid

-RRB-

Figure

out

's

contribution

before

leaf

left

rods

from

after

to

leaf

right

rods

How

much

is

the

total

contribution

true

pairs

true

pairs

-LRB-

-LRB-

before

-RRB-

after

-RRB-

false

pairs

false

pairs

-LRB-

after

before

-RRB-

Continue

counting

ROD

COUNTING

-LRB-

from

from

before

from

from

before

-RRB-

ROD

COUNTING

-LRB-

to

after

to

to

after

to

-RRB-

end

begin

true

pairs

plausibility

map

-LSB-

-RSB-

false

pairs

true

pairs

ROD

COUNTING

-LRB-

P

P

-RRB-

if

-LRB-

true

pairs

-RRB-

return

fTrueg

else

if

-LRB-

false

pairs

-RRB-

return

fFalseg

else

return

fg

end

Figure

The

pivoting

algorithm

function

ReplaceInstant

-LRB-

in

ffi

credibility

in

instant

-RRB-

instant

const

tree

probability

mass

function

tree

-LRB-

C

P

-RRB-

var

j

integer

begin

case

ffi

INDETERMINATE

return

MAX

return

MIN

return

EXPECTED

return

-LRB-

expected

-LRB-

-RRB-

-RRB-

end

f

ReplaceInstant

g

Figure

The

ReplaceInstant

algorithm

Determinate

Indeterminate

Indeterminate

Cost

Best

Case

Worst

Case

Operation

Cost

Cost

Determinate

Before

Indeterminate

BeforeI

error

Indeterminate

BeforeI

error

Replace

Table

Timings

on

indeterminate

operations

-LRB-

in

machine

cycles

-RRB-

Empirical

Analysis

of

the

Implementation

We

implemented

the

indeterminate

operations

in

a

prototype

system

for

temporal

support

called

MultiCal

-LSB-

SSD

-RSB-

MultiCal

is

written

in

the

C

programming

We

complied

the

code

using

the

GNU

C

compiler

version

with

compiler

optimization

fully

enabled

We

used

a

precision

of

and

a

coarseness

of

in

the

code

for

the

indeterminate

BeforeI

These

values

limit

the

maximum

error

in

the

pivoting

algorithm

to

less

than

We

also

implemented

BeforeI

with

a

maximum

possible

error

of

This

version

of

BeforeI

performs

-LRB-

at

most

-RRB-

pivots

as

discussed

in

Section

We

tested

the

performance

of

each

operation

in

isolation

first

All

tests

were

performed

on

a

DEC-Alpha

Model

-LRB-

a

MHZ

machine

-RRB-

The

timings

for

each

test

were

collected

using

the

atom

tool

-LSB-

-RSB-

which

allowed

us

to

count

machine

cycles

Table

shows

the

results

for

each

operation

The

execution

times

shown

in

the

table

only

include

the

cycles

actually

spent

within

the

function

and

exclude

the

cost

of

the

function

call

itself

denotes

not

applicable

The

Replace

and

determinate

Before

operations

are

relatively

cheap

The

worst

case

for

Replace

occurs

with

the

EXPECTED

credibility

since

it

involves

a

floating

point

multiplication

The

best

and

worst

case

behavior

of

BeforeI

vary

significantly

code

for

the

operations

discussed

in

the

previous

section

as

well

as

for

all

the

experiments

discussed

here

is

available

via

the

WWW

at

To

further

examine

BeforeI

's

behavior

we

devised

several

additional

tests

for

the

indeterminate

BeforeI

These

tests

were

designed

to

capture

both

the

worst

case

and

the

expected

case

performance

of

the

pivoting

algorithm

The

worst

case

for

BeforeI

happens

when

the

two

indeterminate

instants

span

the

same

chronons

and

have

uniform

distributions

We

tested

this

worst

case

performance

of

BeforeI

on

a

pair

of

instants

each

of

which

has

a

period

of

indeterminacy

of

one

million

chronons

The

results

are

given

in

Figure

The

graph

plots

the

execution

time

-LRB-

in

machine

cycles

-RRB-

of

BeforeI

for

the

plausibility

values

to

As

the

ordering

plausibility

approaches

the

execution

times

increase

because

more

pivots

are

needed

to

determine

the

outcome

of

BeforeI

The

average

worst

case

BeforeI

operation

with

error

across

all

plausibilities

is

approximately

machine

cycles

with

a

high

of

machine

cycles

at

a

plausibility

of

and

a

low

of

machine

cycles

With

a

maximum

error

of

the

average

worst

case

for

BeforeI

is

somewhat

less

machine

cycles

with

a

high

of

machine

cycles

at

a

plausibility

of

The

worst

case

performance

does

not

always

occur

at

a

plausibility

of

but

depends

on

the

relative

positions

and

mass

functions

of

a

pair

of

indeterminate

instants

Two

instants

with

uniform

distributions

which

have

partially

-LRB-

but

not

fully

-RRB-

overlapping

periods

of

indeterminacy

will

exhibit

worst

case

performance

at

plausibilities

other

than

Using

the

same

two

instants

from

the

first

test

we

tested

a

range

of

relationships

between

their

periods

of

indeterminacy

from

no

overlap

to

complete

overlap

We

fixed

the

position

of

one

instant

in

chronon

space

and

slid

the

other

instant

relative

to

the

fixed

instant

Figure

shows

the

results

The

z-axis

is

the

cost

-LRB-

in

machine

cycles

-RRB-

of

a

single

call

to

BeforeI

-LRB-

we

used

the

error

version

-RRB-

The

x-axis

is

the

plausibility

The

y-axis

is

the

relative

position

of

the

two

instants

far

apart

indicates

no

overlap

in

the

periods

of

indeterminacy

whereas

even

means

complete

overlap

The

figure

shows

that

if

the

instants

do

not

overlap

-LRB-

a

common

case

-RRB-

BeforeI

is

very

cheap

If

the

instants

overlap

BeforeI

only

exhibits

poor

performance

along

a

central

ridge

Note

that

the

graph

in

Figure

is

a

slice

of

the

graph

in

Figure

at

the

even

point

along

the

relative

position

axis

While

examining

worst-case

behavior

is

sometimes

illuminating

we

anticipate

that

it

will

be

uncommon

for

two

instants

to

have

overlapping

periods

of

indeterminacy

and

that

worst-case

behavior

will

be

rarer

still

For

example

consider

an

event

relation

of

employee

hires

timestamped

with

the

day

of

hiring

The

day

an

employee

was

hired

is

an

indeterminate

instant

assuming

a

common

timestamp

granularity

of

a

second

Suppose

we

query

this

relation

to

determine

which

employees

were

hired

before

the

third

fiscal

quarter

began

The

quarter

began

at

AM

on

October

It

is

unlikely

that

most

of

the

hiring

instants

overlap

AM

on

October

Hence

the

precedes

comparison

for

most

of

the

instants

in

the

relation

will

be

very

efficient

and

the

impact

of

the

other

comparisons

on

the

total

work

done

in

the

query

will

be

slight

To

explore

this

aspect

further

we

devised

a

further

test

We

randomly

placed

ten

instants

each

of

which

had

a

one-day

period

of

indeterminacy

-LRB-

chronons

-RRB-

and

a

uniform

distribution

in

a

chronon

space

that

varied

between

and

days

-LRB-

between

and

chronons

-RRB-

in

size

For

every

plausibility

between

and

we

tested

BeforeI

on

every

possible

combination

of

instants

-LRB-

possible

combinations

-RRB-

at

plausibilities

ranging

from

to

Instants

were

not

compared

to

themselves

We

rerandomized

the

location

of

the

instants

between

each

test

-LRB-

i.e.

per

one

hundred

comparisons

-RRB-

The

results

are

depicted

in

Figure

The

graph

in

Figure

is

a

slice

of

this

graph

at

a

value

of

one

unit

of

random

space

The

graph

shows

that

in

a

normal

mix

of

instants

rare

worst-case

situations

have

little

impact

on

overall

performance

Only

when

the

size

of

the

random

space

is

small

is

the

cost

of

BeforeI

significant

To

this

point

we

had

not

determined

how

much

more

expensive

we

expect

BeforeI

to

be

than

Machine

Cycles

Plausibility

error

error

Figure

Worst-case

performance

of

BeforeI

Before

To

measure

the

relative

cost

of

BeforeI

we

reran

the

random

placement

of

instants

test

described

above

on

both

Before

and

BeforeI

But

this

time

we

let

the

size

of

the

random

chronon

space

vary

between

and

days

rather

than

and

For

each

day

we

averaged

the

cost

of

the

BeforeI

operation

across

all

the

plausibilities

to

The

results

are

plotted

in

Figure

When

all

ten

instants

are

randomly

placed

in

a

chronon

space

three

months

in

size

-LRB-

i.e.

there

are

ten

employee

hires

in

three

months

and

only

these

hires

are

used

in

the

query

-RRB-

BeforeI

is

approximately

one

and

one-half

times

as

expensive

as

Before

This

difference

will

remain

approximately

the

same

as

we

further

increase

the

size

of

the

random

space

Although

the

run-time

cost

of

each

operation

considered

in

isolation

is

informative

it

does

not

address

the

actual

cost

of

a

query

with

indeterminate

information

since

the

frequency

of

operations

and

the

interactions

between

operations

are

absent

from

the

analysis

In

addition

these

operations

are

only

one

portion

of

query

evaluation

many

other

operations

are

performed

in

most

queries

To

measure

BeforeI

and

the

other

operations

in

context

we

designed

a

test

of

a

complete

query

We

hand-compiled

the

example

SQL

query

given

in

Figure

on

page

into

the

series

of

MultiCal

calls

shown

in

Figure

The

determinate

and

indeterminate

sequences

of

calls

differ

only

slightly

the

differences

are

highlighted

in

italics

in

the

indeterminate

sequence

We

used

the

compact

indeterminate

timestamp

formats

which

are

more

expensive

to

unpack

but

have

the

same

space

cost

as

the

determinate

timestamps

used

in

the

experiment

Note

that

each

sequence

does

O

-LRB-

-RRB-

unpacks

i.e.

all

possible

combinations

of

instants

and

periods

are

unpacked

An

alternative

query

processing

strategy

is

to

unpack

each

instant

and

period

and

cache

the

results

costing

only

O

-LRB-

n

-RRB-

unpacks

We

also

programmed

this

sequence

of

calls

which

we

refer

to

as

the

optimized

unpack

sequence

For

all

the

sequences

we

suppressed

all

input

output

and

disk

I/O

as

these

expensive

operations

tend

to

dominate

the

cost

of

other

operations

and

also

because

those

costs

far

apart

overlap

even

overlap

far

apart

Plausibility

Relative

Position

Machine

Cycles

Figure

Sliding

one

instant

relative

to

another

performance

of

BeforeI

are

identical

whether

indeterminacy

is

present

or

absent

To

test

the

query

we

once

again

used

a

variation

of

the

random

placement

of

instants

We

used

the

tuples

shown

in

Figure

but

randomly

placed

the

instants

in

a

chronon

space

of

increasing

size

We

used

a

period

of

indeterminacy

of

one

day

-LRB-

chronons

-RRB-

for

the

instants

in

both

relations

The

results

are

shown

in

Figure

Except

for

the

rare

situations

where

most

of

the

instants

are

packed

into

a

relatively

tight

random

space

indeterminacy

roughly

doubles

the

CPU

cost

of

the

query

Extending

Temporal

Query

Languages

In

SQL

valid-time

indeterminacy

is

a

form

of

value

incompleteness

-LRB-

cf.

-LSB-

-RSB-

-RRB-

where

the

value

of

an

attribute

is

not

fully

known

The

Received

relation

in

Figure

provides

examples

of

value

incompleteness

for

the

Part

attribute

a

part

may

exist

which

we

have

yet

to

identify

-LRB-

-RRB-

has

been

partially

identified

-LRB-

restricts

the

kind

of

part

to

belong

to

the

specified

class

of

parts

-RRB-

or

has

been

narrowed

down

to

a

set

of

possibilities

-LRB-

-RRB-

We

showed

in

Section

how

to

support

value

incompleteness

in

instant

period

and

interval

attributes

Valid-time

indeterminacy

can

also

apply

in

temporal

data

models

-LSB-

TCG

-RSB-

In

such

models

-LRB-

in

Periods

of

Indeterminacy

-RRB-

Size

of

Random

Space

Plausibility

Machine

Cycles

Figure

The

cost

of

comparing

ten

instants

randomly

placed

in

a

chronon

space

of

varying

size

the

values

themselves

vary

over

time

This

behavior

is

often

modeled

by

associating

a

timestamp

with

each

tuple

Allowing

this

implicit

timestamp

to

be

indeterminate

adds

a

new

source

of

incompleteness

which

we

term

tuple

valid-time

indeterminacy

which

is

orthogonal

to

other

sources

of

incompleteness

In

particular

it

can

peacefully

coexist

with

value

incompleteness

of

both

nontemporal

and

temporal

attributes

and

with

tuple

incompleteness

where

the

membership

of

a

tuple

in

a

relation

is

not

fully

determined

We

advocate

separating

the

various

kinds

of

indeterminacy

so

that

users

can

choose

the

combination

that

is

most

appropriate

for

their

application

As

a

concrete

example

we

now

review

how

tuple

valid-time

indeterminacy

can

be

added

to

a

specific

temporal

query

language

This

language

was

designed

by

a

committee

of

eighteen

researchers

from

academia

vendor

research

labs

and

industry

-LSB-

-RSB-

In

this

section

we

consider

a

variant

of

termed

that

is

being

proposed

for

incorporation

into

the

standard

-LSB-

-RSB-

This

variant

differs

from

's

data

model

in

allowing

duplicates

and

timestamping

tuples

with

periods

instead

of

with

temporal

elements

-LRB-

sets

of

maximal

periods

-RRB-

supports

three

temporal

dimensions

valid

time

transaction

time

and

user-defined

time

-LSB-

-RSB-

The

approach

to

value

incompleteness

discussed

to

this

point

applies

to

user-defined

time

In

the

remainder

of

this

section

we

consider

tuple

valid-time

indeterminacy

Specifically

we

allow

the

period

valid

timestamp

of

a

tuple

to

be

an

indeterminate

period

As

the

timestamp

indicates

month

months

months

Machine

Cycles

Size

of

Indeterminate

Space

Error

Determinate

Figure

The

average

cost

of

comparing

ten

instants

randomly

placed

in

a

chronon

space

of

varying

size

f

The

determinate

sequence

g

for

every

combination

of

r

and

p

unpack

instant

-LRB-

r.When

-RRB-

unpack

period

-LRB-

p.During

-RRB-

Before

-LRB-

r.When

p.Duringto

-RRB-

Before

-LRB-

p.Duringfrom

r.When

-RRB-

if

-LRB-

and

-RRB-

then

add

temp

to

result

end

end

f

The

indeterminate

sequence

g

for

every

combination

of

r

and

p

unpack

instant

-LRB-

r.When

-RRB-

unpack

period

-LRB-

p.During

-RRB-

BeforeI

-LRB-

r.When

p.Duringto

-RRB-

BeforeI

-LRB-

p.Duringfrom

r.When

-RRB-

if

-LRB-

and

-RRB-

then

add

temp

to

result

end

end

Figure

MultiCal

calls

for

example

query

when

the

fact

represented

by

the

tuple

was

valid

in

reality

an

indeterminate

timestamp

indicates

that

it

is

not

known

precisely

when

the

fact

became

true

or

no

longer

was

true

Note

however

that

we

do

know

that

the

fact

was

true

at

some

point

-LRB-

orthogonally

tuple

incompleteness

could

be

added

to

add

the

uncertainty

in

whether

the

fact

was

ever

true

-RRB-

month

months

months

Machine

Cycles

-LRB-

per

total

query

-RRB-

Size

of

Indeterminate

Space

Indeterminate

Error

Indeterminate

optimized

unpack

Determinate

Determinate

optimized

unpack

Figure

The

average

cost

of

the

example

query

per

combination

of

tuples

Warehouse

Lot

Num

Part

When

Boeing

unknown

May

Cessna

some

electrical

part

May

Boeing

fyoke

throttleg

May

Figure

Examples

of

value

incompleteness

Syntactic

Extensions

As

is

an

extension

of

we

start

with

the

syntactic

extensions

introduced

in

Section

specifically

indeterminate

temporal

attributes

in

the

create

table

and

alter

table

statements

correlation

credibility

in

the

from

clause

and

ordering

plausibility

in

the

where

clause

Interestingly

these

are

all

that

are

necessary

to

add

tuple

valid-time

indeterminacy

to

As

an

example

to

define

the

Received

relation

as

an

indeterminate

valid-time

relation

we

simply

specify

an

indeterminate

period

type

as

the

implicit

timestamp

CREATE

TABLE

Received

-LRB-

Warehouse

CHARACTER

-LRB-

-RRB-

Lot

Num

INTEGER

Part

CHARACTER

-LRB-

-RRB-

-RRB-

AS

VALIDTIME

INDETERMINATE

PERIOD

-LRB-

DATE

-RRB-

WITH

NONSTANDARD

DISTRIBUTION

Note

that

the

When

attribute

is

no

longer

present

instead

the

timestamp

is

implicit

The

implicit

timestamp

associated

with

a

correlation

name

-LRB-

e.g.

r

-RRB-

is

accessible

within

queries

via

the

func

tion

VALIDTIME

-LRB-

r

-RRB-

its

value

is

impacted

by

the

correlation

credibility

and

ordering

plausibility

identically

to

the

explicit

values

in

the

tuple

Semantic

Extensions

The

semantics

of

is

specified

in

terms

of

the

semantics

of

Since

with

tuple

valid-time

indeterminacy

is

an

extension

of

with

value

valid-time

indeterminacy

the

major

change

is

to

replace

-LSB-

-LSB-

-RSB-

-RSB-

SQL

in

the

semantics

with

-LSB-

-LSB-

-RSB-

-RSB-

ind.

has

three

modes

specified

using

new

reserved

words

temporal

upward

compatibility

in

which

only

the

current

state

is

used

sequenced

semantics

in

which

the

query

is

applied

with

SQL

semantics

at

each

point

in

time

and

nonsequenced

semantics

in

which

the

table

is

treated

as

a

conventional

table

with

an

additional

period

attribute

The

nonsequenced

semantics

is

already

dealt

with

in

the

rest

of

the

paper

with

the

proviso

that

the

correlation

credibility

may

replace

the

implicit

period

timestamp

with

a

determinate

value

In

temporal

upward

compatibility

all

tables

are

snapshot

as

of

now

We

use

the

overlap

operator

to

determine

those

tuples

valid

at

now

the

operator

is

already

defined

for

indeterminate

periods

The

specified

plausibility

or

the

default

if

a

plausibility

is

not

specified

is

used

for

the

overlap

For

the

sequenced

semantics

a

tuple

will

be

considered

to

be

valid

at

a

given

time

point

if

the

indeterminate

period

overlaps

with

the

given

time

point

using

the

specified

plausibility

The

final

change

required

is

that

to

support

coalescing

The

user

can

specify

in

-LRB-

via

-LRB-

PERIOD

-RRB-

in

the

from

clause

-RRB-

that

a

relation

be

coalesced

tuples

with

identical

values

for

the

explicit

attributes

-LRB-

termed

value-equivalent

-RRB-

with

timestamps

that

overlap

or

meet

in

valid

time

are

merged

into

a

single

tuple

with

a

timestamp

that

is

the

union

of

the

timestamps

of

the

original

tuples

If

the

periods

do

not

overlap

or

meet

then

the

tuples

are

unchanged

The

semantic

function

Coalesce

repeatedly

coalesces

overlapping

pairs

until

there

is

no

more

overlap

Semantics

of

Coalescing

In

the

indeterminate

semantics

the

coalescing

operation

must

be

extended

to

handle

periods

with

Definition

-LRB-

Indeterminate

Coalescing

-RRB-

For

two

value-equivalent

tuples

that

have

valid-time

periods

-LSB-

ff

-RSB-

and

-LSB-

ffi

-RSB-

which

overlap

with

plausibility

-LRB-

i.e.

definitely

overlap

-RRB-

the

indeterminate

coalescing

of

the

periods

-LSB-

ff

-RSB-

and

-LSB-

ffi

-RSB-

produces

-LSB-

s

t

-RSB-

where

s

-LRB-

min

-LRB-

-RRB-

min

-LRB-

-RRB-

Ps

-RRB-

t

-LRB-

max

-LRB-

ffi

-RRB-

max

-LRB-

ffi

-RRB-

Pt

-RRB-

Ps

is

the

probability

mass

function

such

that

its

cumulative

density

function

Fs

behaves

as

follows

Fs

-LRB-

x

-RRB-

-LRB-

F

-LRB-

x

-RRB-

if

at

time

x

F

-LRB-

x

-RRB-

F

-LRB-

x

-RRB-

F

-LRB-

x

-RRB-

otherwise

coalesce

operator

contends

with

indeterminate

attribute

values

and

so

differs

from

Dey

and

Sarkar

's

coalescence

operations

which

handles

indeterminate

tuples

-LSB-

-RSB-

Figure

The

result

of

coalescing

two

indeterminate

periods

follows

the

skyline

Pt

is

the

probability

mass

function

such

that

its

complementary

cumulative

density

function

F

t

behaves

as

follows

F

t

-LRB-

x

-RRB-

-LRB-

F

-LRB-

x

-RRB-

if

at

time

x

F

-LRB-

x

-RRB-

F

ffi

-LRB-

x

-RRB-

F

ffi

-LRB-

x

-RRB-

otherwise

If

the

periods

do

not

definitely

overlap

then

the

periods

are

already

coalesced

While

this

definition

may

appear

complicated

the

underlying

idea

is

simple

Figure

shows

a

probability

profile

for

two

overlapping

periods

Both

periods

ramp

up

to

definite

information

during

their

respective

starting

instants

and

fall

off

to

no

information

during

the

terminating

instants

The

union

of

the

two

periods

is

the

skyline

of

the

two

periods

The

skyline

represents

the

maximal

extent

of

both

the

determinate

and

indeterminate

portions

of

the

periods

Implementation

of

Coalescing

The

implementation

techniques

developed

in

Section

apply

directly

to

the

indeterminate

portions

of

except

for

coalescing

which

requires

a

new

approach

A

straightforward

implementation

of

indeterminate

coalescing

could

be

very

costly

since

in

some

cases

the

operator

must

dynamically

compute

a

new

probability

mass

function

Not

only

would

dynamically

computing

such

functions

quickly

exhaust

the

limited

space

of

probability

mass

function

names

-LRB-

recall

from

Section

that

the

timestamp

formats

limit

the

number

of

mass

functions

to

possibilities

-RRB-

but

the

efficient

implementation

of

BeforeI

would

also

suffer

since

it

depends

upon

the

pre-computed

approximation

of

the

mass

function

Our

solution

is

to

accept

some

information

loss

during

coalescing

and

avoid

the

expense

of

dynamically

computing

a

mass

function

by

substituting

the

missing

distribution

for

the

new

mass

function

In

other

words

for

two

valid-time

periods

-LSB-

ff

-RSB-

and

-LSB-

ffi

-RSB-

which

definitely

overlap

the

implementation

of

indeterminate

coalescing

produces

the

period

-LSB-

s

t

-RSB-

where

s

if

for

every

time

t

F

-LRB-

t

-RRB-

F

-LRB-

t

-RRB-

if

for

every

time

t

F

-LRB-

t

-RRB-

F

-LRB-

t

-RRB-

-LRB-

min

-LRB-

-RRB-

min

-LRB-

-RRB-

missing

-RRB-

otherwise

function

COALESCE

-LRB-

in

-LSB-

-RSB-

-LSB-

ffi

-RSB-

period

-RRB-

set-of-periods

var

s

t

instant

begin

if

not

overlap

-LRB-

-LSB-

-RSB-

-LSB-

ffi

-RSB-

-RRB-

then

return

f

-LSB-

-RSB-

-LSB-

ffi

-RSB-

g

f

Compute

starting

instant

g

if

then

s

else

if

then

s

else

if

P

is

P

then

if

and

then

s

else

if

and

then

s

else

s

-LRB-

min

-LRB-

-RRB-

min

-LRB-

-RRB-

missing

-RRB-

f

Compute

terminating

instant

g

if

ffi

then

t

else

if

ffi

then

t

ffi

else

if

P

is

Pffi

then

if

ffi

and

ffi

then

t

else

if

ffi

and

ffi

then

t

ffi

else

t

-LRB-

max

-LRB-

ffi

-RRB-

max

-LRB-

ffi

-RRB-

missing

-RRB-

return

f

-LSB-

s

t

-RSB-

g

end

f

COALESCE

g

Figure

Indeterminate

Coalescing

and

t

if

for

every

time

t

F

-LRB-

t

-RRB-

F

ffi

-LRB-

t

-RRB-

ffi

if

for

every

time

t

F

ffi

-LRB-

t

-RRB-

F

-LRB-

t

-RRB-

-LRB-

max

-LRB-

ffi

-RRB-

max

-LRB-

ffi

-RRB-

missing

-RRB-

otherwise

But

even

this

weakened

version

of

coalescing

is

much

too

expensive

since

the

cumulative

density

functions

for

two

instants

must

be

computed

at

each

time

in

a

period

of

indeterminacy

to

determine

if

one

function

dominates

another

However

it

is

easy

to

determine

dominance

in

some

special

but

common

cases

For

instance

for

a

pair

of

starting

instants

if

both

instants

have

the

same

probability

mass

function

and

one

instant

's

period

of

indeterminacy

starts

before

the

other

instant

's

period

of

indeterminacy

starts

and

ends

before

the

other

's

ends

then

the

earlier

instant

is

dominant

For

example

the

starting

instant

-LRB-

uniform

-RRB-

dominates

the

instant

-LRB-

uniform

-RRB-

The

implementation

of

indeterminate

coalescing

in

only

checks

for

dominance

in

these

special

cases

and

substitutes

the

missing

mass

function

in

all

other

cases

as

shown

in

Figure

Summary

To

support

tuple

valid-time

indeterminacy

in

the

variant

of

being

proposed

for

no

syntactic

extensions

beyond

those

discussed

for

conventional

SQL

presented

in

Section

are

needed

The

only

significant

semantic

extension

is

to

support

coalescing

We

speculate

that

our

approach

to

valid-time

indeterminacy

both

the

value

incompleteness

variety

and

the

tuple

validtime

incompleteness

variety

can

be

added

in

a

similarly

straight-forward

manner

to

any

of

the

many

temporal

query

languages

proposed

in

the

literature

Related

Work

Despite

the

wealth

of

research

on

adding

incomplete

information

to

databases

-LSB-

-RSB-

there

are

few

efforts

that

address

incomplete

temporal

information

Much

of

the

previous

research

in

incomplete

information

databases

has

concentrated

on

issues

related

to

values

-LRB-

e.g.

-LSB-

-RSB-

-RRB-

Another

primary

research

thrust

has

studied

the

applicability

of

fuzzy

set

theory

to

relational

databases

-LRB-

e.g.

-LSB-

-RSB-

-RRB-

There

is

also

extensive

AI

literature

on

integrating

various

combinations

of

probabilistic

reasoning

temporal

reasoning

and

planning

Kraus

and

Subrahmanian

provide

a

nice

summary

of

that

literature

-LSB-

-RSB-

We

first

place

our

work

in

the

context

of

value

and

tuple

incompleteness

then

examine

in

detail

several

papers

that

concern

temporal

incompleteness

Information

that

is

valid-time

indeterminate

is

similar

to

disjunctive

information

especially

in

the

context

of

deductive

databases

-LSB-

-RSB-

Disjunctive

information

is

a

collection

of

facts

one

-LRB-

or

more

-RRB-

of

which

is

true

A

set

of

possible

chronons

is

of

the

exclusive-or

variety

of

disjunctive

information

-LRB-

only

one

disjunct

is

true

-RRB-

-LSB-

-RSB-

Valid-time

indeterminacy

differs

from

the

above

investigations

because

the

alternatives

are

weighted

and

the

weights

are

integrated

into

the

query

semantics

The

field

of

probabilistic

databases

covers

a

wide

spectrum

of

different

uses

of

probabilistic

information

Probabilistic

weights

have

been

attached

to

attribute

values

to

model

situations

where

an

attribute

value

could

be

one

of

several

more

or

less

likely

values

-LSB-

-RSB-

Probabilistic

weights

have

also

been

appended

to

tuples

where

the

weight

is

the

probability

that

the

tuple

belongs

to

the

relation

-LSB-

-RSB-

Decision

support

systems

vague

queries

information

retrieval

and

data

mining

have

also

utilized

probabilistic

information

-LSB-

-RSB-

Our

work

concerns

only

probabilities

in

attribute

values

and

can

be

seen

as

an

extension

of

the

Probabilistic

Data

Model

-LRB-

PDM

-RRB-

-LSB-

-RSB-

In

the

PDM

attribute

values

are

sets

with

weights

attached

to

each

element

The

weight

is

the

probability

that

the

corresponding

element

is

the

value

of

the

attribute

Queries

use

the

probabilistic

representation

in

conjunction

with

a

single

user-given

confidence

to

compute

a

result

within

the

framework

of

the

possible

world

semantics

The

novelty

in

our

work

can

be

seen

in

the

methods

used

to

retrieve

the

incomplete

information

and

in

how

that

information

is

represented

In

the

PDM

each

element

in

a

set

of

possible

values

is

stored

and

processed

separately

The

costs

of

the

probabilistic

operators

in

PDM

are

proportional

to

the

number

of

alternatives

in

the

set

-LRB-

some

of

the

operations

have

a

cost

that

is

proportional

to

the

square

of

the

number

of

alternatives

-RRB-

Dey

and

Sarkar

extend

this

data

model

in

part

to

render

it

in

first

normal

form

and

to

permit

a

more

general

join

operation

-LSB-

-RSB-

More

recently

Lakshmanan

Leone

Ross

and

Subrahma

nian

have

extended

the

PDM

to

eliminate

several

of

the

assumptions

including

independence

of

elements

in

their

ProbView

system

-LSB-

-RSB-

In

particular

they

permit

a

range

of

Cartesian

product

operators

to

be

defined

with

the

situation

dictating

the

appropriate

strategy

We

could

not

adopt

the

PDM

approach

or

its

successors

to

support

temporal

indeterminacy

since

there

might

be

several

million

elements

in

a

set

of

possible

chronons

Representing

each

alternative

with

an

associated

probability

is

impractical

Due

to

the

unique

nature

of

valid-time

indeterminacy

a

different

approach

was

required

We

now

turn

to

the

literature

of

temporal

incompleteness

which

unlike

our

approach

does

not

employ

probabilities

In

the

earliest

work

on

incomplete

temporal

information

an

indeterminate

instant

was

modeled

with

a

set

of

possible

chronons

-LSB-

-RSB-

Before

was

extended

to

return

the

value

unknown

necessitating

an

extension

to

a

three-valued

logic

Also

a

four-valued

logic

was

proposed

to

model

times

and

values

that

are

unknown

imprecise

or

negative

-LRB-

under

the

open

world

assumption

-RRB-

-LSB-

-RSB-

Our

current

approach

allows

a

probability

mass

function

to

be

associated

with

each

indeterminate

instant

and

does

not

require

a

multi-valued

logic

though

we

do

use

such

a

logic

in

the

operational

semantics

Dutta

uses

a

fuzzy

set

approach

to

handle

generalized

temporal

events

-LSB-

-RSB-

A

generalized

temporal

event

is

a

single

event

that

has

multiple

occurrences

For

example

the

event

Margaret

's

salary

is

high

may

occur

at

various

times

as

Margaret

's

salary

fluctuates

to

reflect

promotions

and

demotions

The

meaning

of

high

is

incomplete

High

is

not

a

crisp

predicate

In

Dutta

's

model

all

the

possibilities

for

high

are

represented

in

a

generalized

event

and

the

user

selects

some

subset

according

to

his

or

her

interpretation

of

high

This

contrasts

with

the

task

of

encoding

the

type

of

information

we

have

characterized

as

valid-time

indeterminate

We

view

events

as

having

a

single

occurrence

An

indeterminate

instant

is

a

set

of

alternatives

one

and

only

one

of

which

is

the

actual

time

Every

member

in

a

fuzzy

set

is

always

possible

to

a

greater

or

lesser

extent

depending

on

the

degree

of

membership

but

always

possible

-LRB-

although

some

fuzzy

databases

stipulate

by

fiat

that

only

one

member

is

possible

-LSB-

-RSB-

-RRB-

Our

approach

and

that

of

Dutta

's

model

different

kinds

of

temporal

incompleteness

We

feel

that

a

probabilistic

approach

is

better

suited

to

modeling

valid-time

indeterminacy

as

formulated

in

this

paper

and

that

fuzzy

set

approaches

like

Dutta

's

-LRB-

e.g.

-LSB-

-RSB-

-RRB-

are

better

suited

to

modeling

generalized

events

The

two

approaches

are

orthogonal

and

the

user

may

pick

the

one

-LRB-

s

-RRB-

most

appropriate

to

her

application

Generalized

bitemporal

elements

are

defined

somewhat

differently

in

a

more

recent

paper

-LSB-

-RSB-

Bitemporal

elements

combine

transaction

time

and

valid

time

in

the

same

temporal

element

Since

also

supports

transaction

time

valid-time

indeterminacy

and

generalized

bitemporal

elements

differ

mainly

in

their

handling

of

valid

time

In

Kouramajian

and

Elmasri

's

model

both

the

upper

and

lower

support

on

a

valid

time

period

could

be

a

set

of

noncontiguous

possible

chronons

Unlike

valid-time

indeterminacy

no

probabilities

are

used

Since

there

are

no

probabilities

the

user

in

general

is

limited

to

querying

for

answers

which

are

either

definite

or

those

which

are

possible

-LRB-

or

combinations

thereof

-RRB-

Generalized

valid

times

are

composed

of

valid

times

by

the

operators

of

alternation

-LRB-

only

one

valid

time

applies

-RRB-

and/or

union

-LRB-

both

valid

times

could

apply

-RRB-

We

provide

no

capability

for

generalizing

valid

times

to

handle

alternation

or

union

Another

proposed

model

intertwines

support

for

value

and

temporal

incompleteness

-LSB-

-RSB-

By

combining

the

different

kinds

of

incomplete

information

a

wide

spectrum

of

attribute

values

are

simultaneously

modeled

including

values

that

are

completely

known

values

that

are

unknown

but

are

known

to

have

occurred

values

that

are

known

if

they

occurred

and

values

that

are

unknown

even

if

they

occurred

In

our

approach

value

incompleteness

tuple

incompleteness

and

tuple

valid-time

indeterminacy

are

orthogonal

By

combining

valid-time

indeterminacy

with

other

kinds

of

incomplete

information

we

can

support

each

of

the

kinds

of

incomplete

information

found

in

Gadia

et

al.

plus

others

-LRB-

e.g.

fuzzy

value

incompleteness

-RRB-

Another

difference

between

our

approach

and

theirs

is

that

they

make

no

use

of

probabilistic

information

The

user

can

not

express

his

or

her

credibility

in

the

underlying

data

nor

plausibility

in

the

temporal

relationships

in

the

data

Gadia

et

al.

prove

reliability

for

their

model

as

we

did

for

ours

in

Section

They

also

showed

that

except

for

certain

cases

of

selection

their

operators

were

maximal

The

same

holds

for

our

operators

Hence

both

of

our

models

-LRB-

with

the

exception

of

certain

cases

of

selection

in

their

language

-RRB-

are

theoretically

sound

While

the

possible

and

definite

limits

to

incomplete

temporal

information

are

well-understood

the

cost

of

querying

incomplete

temporal

information

can

be

prohibitive

Satisfaction

of

general

constraints

that

is

a

well-formed

formulae

consisting

of

temporal

variables

predicates

and

boolean

connectives

-LRB-

including

negation

-RRB-

and

allowing

substitution

of

indeterminate

instants

is

not

surprisingly

NP-hard

-LSB-

-RSB-

Koubarakis

showed

that

by

restricting

the

kinds

of

constraints

allowed

polynomial

time

algorithms

can

be

obtained

-LSB-

-RSB-

Koubarakis

proposed

a

temporal

data

model

with

global

and

local

inequality

constraints

on

the

occurrence

time

of

an

event

The

resulting

model

supports

indefinite

instants

An

indefinite

instant

is

a

very

general

kind

of

instant

that

includes

indeterminate

instants

instants

with

disjoint

sets

of

possible

chronons

and

instants

with

incompletely

specified

upper

and

lower

supports

For

instance

we

may

know

that

occurred

before

but

after

PM

-LRB-

PM

-RRB-

and

we

may

know

that

happened

before

PM

In

Koubarakis

's

data

model

we

can

then

conclude

that

happened

between

and

PM

Koubarakis

restricts

the

kinds

of

constraints

allowed

-LRB-

to

disjunctions

of

inequalities

-RRB-

and

achieves

polynomial

time

complexity

for

retrieving

information

Another

constraint-based

temporal

reasoner

is

LaTeR

which

has

been

successfully

implemented

-LSB-

-RSB-

LaTeR

similarly

restricts

the

kinds

of

constraints

allowed

-LRB-

to

conjunctions

of

linear

inequalities

-RRB-

but

this

class

of

constraints

includes

many

of

the

important

temporal

predicates

LaTeR

must

construct

a

constraint

network

during

insertion

or

updating

of

temporal

information

but

uses

this

network

very

efficiently

when

retrieving

information

to

achieve

O

-LRB-

-RRB-

performance

The

primary

difference

between

these

constraint-based

models

and

ours

-LRB-

other

than

probabilities

-RRB-

is

that

SQL

-LRB-

like

most

relational

database

models

-RRB-

does

not

allow

inter-tuple

constraints

Tuples

in

SQL

relations

are

row-independent

that

is

no

information

is

shared

between

tuples

Since

the

indeterminate

data

model

is

based

on

SQL

it

makes

no

overt

provisions

for

sharing

indeterminate

information

between

tuples

Only

the

constraints

given

in

the

query

are

used

to

relate

tuples

Further

we

like

most

others

assume

that

the

variables

in

a

query

are

independent

Our

motivation

is

to

avoid

the

expensive

computation

of

dependent

probabilities

but

the

independence

assumption

also

yields

an

O

-LRB-

nr

-RRB-

complexity

for

evaluating

an

unrestricted

query

consisting

of

temporal

predicates

and

boolean

connectives

-LRB-

where

n

is

the

number

of

predicates

in

the

query

and

r

is

the

number

of

tuples

-RRB-

However

constraint-based

models

are

able

to

model

temporal

information

that

we

can

not

We

note

that

there

is

little

discussion

in

most

of

the

aforementioned

papers

save

LaTeR

on

implementation

aspects

We

feel

that

both

efficient

representations

and

efficient

query

processing

algorithms

are

essential

especially

when

the

incomplete

information

is

weighted

Summary

and

Future

Work

This

paper

has

extended

the

syntax

and

formal

semantics

of

SQL

to

support

valid-time

indeterminacy

and

has

described

an

efficient

implementation

for

that

support

We

also

showed

how

the

concepts

can

be

applied

to

temporal

query

languages

in

particular

to

the

variant

of

being

proposed

for

incorporation

into

We

return

to

the

goals

enumerated

in

Section

The

syntactic

extensions

are

minimal

In

particular

we

provide

the

user

with

two

controls

on

the

retrieval

process

correlation

credibility

and

ordering

plausibility

We

have

augmented

the

create

table

and

alter

table

statements

to

specify

which

attributes

incorporate

valid-time

indeterminacy

and

to

identify

which

timestamp

format

to

use

extended

the

from

clause

to

specify

correlation

credibility

using

an

optional

with

clause

extended

the

select

statement

to

specify

ordering

plausibilities

and

added

variants

to

the

set

statement

to

specify

default

plausibilities

and

credibilities

Correlation

credibility

changes

the

information

available

to

query

processing

it

replaces

indeterminate

with

determinate

information

Ordering

plausibility

controls

the

construction

of

an

answer

to

a

query

using

the

pool

of

credible

information

A

temporal

expression

is

satisfied

if

there

exists

a

plausible

ordering

-LRB-

to

the

level

specified

by

the

user

-RRB-

that

satisfies

it

The

approach

is

orthogonal

to

those

proposed

by

others

to

handle

value

incompleteness

and

generalized

events

-LRB-

cf.

Section

-RRB-

has

an

intuitive

semantics

-LRB-

Section

-RRB-

retains

the

first

normal

form

structure

of

SQL

and

-LRB-

Section

-RRB-

refines

previously

proposed

techniques

to

handle

multiple

granularities

of

time

-LRB-

Section

-RRB-

is

temporally

upward

compatible

in

that

it

reduces

to

SQL

's

and

's

semantics

in

the

absence

of

indeterminacy

-LRB-

Section

-RRB-

reduces

to

SQL

's

semantics

even

in

the

presence

of

indeterminacy

when

the

new

constructs

are

not

used

-LRB-

Section

-RRB-

and

has

been

proven

to

be

both

reliable

and

maximal

-LRB-

Section

-RRB-

While

these

languages

extensions

are

highly

expressive

this

paper

demonstrates

that

they

can

be

efficiently

implemented

We

showed

how

indeterminate

instants

with

a

uniform

probability

mass

function

or

mass

function

that

is

missing

can

be

represented

in

only

bits

in

most

cases

for

user-defined

distributions

the

common

representation

is

only

bits

-LRB-

Section

-RRB-

The

operational

semantics

was

shown

to

be

correct

-LRB-

Section

-RRB-

the

rod-counting

algorithm

is

efficient

-LRB-

Section

-RRB-

and

the

undercounting

of

this

algorithm

is

minimal

-LRB-

also

Section

-RRB-

We

implemented

the

functions

required

by

the

altered

semantics

-LRB-

Section

-RRB-

and

demonstrated

that

the

implementation

roughly

doubles

the

CPU

cost

of

a

query

when

indeterminacy

is

present

and

plausibilities

and

credibilities

less

than

are

specified

while

having

little

impact

on

its

disk

I/O

time

-LRB-

Section

-RRB-

This

paper

only

considers

the

select

create

table

and

alter

table

statements

of

SQL

and

The

modification

statements

-LRB-

append

delete

and

update

-RRB-

as

well

as

views

integrity

constraints

assertions

and

cursors

can

be

extended

in

an

analogous

manner

The

approach

espoused

here

has

been

adopted

in

-LSB-

-RSB-

One

important

area

of

future

research

is

extension

of

indexing

methods

to

support

indeterminate

values

Most

extant

indexing

approaches

assume

a

total

order

on

the

underlying

domain

Only

for

an

ordering

plausibility

of

does

such

a

total

order

exist

for

indeterminate

instants

-LRB-

cf.

Section

-RRB-

Indexing

methods

need

to

be

extended

to

support

arbitrary

ordering

plausibilities

to

be

specified

at

query

time

Algorithm

improvements

on

the

functions

discussed

in

Section

are

certainly

possible

While

such

improvements

might

reduce

execution

time

considerably

in

special

cases

we

doubt

that

they

will

have

much

impact

on

the

average

case

A

useful

extension

of

the

current

work

would

be

to

use

periods

instead

of

values

to

express

plausibility

For

instance

the

user

could

constrain

retrieval

to

tuples

that

overlap

March

to

within

a

year

-LRB-

this

has

been

termed

a

band

join

-LSB-

-RSB-

or

a

fuzzy

temporal

equi-join

-LSB-

-RSB-

-RRB-

This

possibility

can

be

seen

as

an

extension

of

the

present

paper

specifically

as

a

refinement

of

the

BeforeI

operation

Finally

it

is

always

useful

to

consider

increasing

the

expressive

power

of

the

data

model

and

query

language

In

particular

one

important

assumption

we

make

throughout

is

that

tuples

are

row-independent

with

no

information

shared

between

indeterminate

tuples

Most

of

the

other

approaches

that

utilize

probabilities

to

model

various

flavors

of

incompleteness

make

this

assumption

as

well

because

computing

dependent

probabilities

in

the

inner

loop

of

query

processing

is

just

too

expensive

We

also

assume

that

indeterminate

instants

are

modeled

by

contiguous

sets

of

possible

chronons

We

do

not

support

noncontiguous

sets

which

could

model

indeterminate

instants

such

as

it

happened

yesterday

morning

or

this

morning

We

exploit

both

of

these

assumptions

to

achieve

efficiency

in

representation

and

in

query

processing

We

conjecture

that

relaxing

either

of

these

assumptions

will

cause

the

query

evaluation

complexity

to

return

to

cubic

-LRB-

or

worse

-RRB-

thereby

rendering

the

performance

unacceptable

for

many

temporal

database

applications

Acknowledgments

This

work

was

supported

in

part

by

NSF

grants

and

IBM

contract

and

a

grant

from

the

AT&T

Foundation

We

wish

to

thank

Merrie

Brucks

Saumya

Debray

Peter

J.

Downey

Christian

S.

Jensen

and

V.

S.

Subrahmanian

for

their

insightful

comments

and

contributions

References

-LSB-

-RSB-

J

F.

Allen

Maintaining

Knowledge

About

Temporal

Intervals

Communications

of

the

ACM

-LRB-

-RRB-

-LCB-

November

-LSB-

-RSB-

G.

Ariav

A

Temporally

Oriented

Data

Model

ACM

Transactions

on

Database

Systems

-LRB-

-RRB-

-LCB-

December

-LSB-

-RSB-

J.

Bair

M.

B?ohlen

C.

S.

Jensen

and

R.

T.

Snodgrass

Notions

of

Upward

Compatibility

of

Temporal

Query

Languages

Business

Informatics

-LRB-

Wirtschaftsinformatik

-RRB-

to

appear

pages

-LSB-

-RSB-

V.

Brusoni

L.

Console

P.

Terenziani

and

B.

Pernici

Extending

Temporal

Relational

Databases

to

Deal

with

Imprecise

and

Qualitative

Temporal

Information

In

S.

Clifford

and

A.

Tuzhilin

editors

Recent

Advances

in

Temporal

Databases

pp.

-LCB-

Zurich

Switzerland

September

Proceedings

of

the

International

Workshop

on

Temporal

Databases

Springer

Verlag

-LSB-

-RSB-

N.

Belnap

A

Useful

Four-Valued

Logic

In

Modern

Uses

of

Many-valued

Logic

G.

Epstein

and

J.

M.

Dunn

-LRB-

eds

-RRB-

D.

Reidel

pp

-LCB-

-LSB-

-RSB-

D.

Barbar?a

H.

Garc

a-Molina

and

D.

Porter

A

Probabilistic

Relational

Data

Model

In

Proceedings

of

the

International

Conference

on

Extending

Database

Technology

Advances

in

Database

Technology

pages

-LCB-

Venice

Italy

March

-LSB-

-RSB-

D.

Barbar?a

H.

Garc

a-Molina

and

D.

Porter

The

Management

of

Probabilistic

Data

IEEE

Transactions

on

Knowledge

and

Data

Engineering

-LRB-

-RRB-

-LCB-

October

-LSB-

-RSB-

E.

F.

Codd

Missing

Information

and

Response

to

Technical

Criticisms

Regarding

Missing

Information

chapters

and

of

The

Relational

Model

for

Database

Management

Version

pp.

-LCB-

Addison-Wesley

Publishing

Company

Inc.

-LSB-

-RSB-

R.

Cavallo

and

M.

Pittarelli

The

Theory

of

Probabilistic

Databases

In

P.

Hammersley

editor

Proceedings

of

the

International

Conference

on

Very

Large

Databases

pp.

-LCB-

Brighton

England

September

-LSB-

-RSB-

J.

Clifford

and

A.

Rao

A

Simple

General

Structure

for

Temporal

Domains

In

Proceedings

of

the

Conference

on

Temporal

Aspects

in

Information

Systems

pp.

-LCB-

France

May

AFCET

-LSB-

-RSB-

C.

J.

Date

Values

in

Database

Management

chapter

of

Relational

Database

Selected

Writings

pp.

-LCB-

Addison-Wesley

Reading

MA

-LSB-

-RSB-

T.

Dean

and

M.

Boddy

Reasoning

About

Partially

Ordered

Events

Artificial

Intelligence

-LRB-

-RRB-

-LCB-

October

-LSB-

-RSB-

D.

DeWitt

J.

Naughton

and

D.

Schneider

An

Evaluation

of

Non-equijoin

Algorithms

In

Proceedings

of

the

International

Conference

on

Very

Large

Databases

pp.

-LCB-

-LSB-

-RSB-

D.

Dubois

and

H.

Prade

Processing

Fuzzy

Temporal

Knowledge

IEEE

Transactions

of

Systems

Man

and

Cybernetics

-LRB-

-RRB-

-LCB-

-LSB-

-RSB-

D.

Dubois

H.

Prade

and

C.

Testamale

Handling

Incomplete

or

Uncertain

Data

and

Vague

Queries

in

Database

Applications

chapter

of

Possibility

Theory

An

Approach

to

Computerized

Processing

of

Uncertainty

pp.

-LCB-

Plenum

Press

New

York

and

London

-LSB-

-RSB-

C.

E.

Dyreson

and

R.

T.

Snodgrass

Valid-time

Indeterminacy

In

Proceedings

of

the

International

Conference

on

Data

Engineering

pp

-LCB-

Vienna

Austria

April

-LSB-

-RSB-

C.

E.

Dyreson

and

R.

T.

Snodgrass

Temporal

Indeterminacy

Chapter

of

-LSB-

-RSB-

pp.

-LCB-

-LSB-

-RSB-

C.

E.

Dyreson

and

R.

T.

Snodgrass

A

Timestamp

Representation

Chapter

of

-LSB-

-RSB-

pp.

-LCB-

-LSB-

-RSB-

D.

Dey

and

S.

Sarkar

A

Probabilistic

Relational

Model

and

Algebra

ACM

Transactions

on

Database

Systems

-LRB-

-RRB-

-LCB-

September

-LSB-

-RSB-

C.

E.

Dyreson

M.

Soo

and

R.

T.

Snodgrass

The

Data

Model

for

Time

Chapter

of

-LSB-

-RSB-

pp.

-LCB-

-LSB-

-RSB-

S.

Dutta

Generalized

Events

in

Temporal

Databases

In

Proceedings

of

the

Fifth

International

Conference

on

Data

Engineering

pp.

-LCB-

Los

Angeles

CA

February

-LSB-

-RSB-

C.

Dyreson

A

Bibliography

on

Uncertainty

Management

in

Information

Systems

In

Proceedings

of

the

Workshop

on

Uncertainty

Management

in

Information

Systems

From

Needs

to

Solutions

pp

-LCB-

Avalon

Santa

Catalina

California

April

-LSB-

-RSB-

N.

Fuhr

and

T.

R?olleke

A

Probabilistic

Relational

Algebra

for

the

Integration

of

Information

Retrieval

and

Database

Systems

ACM

Transactions

on

Information

Systems

to

appear

-LSB-

-RSB-

N.

Fuhr

A

Probabilistic

Framework

for

Vague

Queries

and

Imprecise

Information

in

Databases

In

Proceedings

of

the

International

Conference

on

Very

Large

Databases

Brisbane

Australia

-LSB-

-RSB-

S.

Goudsmit

and

R.

Claiborne

Time

Time

Inc.

New

York

-LSB-

-RSB-

E.

Gelenbe

and

G.

Hebrail

A

Probability

Model

of

Uncertainty

in

Data

Bases

In

Proceedings

of

the

International

Conference

on

Data

Engineering

pp.

-LCB-

Los

Angeles

CA

February

-LSB-

-RSB-

S.

K.

Gadia

S.

Nair

and

Y.-C

Poon

Incomplete

Information

in

Relational

Temporal

Databases

In

Proceedings

of

the

International

Conference

on

Very

Large

Databases

Vancouver

Canada

August

-LSB-

-RSB-

M.

Henrion

and

J.

Suermondt

Probabilistic

and

Bayesian

Representations

of

Uncertainty

and

Information

Systems

A

Pragmatic

Introduction

In

Proceedings

of

the

Workshop

on

Uncertainty

Management

in

Information

Systems

From

Needs

to

Solutions

pp.

-LCB-

Avalon

Santa

Catalina

California

April

-LSB-

JCE

-RSB-

C.

S.

Jensen

J.

Clifford

R.

Elmasri

S.

K.

Gadia

P.

Hayes

and

S.

Jajodia

-LRB-

eds

-RRB-

A

Glossary

of

Temporal

Database

Concepts

ACM

SIGMOD

Record

-LRB-

-RRB-

-LCB-

March

-LSB-

-RSB-

V.

Kouramajian

and

R.

Elmasri

A

Generalized

Temporal

Model

Tech

Report

University

of

Texas

at

Arlington

February

-LSB-

-RSB-

V.

Kouramajian

and

R.

Elmasri

A

Generalized

Temporal

Model

In

the

Uncertainty

in

Databases

and

Deductive

Systems

Workshop

Ithaca

NY

November

-LSB-

-RSB-

M.

Koubarakis

Representation

and

Querying

in

Temporal

Databases

The

Power

of

Temporal

Constraints

In

Proceedings

of

the

the

International

Conference

on

Data

Engineering

pp.

-LCB-

Vienna

Austria

April

-LSB-

-RSB-

Y.

Kornatzky

and

S.

Shimony

A

Probabilistic

Object-oriented

Data

Model

TR

FC

Ben-Gurion

University

May

-LSB-

-RSB-

Y.

Kornatzky

and

S.

Shimony

A

Probabilistic

Spatial

Data

Model

In

DEXA

Prague

Czech

Republic

September

-LSB-

-RSB-

S.

Kraus

and

V.

S.

Subrahmanian

Multiagent

Reasoning

with

Probability

Time

and

Beliefs

International

Journal

of

Intelligent

Systems

-LRB-

-RRB-

-LCB-

-LSB-

-RSB-

S.

K.

Lee

An

Extended

Relational

Database

Model

for

Uncertain

and

Imprecise

Information

In

Proceedings

of

the

International

Conference

on

Very

Large

Databases

Vancouver

Canada

August

-LSB-

-RSB-

Lipski

W.

Jr.

On

Semantic

Issues

Connected

with

Incomplete

Information

Databases

ACM

Transactions

on

Database

Systems

-LRB-

-RRB-

-LCB-

September

-LSB-

-RSB-

V.

S.

Lakshmanan

N.

Leone

R.

Ross

and

V.

S.

Subrahmanian

ProbView

A

Flexible

Probabilistic

Database

System

Submitted

for

journal

publication

-LSB-

-RSB-

T.

Y.

Leung

and

R.

Muntz

Temporal

Query

Processing

and

Optimization

in

Multiprocessor

Database

Machines

Technical

Report

Computer

Science

Department

UCLA

November

-LSB-

-RSB-

K.

C.

Liu

and

R.

Sunderraman

Indefinite

and

Maybe

Information

in

Relational

Databases

ACM

Transactions

on

Database

Systems

-LRB-

-RRB-

-LCB-

March

-LSB-

-RSB-

J.

Melton

SQL/Temporal

ISO/IEC

JTC

July

-LSB-

-RSB-

A.

Motro

Imprecision

and

Incompleteness

in

Relational

Databases

Survey

Information

and

Software

Technology

-LRB-

-RRB-

-LCB-

November

-LSB-

-RSB-

J.

Melton

and

A.

R.

Simon

Understanding

the

New

SQL

A

Complete

Guide

Morgan

Kaufmann

Publishers

Inc.

San

Mateo

CA

-LSB-

-RSB-

A.

Ola

Relational

Databases

with

Exclusive

Disjunctions

In

Proceedings

of

the

Eighth

International

Conference

on

Data

Engineering

pp.

-LCB-

Tempe

AZ

February

-LSB-

-RSB-

S.

Parson

Current

Approaches

to

Handling

Imperfect

Information

in

Data

and

Knowledge

Bases

IEEE

Transactions

on

Knowledge

and

Data

Engineering

-LRB-

-RRB-

-LSB-

-RSB-

B.

W.

Petley

Time

and

Frequency

in

Fundamental

Metrology

Proceedings

of

the

IEEE

-LRB-

-RRB-

-LCB-

July

-LSB-

-RSB-

H.

Prade

Annotated

Bibliography

on

Fuzzy

Information

Processing

In

H.

Prade

D.

Dubois

and

R.

Yager

editors

Readings

on

Fuzzy

Sets

in

Intelligent

Systems

Morgan

Kaufmann

-LSB-

-RSB-

R.

T.

Snodgrass

M.

H.

B?ohlen

C.

S.

Jensen

and

A.

Steiner

Adding

Valid

Time

to

SQL/Temporal

Change

Proposal

ANSI

ISO/IEC

DBL

November

-LSB-

-RSB-

U.

Schiel

Representation

and

Retrieval

of

Incomplete

and

Temporal

Information

TR

Universidade

Federal

Da

Paraiba

May

-LSB-

-RSB-

R.

Snodgrass

Monitoring

Distributed

Systems

A

Relational

Approach

PhD

thesis

Computer

Science

Department

Carnegie

Mellon

University

Pittsburgh

PA

December

-LSB-

-RSB-

R.

T.

Snodgrass

-LRB-

editor

-RRB-

I.

Ahn

G.

Ariav

D.

Batory

J.

Clifford

C.

E.

Dyreson

R.

Elmasri

F.

Grandi

C.

S.

Jensen

W.

K?afer

N.

Kline

K.

Kulkarni

T.

Y.

C.

Leung

N.

Lorentzos

J.

F.

Roddick

A.

Segev

M.

D.

Soo

and

S.

M.

Sripada

The

Temporal

Query

Language

Kluwer

Academic

Pub.

-LSB-

SSD

-RSB-

M.

D.

Soo

R.

Snodgrass

C.

Dyreson

C.

S.

Jensen

and

N.

Kline

Architectural

Extensions

to

Support

Multiple

Calendars

TempIS

Technical

Report

Computer

Science

Department

University

of

Arizona

Revised

May

ftp

FTP.cs.arizona.edu

tsql/multical

-LSB-

-RSB-

A.

Srivastava

and

A.

Eustace

ATOM

A

System

for

Building

Customized

Program

Analysis

Tools

In

Proceedings

of

the

ACM

SIGPLAN

Conference

on

Programming

Language

Design

and

Implementation

pp

-LCB-

June

-LSB-

TCG

-RSB-

A.

Tansel

J.

Clifford

S.

Gadia

S.

Jajodia

A.

Segev

and

R.

Snodgrass

-LRB-

eds

-RRB-

Temporal

Databases

Theory

Design

and

Implementation

Database

Systems

and

Applications

Series

Benjamin/Cummings

Redwood

City

CA

-LSB-

-RSB-

F.

S.

C.

Tseng

A.

L.

P.

Chen

and

W.-P

Wang

Answering

Heterogeneous

Database

Queries

with

Degrees

of

Uncertainty

Distributed

and

Parallel

Databases

An

International

Journal

-LRB-

-RRB-

-LCB-

July

-LSB-

-RSB-

Y.

Vassiliou

Values

in

Database

Management

-LCB-

a

Denotational

Semantics

Approach

In

Proceedings

of

the

ACM

SIGMOD

International

Conference

on

Management

of

Data

pp.

-LCB-

New

York

May

-LSB-

-RSB-

P.

van

Beek

Temporal

Query

Processing

with

Indefinite

Information

Artificial

Intelligence

in

Medicine

-LRB-

-RRB-

-LCB-

December

-LSB-

-RSB-

S.

R.

Vasanthakumar

J.

P.

Collan

and

W.

B.

Croft

Integrating

INQUIRY

with

an

RDBMS

to

Support

Text

Retrieval

IEEE

Data

Engineering

-LRB-

-RRB-

-LCB-

March

-LSB-

-RSB-

M.

Vitek

Fuzzy

Information

and

Fuzzy

Time

In

Proceedings

of

the

IFAC

Symposium

Fuzzy

Information

Knowledge

Representation

and

Decision

Analysis

pp.

-LCB-

Marseille

France

-LSB-

-RSB-

E.

Wong

A

Statistical

Approach

to

Incomplete

Information

in

Database

Systems

ACM

Transactions

on

Database

Systems

-LRB-

-RRB-

-LCB-

September

-LSB-

-RSB-

C.

Zaniolo

Database

Relations

with

Values

Journal

of

Computer

and

System

Sciences

-LCB-

-LSB-

-RSB-

E.

Zim?anyi

Incomplete

and

Uncertain

Information

in

Relational

Databases

PhD

thesis

Universit?e

Libre

de

Bruxelles

Brussells

Belgium

July

-LSB-

-RSB-

M.

Zemankova

and

A.

Kandel

Implementing

Imprecision

in

Information

Systems

Information

Sciences

-LCB-

A

Proofs

of

Theorems

Theorem

-LSB-

-LSB-

WHERE

hpredicatei

-RSB-

-RSB-

ind

-LRB-

r

-RRB-

is

reliable

Proof

For

any

where

clause

W

for

all

C

-LRB-

r

-RRB-

let

c

-LSB-

-LSB-

W

-RSB-

-RSB-

SQL

-LRB-

-RRB-

Then

-LRB-

c

-RRB-

-LSB-

-LSB-

hpredicatei

-RSB-

-RSB-

SQL

-LRB-

-RRB-

-RRB-

From

the

definition

of

-LSB-

-LSB-

W

-RSB-

-RSB-

ind

-LRB-

c

-RRB-

-LRB-

r

-LRB-

C

-LRB-

t

-RRB-

t

-LSB-

-LSB-

W

-RSB-

-RSB-

ind

-LRB-

r

-RRB-

-RRB-

-RRB-

-RRB-

From

the

definition

of

C

it

follows

that

c

C

-LRB-

-LSB-

-LSB-

W

-RSB-

-RSB-

ind

-LRB-

r

-RRB-

-RRB-

Theorem

-LSB-

-LSB-

WHERE

hpredicatei

-RSB-

-RSB-

ind

-LRB-

r

-RRB-

is

maximal

Proof

We

need

to

show

hwhere

clauseiW

C

-LRB-

-LSB-

-LSB-

W

-RSB-

-RSB-

ind

-LRB-

r

-RRB-

-RRB-

C

-LRB-

r

-RRB-

-LRB-

c

-LSB-

-LSB-

W

-RSB-

-RSB-

SQL

-LRB-

-RRB-

-RRB-

For

the

possible

interpretation

hwhere

clauseiW

C

-LRB-

-LSB-

-LSB-

W

-RSB-

-RSB-

ind

-LRB-

r

-RRB-

-RRB-

-LRB-

c

r

-LRB-

C

-LRB-

t

-RRB-

-LSB-

-LSB-

P

-RSB-

-RSB-

SQL

-LRB-

-RRB-

-RRB-

-RRB-

From

the

definition

of

C

on

relations

it

follows

that

C

-LRB-

r

-RRB-

-LRB-

c

-LSB-

-LSB-

W

-RSB-

-RSB-

SQL

-LRB-

-RRB-

-RRB-

Theorem

-LSB-

-LSB-

-RSB-

-RSB-

ind

and

-LSB-

-LSB-

-RSB-

-RSB-

op

agree

on

the

possible

and

definite

interpretations

Proof

For

the

definite

bound

-LRB-

-RRB-

we

need

to

show

hpredicatei

P

-LRB-

-LSB-

-LSB-

WHERE

P

-RSB-

-RSB-

ind

-LRB-

r

-RRB-

ft

j

t

r

T

-LSB-

-LSB-

P

-RSB-

-RSB-

op

-LRB-

r

-RRB-

g

-RRB-

From

the

definition

of

-LSB-

-LSB-

-RSB-

-RSB-

ind

this

is

equivalent

to

C

-LRB-

t

-RRB-

-LRB-

-LSB-

-LSB-

P

-RSB-

-RSB-

SQL

-LRB-

c

-RRB-

-RRB-

T

-LSB-

-LSB-

P

-RSB-

-RSB-

op

-LRB-

t

-RRB-

-RRB-

We

show

this

by

induction

on

the

boolean

connectives

in

P

after

replacing

P

with

its

equivalent

in

terms

of

Before

-LRB-

or

BeforeI

for

-LSB-

-LSB-

-RSB-

-RSB-

op

-RRB-

and

Basis

-LSB-

-LSB-

P

-RSB-

-RSB-

SQL

is

Before

-LRB-

a

b

-RRB-

where

a

and

b

are

-LRB-

instant

-RRB-

values

in

the

tuple

t.

From

the

definition

of

the

completion

of

a

tuple

we

must

show

-LRB-

C

-LRB-

a

-RRB-

C

-LRB-

b

-RRB-

-LRB-

ca

cb

-RRB-

-RRB-

-RRB-

T

BeforeI

-LRB-

a

b

-RRB-

The

left

hand

side

implies

that

Pr

-LSB-

a

b

-RSB-

so

BeforeI

-LRB-

a

b

-RRB-

fTg

Induction

Assume

that

C

-LRB-

t

-RRB-

-LRB-

-LSB-

-LSB-

P

-RSB-

-RSB-

SQL

-LRB-

c

-RRB-

-RRB-

T

-LSB-

-LSB-

P

-RSB-

-RSB-

op

-LRB-

t

-RRB-

-RRB-

holds

for

P

containing

i

boolean

connectives

We

need

to

show

that

this

holds

for

P

containing

i

connectives

-LRB-

-RRB-

P

is

Applying

the

definitions

of

-LSB-

-LSB-

-RSB-

-RSB-

SQL

and

-LSB-

-LSB-

-RSB-

-RSB-

op

the

following

holds

from

the

inductive

hypothesis

C

-LRB-

t

-RRB-

-LRB-

-LSB-

-LSB-

-RSB-

-RSB-

SQL

-LSB-

-LSB-

-RSB-

-RSB-

SQL

-LRB-

c

-RRB-

-RRB-

T

-LRB-

-LSB-

-LSB-

-RSB-

-RSB-

op

-LRB-

t

-RRB-

-LSB-

-LSB-

-RSB-

-RSB-

op

-LRB-

t

-RRB-

-RRB-

-RRB-

It

then

follows

that

the

inductive

hypothesis

also

holds

for

P

-LRB-

-RRB-

P

is

Again

applying

the

definitions

to

the

inductive

hypothesis

C

-LRB-

t

-RRB-

-LRB-

-LSB-

-RSB-

-RSB-

SQL

-RRB-

-RRB-

F

-LRB-

-LSB-

-LSB-

-RSB-

-RSB-

op

-LRB-

t

-RRB-

-RRB-

This

shows

that

the

the

two

semantics

agree

for

P

containing

i

predicate

connectives

For

the

possible

bound

-LRB-

-RRB-

we

need

to

show

hpredicatei

P

-LRB-

-LSB-

-LSB-

WHERE

P

-RSB-

-RSB-

ind

-LRB-

r

-RRB-

ft

j

t

r

T

-LSB-

-LSB-

P

-RSB-

-RSB-

op

-LRB-

r

-RRB-

g

This

is

equivalent

to

C

-LRB-

t

-RRB-

-LRB-

-LSB-

-LSB-

P

-RSB-

-RSB-

SQL

-LRB-

c

-RRB-

-RRB-

-RRB-

T

-LSB-

-LSB-

P

-RSB-

-RSB-

op

-LRB-

t

-RRB-

-RRB-

Comparing

this

to

the

analogous

formula

in

the

definite

portion

of

this

proof

note

that

has

been

replaced

with

and

has

been

replaced

with

Again

we

show

this

by

induction

on

the

number

of

boolean

connectives

in

P

Basis

-LSB-

-LSB-

P

-RSB-

-RSB-

SQL

is

Before

-LRB-

a

b

-RRB-

where

a

and

b

are

-LRB-

instant

-RRB-

values

in

the

tuple

t.

From

the

definition

of

the

completion

of

a

tuple

we

must

show

-LRB-

C

-LRB-

a

-RRB-

C

-LRB-

b

-RRB-

-LRB-

ca

cb

-RRB-

-RRB-

-RRB-

T

BeforeI

-LRB-

a

b

-RRB-

Applying

the

definition

of

BeforeI

the

right

hand

side

is

equivalent

to

Pr

-LSB-

a

b

-RSB-

-LRB-

here

we

use

-LSB-

-RRB-

From

the

left

hand

side

we

know

that

Pr

-LSB-

a

ca

-RSB-

and

Pr

-LSB-

b

cb

-RSB-

so

Pr

-LSB-

a

b

-RSB-

Hence

-LRB-

C

-LRB-

a

-RRB-

C

-LRB-

b

-RRB-

-LRB-

ca

cb

-RRB-

-RRB-

-RRB-

Pr

-LSB-

a

ca

-RSB-

Pr

-LSB-

b

cb

-RSB-

ca

cb

-RRB-

Pr

-LSB-

a

b

-RSB-

-RRB-

T

BeforeI

-LRB-

a

b

-RRB-

-RRB-

T

-LSB-

-LSB-

P

-RSB-

-RSB-

op

-LRB-

t

-RRB-

Induction

We

utilize

a

similar

induction

hypothesis

as

before

and

the

inductive

steps

follow

naturally

Theorem

-LSB-

-LSB-

S

-RSB-

-RSB-

ind

-LRB-

ffi

r

-RRB-

is

monotonic

in

Proof

As

the

semantics

of

each

clause

depends

only

on

one

parameter

the

proof

proceeds

in

two

parts

-LRB-

-RRB-

show

that

-LSB-

-LSB-

hwhere

clausei

-RSB-

-RSB-

ind

is

monotonic

in

and

-LRB-

-RRB-

show

that

-LSB-

-LSB-

htarget

listi

-RSB-

-RSB-

ind

is

monotonic

in

To

show

-LRB-

-RRB-

we

need

to

demonstrate

that

hpredicateiP

-LRB-

-RRB-

C

-LRB-

-LSB-

-LSB-

P

-RSB-

-RSB-

op

-LRB-

t

-RRB-

-RRB-

C

-LRB-

-LSB-

-LSB-

P

-RSB-

-RSB-

op

-LRB-

t

-RRB-

-RRB-

-RRB-

We

prove

this

by

induction

on

the

boolean

connectives

in

p

after

replacing

p

with

its

equivalent

as

discussed

in

Section

Basis

-LSB-

-LSB-

P

-RSB-

-RSB-

op

is

BeforeI

-LRB-

a

b

-RRB-

This

follows

from

the

definition

of

BeforeI

and

the

monotonicity

of

Pr

Induction

Assume

that

the

above

holds

for

P

containing

i

boolean

connectives

-LRB-

a

-RRB-

P

is

AND

which

is

replaced

with

which

is

monotonic

when

and

are

monotonic

-LRB-

b

-RRB-

P

is

NOT

which

is

replaced

with

fx

j

-LRB-

x

-RRB-

-LSB-

-LSB-

P

-RSB-

-RSB-

op

-LRB-

r

-RRB-

g.

Again

this

is

monotonic

if

is

monotonic

To

show

-LRB-

-RRB-

we

observe

that

-LSB-

-LSB-

htarget

listi

-RSB-

-RSB-

ind

utilizes

constructors

based

on

BeforeI

By

Theorem

-LSB-

-LSB-

-RSB-

-RSB-

ind

is

an

equivalent

semantics

and

hence

from

-LRB-

-RRB-

just

shown

-LRB-

-RRB-

follows

Theorem

The

kth

pivot

will

count

-LRB-

k

-RRB-

c

pairs

Proof

By

choosing

the

rod

corresponding

to

half

of

the

remaining

rods

the

algorithm

counts

half

the

pairs

on

the

first

pivot

that

is

it

counts

pairs

On

the

second

and

third

pivots

it

counts

half

of

half

of

the

remaining

pairs

or

pairs

per

pivot

assuming

breadth-first

recursion

On

the

fourth

through

seventh

pivots

it

counts

half

of

half

of

half

of

the

remaining

pairs

or

pairs

So

in

general

the

kth

pivot

will

count

-LRB-

k

-RRB-

c

pairs

In

general

the

kth

pivot

will

count

-LRB-

k

-RRB-

c

pairs

In

the

worst

case

pivots

are

required

Theorem

The

undercount

is

less

than

Proof

First

consider

the

error

once

a

pivot

has

been

chosen

The

error

is

the

rods

in

the

other

row

of

rods

that

remain

uncounted

The

uncounted

rods

are

those

that

overlap

the

pivot

These

rods

are

uncounted

because

it

is

unknown

how

the

probability

mass

is

distributed

within

each

rod

consequently

it

is

impossible

to

determine

whether

the

mass

is

before

or

after

the

mass

in

the

pivot

pivot

Figure

The

rods

within

the

dotted

lines

are

the

undercount

for

the

pivot

Figure

shows

the

rods

that

are

uncounted

for

an

example

pivot

the

rods

that

are

either

partially

or

wholly

within

the

dotted

lines

are

not

counted

But

how

many

pairs

of

rods

possibly

overlap

We

claim

that

there

can

be

at

most

pairs

that

overlap

We

demonstrate

this

claim

by

modeling

the

overlapping

rods

with

an

undirected

graph

Let

each

rod

be

a

node

in

a

graph

Add

an

edge

between

each

pair

of

rods

that

overlaps

Observe

that

the

edges

can

not

cross

each

other

that

is

the

graph

is

planar

Now

count

the

total

number

of

edges

in

the

graph

Choose

the

first

or

leftmost

edge

in

the

graph

Since

edges

can

not

cross

at

least

one

node

on

this

edge

is

a

sink

unconnected

to

any

other

nodes

by

a

different

edge

Eliminate

both

the

node

and

the

edge

Repeat

this

process

always

choosing

the

leftmost

remaining

edge

until

there

are

no

more

edges

Initially

there

are

nodes

One

node

is

eliminated

at

every

step

along

with

one

edge

At

least

one

node

remains

after

the

final

edge

is

removed

Consequently

initially

there

were

at

most

edges

Each

edge

represents

a

pair

of

rods

that

overlap

corresponding

to

a

mass

of

that

remains

uncounted

Since

there

are

at

most

edges

the

total

missing

mass

is

less

than

For

a

precision

of

the

total

error

is

less

than

incomplete information
indeterminacy
probabilistic information
sql
temporal database
tsql2