An

Empirical

Study

of

the

Performance

of

Temporal

Relational

Databases

Iqbal

A.

Goralwallaa

Abdullah

U.

Tanselb

and

M.

Tamer

Ozsua

aLaboratory

for

Database

Systems

Research

bBaruch

College?CUNY

Department

of

Computing

Science

University

of

Alberta

Lexington

Avenue

Box

Edmonton

Alberta

Canada

New

York

NY

USA

fiqbal,ozsug@cs.ualberta.ca

uztbb@cunyvm.bitnet

Fax

-LRB-403-RRB- 492 1071

Abstract

In

this

paper

we

describe

an

implementation

of

a

temporal

relational

database

management

system

based

on

attribute

timestamping

For

this

purpose

we

modify

an

existing

software

-LSB-

-RSB-

which

supports

set-valued

attributes

The

algebraic

language

of

the

system

includes

relational

algebra

operators

restructuring

operators

and

temporal

operators

We

use

this

system

to

carry

out

a

performance

evaluation

of

different

types

of

temporal

databases

databases

using

attribute

timestamping

databases

using

tuple

timestamping

where

relations

are

in

temporal

normal

form

and

databases

using

tuple

timestamping

where

a

single

relation

is

used

We

run

sample

queries

against

these

types

of

temporal

databases

and

measure

processing

time

of

these

queries

This

study

verifies

that

the

major

performance

trade

off

is

between

the

restructuring

-LRB-

unpack

-RRB-

operation

needed

in

databases

using

attribute

timestamping

and

the

join

operation

needed

in

databases

using

tuple

timestamping

Furthermore

keeping

all

temporal

tuples

in

one

single

relation

does

not

prove

to

be

an

effective

alternative

Introduction

The

ability

to

model

the

temporal

dimension

of

the

real

world

is

essential

for

many

applications

Examples

of

these

are

econometrics

banking

inventory

control

medical

records

airline

reservations

versions

in

CAD/CAM

applications

statistical

and

scientific

data

etc.

Yet

of

the

three

major

data

models

namely

relational

network

and

hierarchical

supports

the

time

varying

aspect

of

real

world

phenomena

Conventional

databases

can

be

viewed

as

snapshot

databases

in

that

they

represent

the

state

of

an

enterprise

at

one

particular

time

i.e

they

contain

only

current

data

A

database

which

maintains

past

present

and

future

data

-LRB-

i.e

object

histories

-RRB-

is

called

a

temporal

database

-LRB-

TDB

-RRB-

In

the

last

decade

there

has

been

extensive

research

activity

on

temporal

databases

A

summary

of

this

research

can

be

found

in

-LSB-

-RSB-

and

a

bibliography

on

temporal

databases

is

provided

in

-LSB-

-RSB-

Snodgrass

reports

on

the

results

of

a

workshop

on

the

infrastructure

for

temporal

databases

in

-LSB-

-RSB-

Mckenzie

and

Snodgrass

survey

extensions

of

relational

algebra

that

can

query

databases

recording

time-varying

data

-LSB-

-RSB-

They

identify

criteria

for

evaluating

temporal

algebras

and

evaluate

several

time-oriented

algebras

against

these

criteria

A

recent

book

on

this

topic

-LSB-

-RSB-

provides

a

comprehensive

treatment

of

the

current

state-of-the-art

in

temporal

databases

Most

of

the

research

has

concentrated

on

extending

the

relational

model

-LSB-

-RSB-

to

handle

time

in

an

appropriate

manner

These

extensions

can

be

grouped

into

two

main

categories

The

first

approach

uses

First

Normal

Form

-LRB-

-RRB-

relations

in

which

special

time

attributes

are

added

-LRB-

tuple

timestamping

-RRB-

and

the

history

of

an

object

-LRB-

attribute

-RRB-

is

modelled

by

several

tuples

-LSB-

-RSB-

The

second

approach

uses

Non-First

Normal

Form

-LRB-

-RRB-

relations

and

attaches

time

to

attribute

values

-LRB-

attribute

timestamping

-RRB-

in

which

the

history

of

an

object

is

modelled

by

a

single

tuple

-LSB-

-RSB-

Modelling

temporal

data

and

temporal

query

languages

are

the

topics

most

investigated

However

there

has

been

very

little

work

on

the

efficient

implementation

of

temporal

databases

let

alone

the

performance

analysis

of

such

systems

Ahn

and

Snodgrass

carry

out

a

performance

evaluation

-LSB-

-RSB-

of

their

prototype

system

TQUEL

-LSB-

-RSB-

in

which

the

underlying

model

is

based

on

attaching

time

stamps

to

tuples

hence

relations

In

this

paper

we

describe

the

implementation

-LSB-

-RSB-

of

a

prototype

temporal

relational

database

management

system

-LRB-

TDBMS

-RRB-

which

uses

attribute

timestamping

-LRB-

AT

-RRB-

We

use

this

system

to

simulate

a

database

which

uses

tuple

timestamping

-LRB-

TT

-RRB-

where

time

varying

attributes

are

distributed

over

multiple

relations

each

in

temporal

normal

form

-LSB-

-RSB-

and

a

database

which

uses

tuple

timestamping

-LRB-

TTL

-RRB-

where

a

single

relation

is

used

to

hold

all

its

pertaining

time

varying

attributes

We

then

investigate

the

performance

of

AT

TT

and

TTL

databases

on

different

types

of

queries

Our

prototype

is

the

first

implementation

of

a

temporal

database

management

system

based

on

attribute

timestamping

It

demonstrates

the

feasibility

of

such

databases

Even

though

it

needs

more

work

for

incorporating

indexing

for

query

optimization

in

its

present

form

it

provides

a

useful

environment

for

experimentation

with

temporal

databases

Moreover

this

is

the

first

performance

study

which

compares

the

attribute

timestamping

and

tuple

timestamping

approaches

The

results

reported

here

provide

useful

insight

into

the

design

of

temporal

databases

In

Section

the

temporal

relational

model

together

with

its

algebra

is

reviewed

Section

briefly

describes

the

implementation

of

the

temporal

database

management

system

A

detailed

performance

evaluation

study

of

implemented

system

is

given

in

Section

The

paper

concludes

with

Section

Overview

of

the

Temporal

Model

and

Algebra

Temporal

Relational

Model

In

our

temporal

model

each

time-varying

attribute

value

is

a

time

value

pair

The

time

part

of

this

pair

is

taken

to

be

the

interval

in

which

the

value

is

valid

as

opposed

to

the

time

point

at

which

the

value

became

valid

The

latter

approach

creates

complications

in

expressing

and

interpreting

the

relational

algebra

operations

since

it

splits

the

time

interval

between

two

successive

pairs

causing

the

successor

pair

to

be

examined

if

the

time

duration

over

which

the

value

is

valid

is

needed

Hence

we

opted

for

the

former

approach

and

represent

the

time

component

of

time-varying

attributes

as

intervals

Let

V

be

the

set

of

all

possible

integers

reals

and

strings

and

T

be

a

set

of

time

points

which

is

totally

ordered

under

the

less

than-equal-to

-LRB-<=-RRB-

relation

The

points

are

identified

relative

to

an

origin

as

shown

below

T

ti

nowg

ti

now

ti

ti

and

ti

i

is

the

starting

time

and

now

is

the

marking

symbol

for

the

current

time

Time-varying

attribute

values

are

represented

as

triplets

of

the

form

-LSB-

l

u

-RRB-

v

-LSB-

l

u

-RRB-

is

the

time

component

-LRB-

interval

-RRB-

with

l

and

u

standing

for

the

lower

and

upper

bounds

of

the

interval

respectively

v

-LRB-

v

V

-RRB-

is

the

data

value

which

is

valid

over

the

time

interval

-LSB-

l

u

-RRB-

Sets

of

triplets

represent

the

history

of

an

attribute

A

relation

containing

such

attributes

is

called

a

valid

time

relation

-LSB-

-RSB-

In

our

model

a

valid

time

relation

may

have

four

types

of

attributes

ffl

Atomic

attributes

contain

atomic

values

from

domains

which

are

subsets

of

V

E

Ename

Department

Salary

Tom

f

-LSB-

Jan

Jan

-RRB-

Shoe

-LSB-

Jan

now

-RSB-

Toys

g

f

-LSB-

Jan

June

-RRB-

-LSB-

June

now

-RSB-

g

Ann

f

-LSB-

Jan

now

-RSB-

Sales

g

f

-LSB-

Jan

now

-RRB-

g

John

f

-LSB-

Jan

now

-RSB-

Toys

g

f

-LSB-

Jan

June

-RRB-

-LSB-

June

now

-RSB-

g

Figure

Employee

relation

ffl

Triplet-valued

attributes

contain

triplets

as

atomic

values

A

triplet

is

of

the

form

-LSB-

l

u

-RRB-

v

where

l

u

T

and

v

V

ffl

Set-valued

attributes

are

sets

of

atomic

values

These

values

are

considered

independent

of

time

ffl

Set-triplet

valued

attributes

contain

sets

of

triplets

as

values

Each

set

is

a

collection

of

one

or

more

triplets

defined

over

a

subset

of

the

interval

-LSB-

now

-RSB-

and

represents

the

attribute

's

history

In

order

to

differentiate

different

types

of

attributes

we

use

the

following

notation

Atomic

attributes

are

referred

to

by

their

names

Set-valued

attributes

are

prefixed

by

a

e.g.

A

B

triplet-valued

attributes

are

prefixed

by

a

dollar

sign

e.g.

A

B

and

set-triplet

valued

attributes

are

prefixed

by

a

star

and

dollar

e.g.

A

B

etc.

To

refer

to

the

components

of

a

triplet-valued

attribute

A

we

use

Al

Au

and

Av

They

refer

to

the

lower

bound

upper

bound

and

value

components

of

the

triplet

respectively

A

valid

time

relation

is

a

nested

relation

with

one

level

of

nesting

i.e.

attribute

values

can

be

sets

Figure

gives

an

example

historical

relation

Tuples

of

Employee

relation

are

homogeneous

-LSB-

-RSB-

TDBMS

however

allows

non-homogeneous

tuples

as

well

Temporal

Relational

Algebra

The

set

of

Temporal

Relational

Algebra

-LRB-

TRA

-RRB-

operations

includes

the

five

basic

operations

of

the

relational

algebra

with

slight

modifications

for

handling

temporal

data

the

two

re-structuring

operations

Pack

and

Unpack

-LSB-

-RSB-

which

directly

apply

to

temporal

relations

and

the

new

operations

-LSB-

-RSB-

for

manipulating

temporal

data

The

formal

definitions

of

the

TRA

operations

can

be

found

in

-LSB-

-RSB-

We

now

describe

the

TRA

operations

we

have

implemented

and

illustrate

the

workings

of

each

operation

using

the

Employee

relation

given

in

Figure

Set

operations

-LRB-

union

intersection

difference

-RRB-

Cartesian

product/Project/Natural

Join

These

operations

are

the

same

as

the

relational

algebra

operations

Selection

-LRB-

select

A

from

R

where

F

-RRB-

The

selection

operator

selects

the

tuples

of

attribute

-LRB-

s

-RRB-

A

from

the

valid

time

relation

R

which

satisfy

the

formula

F

F

is

a

formula

which

could

contain

any

type

of

attribute

comparison

operators

-LRB-

i.e.

<=-RRB-

and

connectives

-LRB-

and

or

not

-RRB-

These

comparison

operators

have

been

used

instead

of

temporal

operators

like

overlap

during

etc.

to

keep

the

implementation

simple

Note

that

temporal

operators

add

to

the

user-friendliness

of

the

query

However

omitting

them

does

not

diminish

the

expressive

power

of

TRA

In

the

Selection

operation

when

a

triplet-valued

attribute

say

X

is

used

its

components

can

be

referenced

Note

that

our

selection

operation

includes

the

selection

and

projection

operations

of

relational

algebra

Unpack

-LRB-

unpack

R

on

A

-RRB-

The

unpack

operation

creates

a

family

of

tuples

for

each

tuple

of

R

when

it

is

applied

on

one

of

R

's

set-valued

or

set-triplet

valued

attributes

A

One

tuple

is

created

for

each

element

of

the

set

in

the

attribute

value

As

an

example

the

result

of

unpack

Employee

on

Department

is

shown

in

Figure

E

Ename

Department

Salary

Tom

-LSB-

Jan

Jan

-RRB-

Shoe

f

-LSB-

Jan

June

-RRB-

-LSB-

June

now

-RSB-

g

Tom

-LSB-

Jan

now

-RSB-

Toys

f

-LSB-

Jan

June

-RRB-

-LSB-

June

now

-RSB-

g

Ann

-LSB-

Jan

now

-RSB-

Sales

f

-LSB-

Jan

now

-RRB-

g

John

-LSB-

Jan

now

-RSB-

Toys

f

-LSB-

Jan

June

-RRB-

-LSB-

June

now

-RSB-

g

Figure

Employeeunpack

relation

Pack

-LRB-

pack

R

on

A

-RRB-

The

pack

operation

when

applied

to

an

atomic

or

triplet-valued

attribute

A

of

a

valid

time

relation

R

collects

the

values

in

attribute

A

into

a

single

tuple

component

for

tuples

whose

remaining

attributes

agree

For

example

applying

pack

on

the

Department

attribute

of

Employeeunpack

yields

back

the

Employee

relation

Triplet-decomposition

-LRB-

tdec

R

on

A

-RRB-

This

operation

breaks

the

triplet

valued

attribute

A

of

the

valid

time

relation

R

into

its

components

It

adds

two

new

attributes

for

representing

the

E

Ename

Department

From

To

Salary

Tom

Shoe

Jan

Jan

f

-LSB-

Jan

June

-RRB-

-LSB-

June

now

-RSB-

g

Tom

Toys

Jan

now

f

-LSB-

Jan

June

-RRB-

-LSB-

June

now

-RSB-

g

Ann

Sales

Jan

now

f

-LSB-

Jan

now

-RRB-

g

John

Toys

Jan

now

f

-LSB-

Jan

June

-RRB-

-LSB-

June

now

-RSB-

g

Figure

Employeetdec

relation

upper

and

lower

bounds

of

the

time

interval

to

R

The

value

field

replaces

A.

For

example

tdec

Employeeunpack

on

Department

gives

the

relation

shown

in

Figure

Triplet-formation

-LRB-

tform

R

on

V

L

U

-RRB-

tform

creates

a

triplet-valued

attribute

from

the

three

attributes

V

L

and

U

of

the

valid

time

relation

R

which

correspond

to

the

value

component

lower

bound

and

upper

bound

of

the

triplet

respectively

Triplet-formation

is

the

inverse

operation

of

triplet-decomposition

For

example

tform

Employeetdec

on

Department

From

To

gives

back

the

Employeeunpack

relation

Slice

-LRB-

slice

R

A

by

B

-RRB-

Let

A

and

B

be

two

triplet-valued

attributes

The

slice

operator

trims

the

time

of

A

with

respect

to

the

time

of

B

In

other

words

the

intersection

of

intervals

of

A

and

B

is

assigned

to

A

as

its

time

reference

There

are

two

other

versions

of

this

operation

Uslice

operation

forms

the

union

of

the

time

intervals

of

A

and

B

and

assigns

it

as

the

time

component

of

A.

Dslice

operation

is

similar

to

slice

except

the

difference

of

the

time

intervals

of

A

and

B

is

assigned

to

the

time

component

of

A

In

both

Uslice

and

Dslice

operations

attribute

A

becomes

a

set-triplet

valued

attribute

since

union

-LRB-

difference

-RRB-

of

two

intervals

is

not

one

single

interval

For

example

after

unpacking

the

Employee

relation

on

the

Department

and

Salary

attributes

slice

Employee

Department

by

Salary

gives

the

relation

shown

in

Figure

Similarly

Figures

and

give

the

relations

obtained

by

applying

a

Uslice

and

Dslice

operation

on

the

Department

and

Salary

attributes

of

the

Employee

relation

respectively

Drop-time

-LRB-

droptime

R

on

A

-RRB-

This

operation

gets

rid

of

the

time

components

of

the

tripletvalued

or

set-triplet

valued

attribute

A

and

converts

it

into

an

atomic

or

a

set-valued

attribute

E

Ename

Department

Salary

Tom

-LSB-

Jan

Jan

-RRB-

Shoe

-LSB-

Jan

June

-RRB-

Tom

-LSB-

Jan

June

-RRB-

Toys

-LSB-

Jan

June

-RRB-

Tom

-LSB-

June

now

-RSB-

Toys

-LSB-

June

now

-RSB-

Ann

-LSB-

Jan

now

-RSB-

Sales

-LSB-

Jan

now

-RSB-

John

-LSB-

Jan

June

-RRB-

Toys

-LSB-

Jan

June

-RRB-

John

-LSB-

June

now

-RSB-

Toys

-LSB-

June

now

-RSB-

Figure

Employeeslice

relation

E

Ename

Department

Salary

Tom

f

-LSB-

Jan

June

-RRB-

Shoe

g

-LSB-

Jan

June

-RRB-

Tom

f

-LSB-

Jan

Jan

-RRB-

Shoe

-LSB-

June

now

-RSB-

Shoe

g

-LSB-

June

now

-RSB-

Tom

f

-LSB-

Jan

now

-RSB-

Toys

g

-LSB-

Jan

June

-RRB-

Tom

f

-LSB-

Jan

now

-RSB-

Toys

g

-LSB-

June

now

-RSB-

Ann

f

-LSB-

Jan

now

-RSB-

Sales

g

-LSB-

Jan

now

-RSB-

John

f

-LSB-

Jan

now

-RSB-

Toys

g

-LSB-

Jan

June

-RRB-

John

f

-LSB-

Jan

now

-RSB-

Toys

g

-LSB-

June

now

-RSB-

Figure

EmployeeUslice

relation

respectively

For

example

Figure

shows

the

Employee

relation

with

the

time

of

the

Department

attribute

dropped

Enumeration

-LRB-

-RRB-

The

enumeration

operation

derives

a

table

of

uniform

data

for

a

set

of

specified

time

points

or

intervals

from

a

three

dimensional

historical

relation

To

handle

the

semantic

issues

which

arise

when

applying

aggregates

to

historical

data

two

versions

of

the

enumeration

operation

have

been

developed

Let

be

a

set

of

atomic

attributes

and

let

be

a

set

of

set-triplet

valued

attributes

-LRB-

R

<fX1g fX2g >

fTg

-RRB-

returns

the

values

of

the

designated

attributes

at

the

specified

time

points

For

each

of

the

specified

time

points

in

T

each

tuple

of

the

valid

time

relation

R

is

retrieved

The

triplets

of

the

set-triplet

valued

attribute

-LRB-

s

-RRB-

are

examined

in

turn

for

intersection

with

the

specified

time

point

If

an

intersection

is

found

the

data

values

of

the

attribute

-LRB-

s

-RRB-

and

are

retrieved

For

example

Employee

fE

#gfDepartment

E

Ename

Department

Salary

Tom

f

-LSB-

Jan

Jan

-RRB-

Shoe

g

-LSB-

June

now

-RSB-

Tom

f

-LSB-

June

now

-RSB-

Toys

g

-LSB-

Jan

June

-RRB-

Tom

f

-LSB-

Jan

June

-RRB-

Toys

g

-LSB-

June

now

-RSB-

John

f

-LSB-

June

now

-RSB-

Toys

g

-LSB-

Jan

June

-RRB-

John

f

-LSB-

Jan

June

-RRB-

Toys

g

-LSB-

June

now

-RSB-

Figure

EmployeeDslice

relation

E

Ename

Department

Salary

Tom

fShoe

Toysg

f

-LSB-

Jan

June

-RRB-

-LSB-

June

now

-RSB-

g

Ann

fSalesg

f

-LSB-

Jan

now

-RSB-

g

John

fToysg

f

-LSB-

Jan

June

-RRB-

-LSB-

June

now

-RSB-

g

Figure

Employeedtime

relation

Salaryg

f

g

gives

the

relation

shown

in

Figure

On

the

other

hand

-LRB-

R

faggrf

-LRB-

-RRB-

g

fTg

-RRB-

returns

an

appropriate

aggregated

value

for

an

attribute

by

utilizing

all

of

its

values

which

are

valid

over

a

specified

time

interval

in

T

For

each

of

the

specified

time

intervals

n

T

the

triplets

of

the

set-triplet

valued

attribute

are

examined

in

turn

for

intersection

The

aggregation

function

aggrf

is

then

applied

to

all

qualifying

data

values

of

attribute

The

aggregated

value

and

attribute

-LRB-

s

-RRB-

are

then

retrieved

For

example

Employee

fE

g

first

-LRB-

Department

-RRB-

sum

-LRB-

Salary

-RRB-

f

g

gives

the

relation

shown

in

Figure

When

applied

to

tuple

timestamped

relations

projection

selection

set-operations

Cartesian

Product

and

natural

join

operations

of

TRA

function

like

traditional

algebra

operations

Example

Queries

In

this

section

we

give

example

queries

and

their

temporal

algebra

expressions

TAE

The

queries

use

the

Employee

relation

of

Figure

which

is

created

in

TDBMS

We

also

provide

the

results

produced

by

the

E

Department

Salary

T

Toys

Toys

Sales

Toys

Figure

relation

E

Department

Salary

T

Shoe

-LSB-

-RRB-

Toys

-LSB-

-RRB-

Sales

-LSB-

-RRB-

Toys

-LSB-

-RRB-

Figure

relation

system

in

Figure

Query

What

are

the

E

s

of

employees

currently

making

more

than

TAE

select

E

from

-LRB-

Employee

fE

g

fSalaryg

fnowg

-RRB-

where

Salary

The

operation

selects

the

salary

values

at

the

current

time

now

The

select

operation

then

selects

the

E

s

of

employees

whose

salary

is

more

than

Note

that

an

unpack

operation

on

the

salary

attribute

followed

by

a

selection

is

an

alternative

way

to

obtain

the

same

result

However

for

large

relations

the

operation

is

more

efficient

Query

What

are

the

E

s

and

department

history

of

employees

who

make

more

than

in

their

salary

history

TAE

select

E

Department

from

-LRB-

unpack

Employee

on

Salary

-RRB-

where

SalaryV

In

this

query

the

entire

history

of

salary

values

is

searched

for

a

match

As

opposed

to

Query

we

have

to

use

the

unpack

operation

here

After

the

unpack

the

value

field

of

each

salary

triplet

-LRB-

salaryV

-RRB-

is

checked

for

a

match

Query

What

are

the

E

s

and

current

department

of

employees

who

make

between

and

in

their

salary

history

TAE

-LRB-

select

E

Department

from

-LRB-

unpack

Employee

on

Salary

-RRB-

where

SalaryV

and

SalaryV

-RRB-

fE

g

fDepartmentg

fnowg

This

query

is

similar

to

Query

It

tests

a

condition

in

the

history

of

salary

values

and

retrieves

the

current

department

values

of

the

qualifying

tuples

Query

What

were

the

E

s

and

salaries

of

employees

when

they

worked

for

the

Toys

department

TAE

select

E

Salary

from

-LRB-

slice

-LRB-

unpack

-LRB-

unpack

Employee

on

Department

-RRB-

on

Salary

-RRB-

Salary

by

Department

-RRB-

where

DepartmentV

Toys

After

the

department

and

salary

attributes

are

unpacked

the

time

component

of

the

salary

attribute

is

aligned

with

respect

to

that

of

the

department

attribute

The

E

s

and

salary

values

of

the

employees

who

worked

in

the

Toys

department

are

then

selected

Query

What

is

the

average

salary

each

employee

earned

TAE

-LRB-

unpack

Employee

on

Salary

-RRB-

E

avg

-LRB-

Salary

-RRB-

Implementation

of

TDBMS

TDBMS

has

been

implemented

on

top

of

ERAM

-LSB-

-RSB-

a

database

management

system

which

is

based

on

the

extended

relational

model

and

extended

relational

algebra

-LSB-

-RSB-

The

extended

relational

model

allows

relations

with

set-valued

attributes

where

there

is

only

one

level

of

nesting

It

has

specifically

been

formulated

for

statistical

databases

and

hence

includes

powerful

aggregation

features

The

extended

relational

algebra

includes

the

five

basic

operations

of

relational

algebra

with

extensions

for

handling

E

E

Department

f

-LSB-

Jan

now

-RSB-

Toys

g

E

Department

Toys

Sales

-LRB-

-RRB-

-LRB-

-RRB-

-LRB-

-RRB-

E

Salary

-LSB-

June

now

-RSB-

-LSB-

Jan

June

-RRB-

-LSB-

June

now

-RSB-

E

Salary

-LRB-

-RRB-

-LRB-

-RRB-

Figure

Results

of

the

Example

Queries

set-valued

relations

and

the

pack

and

unpack

restructuring

operations

ERAM

has

been

implemented

in

the

C-programming

language

on

top

of

the

UNIX

internal

file

structure

and

Unix

standard

I/O

library

It

is

an

operational

system

and

has

successfully

been

used

and

tested

in

several

universities

over

the

past

years

ERAM

provides

a

natural

environment

for

the

implementation

of

TDBMS

since

it

supports

-LRB-

one

level

-RRB-

nested

relations

It

directly

supports

atomic

and

set-valued

attributes

of

valid

time

relations

Additionally

the

pack

and

unpack

operations

in

ERAM

help

in

making

and

breaking

set-triplet

valued

attributes

of

a

valid

time

relation

Moreover

with

a

coding

method

tripletvalued

and

set-triplet

valued

attributes

of

a

valid

time

relation

can

be

translated

to

the

corresponding

attributes

of

ERAM

Two

alternatives

are

considered

The

first

alternative

is

to

convert

triplet-valued

attributes

into

three

separate

atomic

attributes

such

that

-LSB-

l

u

-RRB-

v

becomes

l

u

and

v.

For

the

set-triplet

valued

attributes

we

create

three

set-valued

attributes

As

an

example

consider

the

following

set

of

triplets

f

a

b

c

g

L

U

V

fa

b

cg

The

lower

bound

values

-LRB-

l

-RRB-

of

each

triplet

in

the

set-triplet

valued

attribute

are

combined

into

a

single

set-valued

attribute

i.e.

L

The

same

is

the

case

for

the

upper

bounds

i.e.

U

and

the

value

i.e.

V

fields

of

triplets

Naturally

each

of

the

set-valued

attributes

has

components

which

have

the

same

type

which

is

also

required

by

ERAM

However

the

problem

in

this

alternative

is

to

maintain

the

order

of

the

components

in

each

set-valued

attribute

Otherwise

it

would

be

impossible

to

reconstruct

the

original

triplets

from

these

three

separate

attributes

Furthermore

duplicates

are

not

allowed

in

set-valued

attributes

Duplicate

values

may

appear

when

a

set-triplet

valued

attribute

is

broken

into

its

components

This

necessitates

conversion

of

duplicates

into

unique

values

so

that

they

can

be

safely

manipulated

by

ERAM

However

this

would

lead

to

considerable

computational

complexity

in

manipulating

and

updating

the

prefixes

in

each

relational

operation

In

the

second

alternative

a

triplet

is

coded

into

a

single

value

That

is

-LSB-

l

u

-RRB-

v

becomes

luv

a

single

string

hence

a

triplet-valued

attribute

becomes

an

atomic

attribute

in

ERAM

Similarly

a

set-triplet

valued

attribute

is

converted

to

a

set-valued

attribute

Thus

the

triplets

of

the

preceeding

example

become

and

hence

the

second

method

converting

triplets

into

strings

is

prefered

and

is

used

in

the

implementation

We

use

the

following

data

structure

in

representing

a

triplet

lower

bound

-LRB-

l

-RRB-

upper

bound

-LRB-

u

-RRB-

value

-LRB-

v

-RRB-

where

the

lower

and

upper

bounds

are

represented

as

time

points

A

time

point

is

represented

as

ddmmyy

where

dd

-LRB-

bits

-RRB-

refers

to

the

day

mm

-LRB-

bits

-RRB-

refers

to

the

month

and

yy

-LRB-

bits

-RRB-

stands

for

the

year

Thus

the

system

can

accommodate

years

where

t

time

granularity

is

a

day

Hence

the

lower

and

upper

bounds

are

compressed

into

a

total

of

four

bytes

The

value

of

a

triplet

is

concatenated

to

these

four

bytes

to

form

the

final

string

When

needed

they

are

uncompressed

to

their

original

form

in

presenting

the

results

and

in

implementing

TRA

operations

To

keep

the

implementation

task

simpler

we

do

not

consider

time

points

beyond

the

current

time

now

We

have

modified

ERAM

to

accommodate

TRA

operations

We

also

have

added

code

for

the

new

operations

of

TRA

Triplets

are

written

into

relations

in

compressed

form

Most

of

operations

require

decompression

of

these

values

into

their

components

i.e.

the

selection

operation

or

the

unpack

operation

which

requires

a

sorting

operation

to

eliminate

the

duplicate

tuples

in

the

result

We

briefly

comment

on

the

implementation

methodology

used

for

the

unpack

join

and

enumeration

operations

since

they

are

frequently

used

in

the

sample

queries

For

the

unpack

operation

a

sequential

scan

is

made

of

the

operand

relation

and

each

tuple

of

the

original

relation

is

written

to

a

temporary

file

as

many

times

as

the

number

of

instances

of

the

specified

attribute

The

temporary

file

is

then

sorted

to

eliminate

duplicates

before

loading

the

tuples

back

to

the

relation

Unpack

operation

does

not

create

duplicates

if

one

or

more

atomic

attributes

of

the

operand

relation

form

a

key

To

accommodate

this

case

we

implemented

another

version

of

the

unpack

operation

without

sorting

In

the

join

operation

only

the

tuple

identifiers

and

the

join

attributes

of

the

operand

relations

are

written

to

temporary

files

These

files

are

then

sorted

to

eliminate

duplicates

after

which

a

sequential

scan

is

made

to

get

the

matching

tuples

on

the

join

attributes

The

tuple

identifiers

are

used

to

fetch

the

qualifying

tuples

of

the

original

relations

and

load

them

into

the

new

relation

The

operation

returns

the

values

of

designated

attributes

at

specified

time

points

in

one

sequential

scan

over

the

operand

relation

The

triplets

of

the

designated

attributes

are

examined

in

turn

for

intersection

with

the

specified

time

point

If

an

intersection

is

found

the

data

values

of

the

attributes

are

selected

Our

aim

in

this

study

is

to

demonstrate

the

feasibility

of

temporal

databases

using

attribute

timestamping

We

have

not

considered

alternative

implementation

methods

for

TRA

operations

Optimization

of

TRA

operations

by

processing

several

operations

in

one

scan

over

the

operand

relation

is

also

beyond

the

scope

of

this

study

Because

of

the

same

reason

we

do

not

consider

temporal

indexing

either

Performance

Evaluation

Overview

Performance

evaluation

of

temporal

DBMSs

especially

of

temporal

query

processing

has

received

marginal

interest

in

the

research

community

In

-LSB-

-RSB-

Ahn

and

Snodgrass

run

a

benchmark

set

of

queries

to

study

the

performance

of

their

prototype

system

on

four

types

of

databases

static

rollback

historical

and

temporal

Furthermore

they

propose

an

analytical

model

which

analyses

the

input

and

output

cost

of

temporal

queries

on

various

access

methods

-LSB-

-RSB-

We

follow

an

empirical

approach

and

measure

the

actual

performance

of

representative

sample

of

temporal

queries

on

our

system

The

results

that

we

report

in

this

section

provide

useful

insight

into

the

performance

of

temporal

databases

using

tuple

timestamping

and

attribute

timestamping

The

TDBMS

can

be

used

for

evaluating

the

performance

of

temporal

databases

which

support

tuple

timestamping

and

and

those

that

support

attribute

timestamping

A

valid

time

relation

consisting

of

only

atomic

attributes

is

a

regular

relation

In

this

relation

certain

atomic

attributes

can

be

designated

for

the

time

reference

of

tuples

Such

a

relation

simulates

tuple

timestamping

Hence

our

implementation

supports

both

tuple

timestamping

and

attribute

timestamping

and

provides

a

natural

environment

for

evaluating

their

performance

In

this

respect

queries

of

both

database

types

-LRB-

tuple

timestamping

and

attribute

timestamping

-RRB-

have

the

same

overhead

due

to

the

structure

of

TDBMS

However

the

system

will

be

slightly

biased

towards

attribute

timestamping

since

set-valued

attributes

and

some

compression

are

not

required

in

the

implementation

of

tuple

timestamping

Our

aim

is

to

measure

the

performance

of

different

types

of

temporal

databases

using

various

queries

in

terms

of

processing

time

which

includes

the

CPU

and

I/O

time

We

have

chosen

a

set

of

sample

queries

with

varying

characteristics

comparison

between

atomic

attributes

atomic

and

triplet-valued

attributes

and

triplet-valued

and

triplet-valued

-LRB-

time-varying

-RRB-

attributes

A

list

of

these

queries

is

provided

in

Appendix

A

This

list

covers

many

of

the

sample

queries

included

in

-LSB-

-RSB-

except

those

that

are

defined

for

testing

the

user

friendliness

of

temporal

query

languages

A

detailed

listing

of

the

algebraic

expressions

expressed

in

TDBMS

for

these

queries

can

be

found

in

Appendix

B

We

have

executed

these

queries

against

the

following

database

types

ffl

AT

A

temporal

database

using

attribute

timestamping

ffl

TTL

A

temporal

database

using

tuple

timestamping

where

a

single

relation

is

used

ffl

TT

A

temporal

database

using

tuple

timestamping

where

relations

are

in

temporal

normal

form

Note

that

we

consider

two

cases

for

tuple

timestamping

This

will

enable

us

to

see

how

the

performance

of

temporal

databases

using

tuple

timestamping

changes

depending

on

whether

a

single

relation

is

used

to

hold

all

the

temporal

data

belonging

to

similar

objects

-LRB-

TTL

-RRB-

or

several

relations

are

used

to

hold

the

same

temporal

data

-LRB-

TT

-RRB-

To

ensure

consistency

AT

TTL

and

TT

databases

contain

the

same

data

Generating

the

AT

Data

Database

Schema

A

test

database

eval

has

been

created

for

the

evaluation

of

the

database

types

mentioned

in

the

previous

section

It

consists

of

four

relations

namely

Emp

Dept

Proj

and

Assigned

These

relations

are

-LRB-

a

-RRB-

Emp

-LRB-

ssno

name

address

salary

skills

dname

-RRB-

-LRB-

b

-RRB-

Dept

-LRB-

dno

dname

budget

manager

-RRB-

-LRB-

c

-RRB-

Proj

-LRB-

pno

pname

budget

-RRB-

-LRB-

d

-RRB-

Assigned

-LRB-

ssno

pno

type

of

work

rating

-RRB-

The

Assigned

relation

shows

employees

and

the

projects

they

are

assigned

to

Attribute

type

of

work

denotes

the

different

types

of

work

carried

out

by

the

employee

For

each

assignment

the

employee

gets

a

rating

say

for

different

periods

of

time

The

rest

of

the

relations

and

their

attributes

are

selfexplanatory

This

database

is

created

as

a

AT

database

under

TDBMS

Temporal

databases

using

tuple

timestamping

are

generated

from

it

as

described

in

Sections

and

Populating

the

Database

Each

of

the

relations

mentioned

in

the

previous

section

is

populated

with

data

generated

randomly

from

a

uniform

distribution

The

random

function

-LRB-

-RRB-

which

returns

non-negative

double-precision

floating-point

values

uniformly

distributed

over

the

interval

-LSB-

-RRB-

is

used

to

generate

random

data

The

random

number

is

then

converted

to

an

attribute

value

The

range

of

the

attribute

values

is

listed

in

Table

It

should

be

noted

that

for

each

of

the

set-valued

and

set-triplet

valued

attributes

in

TDBMS

two

bytes

are

allocated

in

each

tuple

These

hold

pointers

to

a

bucket

of

set

values

For

convenience

two

assumptions

have

been

made

while

creating

the

historical

data

All

the

tuples

of

a

relation

are

homogeneous

i.e.

each

set-triplet

valued

attribute

of

a

tuple

has

the

same

starting

and

ending

times

Note

that

TDBMS

supports

non-homogeneous

tuples

as

well

The

instances

of

each

set-triplet

valued

attribute

are

continuous

i.e.

we

assume

no

values

or

discontinuities

in

the

tuples

of

these

relations

Generating

the

TTL

Data

The

test

database

eval

and

the

relations

given

in

Section

are

used

to

generate

the

relations

which

use

tuple

timestamping

where

the

whole

temporal

data

of

a

relation

is

contained

within

a

single

relation

These

temporal

relations

are

generated

by

first

unpacking

the

relations

on

each

set-triplet

valued

attribute

and

then

intersection

slicing

each

-LRB-

triplet-valued

-RRB-

attribute

by

the

other

-LRB-

triplet-valued

-RRB-

attribute

This

will

ensure

that

each

attribute

has

the

same

time

reference

A

droptime

operation

is

then

carried

out

on

Attribute

Relation

Value

Range

Time

Range

Size

-LRB-

bytes

-RRB-

ssno

Emp

name

Emp

address

Emp

salary

Emp

now

skills

Emp

now

dname

Emp

now

dno

Dept

dname

Dept

budget

Dept

now

manager

Dept

now

pno

Proj

pname

Proj

budget

Proj

now

ssno

Assigned

pno

Assigned

type

Assigned

now

rating

Assigned

100 01/01

now

Table

Attribute

Ranges

each

temporal

attribute

except

one

Triplet-decomposition

on

this

attribute

gives

the

desired

relation

For

example

the

Deptttl

is

created

using

the

following

algebra

expression

Deptttl

tdec

-LRB-

droptime

-LRB-

slice

-LRB-

slice

-LRB-

unpack

-LRB-

unpack

Dept

on

budget

-RRB-

on

manager

-RRB-

budget

by

manager

-RRB-

manager

by

budget

-RRB-

on

budget

-RRB-

on

manager

For

ease

of

reading

we

rename

the

attributes

Av

Al

and

Au

of

the

result

of

triplet-decomposition

operation

with

the

attribute

names

A

from

and

to

respectively

The

resulting

TTL

relations

are

as

follows

-LRB-

a

-RRB-

Empttl

-LRB-

ssno

ename

address

salary

skills

dname

from

to

-RRB-

-LRB-

b

-RRB-

Deptttl

-LRB-

dno

dname

budget

manager

from

to

-RRB-

-LRB-

c

-RRB-

Projttl

-LRB-

pno

pname

budget

from

to

-RRB-

-LRB-

d

-RRB-

Assignedttl

-LRB-

ssno

pno

type

of

work

rating

from

to

-RRB-

Generating

the

TT

Data

The

test

database

eval

and

the

relations

given

in

Section

are

used

to

generate

the

relations

which

use

tuple

timestamping

and

are

in

temporal

normal

form

From

each

relation

using

attribute

timestamping

a

family

of

relations

is

created

The

non-time

varying

attributes

are

collected

into

a

relation

whereas

each

time-varying

attribute

and

the

key

are

kept

in

a

separate

relation

These

temporal

relations

are

created

by

first

projecting

out

the

desired

attributes

from

the

original

relations

unpacking

the

set-triplet

valued

attributes

and

then

performing

a

triplet-decomposition

operation

For

example

the

Empsl

is

created

using

the

following

algebra

expression

Empsl

tdec

-LRB-

unpack

-LRB-

project

Emp

on

ssno

salary

-RRB-

on

salary

-RRB-

on

salary

We

rename

the

names

of

attributes

created

as

a

result

of

triplet-decomposition

operation

similar

to

the

TTL

case

The

resulting

TT

relations

are

as

follows

-LRB-

a

-RRB-

Empa

-LRB-

ssno

ename

address

-RRB-

-LRB-

b

-RRB-

Empsl

-LRB-

ssno

salary

from

to

-RRB-

-LRB-

c

-RRB-

Empsk

-LRB-

ssno

skills

from

to

-RRB-

-LRB-

d

-RRB-

Empd

-LRB-

ssno

dname

from

to

-RRB-

-LRB-

e

-RRB-

Depta

-LRB-

dno

dname

-RRB-

-LRB-

f

-RRB-

Deptb

-LRB-

dno

budget

from

to

-RRB-

-LRB-

g

-RRB-

Deptm

-LRB-

dno

manager

from

to

-RRB-

-LRB-

h

-RRB-

Proja

-LRB-

pno

pname

-RRB-

-LRB-

i

-RRB-

Projb

-LRB-

pno

budget

from

to

-RRB-

-LRB-

j

-RRB-

Assignedt

-LRB-

ssno

pno

type

of

work

from

to

-RRB-

-LRB-

k

-RRB-

Assignedr

-LRB-

ssno

pno

rating

from

to

-RRB-

Queries

The

list

of

example

queries

used

for

the

performance

evaluation

is

given

in

Appendix

A.

Each

query

is

executed

against

the

database

types

AT

TTL

and

TT

We

consider

two

types

of

queries

ATC

TTLC

and

TTC

stand

for

queries

involving

only

current

data

On

the

other

hand

ATH

TTLH

and

TTH

are

the

queries

which

involve

part

or

all

of

the

historical

data

represented

in

a

temporal

database

Database

Parameters

Maintaining

longer

histories

increases

the

database

size

Similarly

the

frequency

of

update

and

insertion

operations

also

affect

the

database

size

However

the

performance

degradation

is

obvious

upon

increasing

the

database

size

Thus

we

use

the

length

of

history

kept

as

the

determining

factor

of

the

database

size

and

perform

our

experiments

by

changing

the

number

of

triplets

in

set-triplet

valued

attributes

To

see

the

effect

of

the

length

of

history

on

the

performance

of

different

databases

we

consider

two

cases

by

changing

the

number

of

triplets

in

a

set-triplet

valued

attribute

In

case

a

set-triplet

valued

attribute

contains

triplets

whereas

in

case

it

contains

triplets

Thus

the

represents

a

database

which

carries

a

longer

history

and

represents

a

relatively

shorter

history

If

the

length

of

history

is

the

same

represents

a

database

where

there

are

frequent

changes

Table

gives

the

relation

sizes

for

these

two

cases

The

cardinality

of

the

Empttl

relation

in

case

could

not

be

calculated

since

the

intermediate

relations

resulting

from

the

unpack

operations

were

too

large

Query

processing

times

for

parameter

set

and

are

given

in

Table

In

the

table

of

run

the

second

and

third

columns

represents

the

results

for

the

temporal

databases

using

attribute

timestamping

The

second

column

-LRB-

ATC

-RRB-

gives

processing

time

of

the

queries

involving

current

data

The

third

column

-LRB-

ATH

-RRB-

is

the

processing

time

for

the

historical

queries

The

next

two

columns

show

processing

time

of

queries

in

the

case

of

temporal

databases

using

tuple

timestamping

-LRB-

TTC

and

TTH

-RRB-

where

relations

are

in

temporal

normal

form

The

last

two

columns

show

processing

time

of

queries

in

the

case

of

temporal

databases

using

tuple

timestamping

-LRB-

TTLC

and

TTLH

-RRB-

where

a

single

temporal

relation

is

used

We

did

not

run

the

queries

for

the

TTL

type

database

for

run

since

the

resulting

relations

are

too

large

and

obviously

its

performance

would

be

much

slower

The

Computing

Environment

All

the

experiments

were

carried

out

on

a

Sparc

ELC

workstation

on

a

local

area

network

Some

-LRB-

marginal

-RRB-

interference

is

possible

since

the

machine

was

connected

to

network

-LRB-

Ethernet

-RRB-

However

most

of

Ethernet

work

is

done

by

the

controller

not

by

the

CPU

Hence

the

interference

can

be

ignored

Moreover

since

all

three

database

types

are

subjected

to

the

same

-LRB-

marginal

-RRB-

interference

and

therefore

we

do

not

expect

that

the

interferance

would

unfavourably

affect

a

database

type

A

query

is

executed

once

against

each

database

type

We

do

not

expect

significant

changes

in

the

Relations

Case

Case

Tuple

length

Cardinality

Tuple

length

Cardinality

Emp

Dept

Proj

Assigned

Empttl

Deptttl

Projttl

Assignedttl

Empa

Empsl

Empsk

Empd

Depta

Deptb

Deptm

Proja

Projb

Assignedt

Assignedr

Table

Relation

sizes

for

Case

and

processing

time

of

a

query

from

one

execution

to

the

next

for

the

reasoning

stated

above

Even

if

there

are

changes

we

believe

that

they

are

minor

and

would

not

affect

the

conclusions

of

the

paper

The

processing

times

are

given

in

terms

of

the

time

the

process

spent

in

user

mode

Since

we

are

concerned

primarily

with

retrieval

type

of

queries

we

do

not

consider

the

time

spent

in

system/kernel

mode

Experiments

and

Results

All

experiments

are

based

on

databases

given

in

Section

and

sample

queries

listed

in

Appendix

A

We

conducted

three

experiments

In

the

first

experiment

the

sample

queries

were

run

against

the

sample

AT

Q

ATC

ATH

TTC

TTH

TTLC

TTLH

Q

ATC

ATH

TTC

TTH

Table

Processing

times

-LRB-

in

seconds

-RRB-

for

runs

and

database

In

the

second

experiment

the

queries

were

run

on

the

TT

database

and

the

third

experiment

was

run

on

the

TTL

database

In

the

following

interpretation

we

mostly

refer

to

the

results

of

parameter

set

shown

in

Table

The

table

for

case

gives

the

results

for

larger

databases

and

confirms

the

results

obtained

in

case

and

are

point

queries

which

select

one

tuple

i.e.

the

salary

of

a

particular

employee

AT

databases

perform

better

then

TT

and

TTL

databases

since

the

salary

history

of

an

employee

is

contained

within

a

single

tuple

On

the

other

hand

TT

and

TTL

databases

have

the

salary

history

of

an

employee

spread

over

multiple

tuples

requiring

multiple

accesses

Additionally

TTL

databases

perform

slower

then

TT

databases

due

to

the

longer

tuple

length

and

increased

cardinalities

of

TTL

relations

and

are

also

point

queries

selecting

a

tuple

but

retrieving

two

and

three

attributes

respectively

There

is

not

much

difference

between

these

queries

and

and

in

the

performance

of

AT

databases

since

the

multiple

attributes

are

retrieved

from

a

single

qualifying

tuple

Similarly

there

is

not

much

difference

in

the

performance

of

TTL

databases

since

the

number

of

qualifying

tuples

does

not

vary

significantly

from

those

of

and

The

performance

of

TT

databases

however

degrades

due

to

one

join

operation

for

and

two

join

operations

for

The

join

operation

is

necessary

since

the

attributes

to

be

retrieved

are

distributed

over

multiple

relations

and

are

range

queries

which

retrieve

one

set-triplet

valued

attribute

the

salary

of

employees

retrieves

employees

whose

names

are

less

than

This

selects

of

the

employee

relation

i.e.

tuples

since

employee

names

are

character

strings

and

string

comparison

is

used

in

the

query

More

specifically

employees

with

names

and

are

selected

-LRB-

Employee

names

range

from

to

as

shown

in

Table

-RRB-

selects

of

the

employee

relation

i.e.

tuples

and

selects

all

the

salary

values

in

the

employee

relation

i.e.

tuples

The

performance

of

all

three

types

of

databases

degrades

from

to

due

to

more

tuples

being

selected

TT

databases

do

not

perform

as

well

as

AT

databases

due

to

the

join

operation

The

time

required

for

AT

databases

almost

doubles

from

to

This

is

due

to

the

entire

salary

values

being

retrieved

and

the

length

of

the

salary

attribute

In

contrast

the

time

required

for

TT

databases

decreases

from

to

Although

all

tuples

are

selected

the

absence

of

a

join

improves

the

performance

The

TTH

version

of

is

a

simple

projection

In

the

TTL

databases

case

the

time

for

TTLC

increases

from

to

due

to

more

tuples

being

selected

in

However

TTLH

is

a

simple

projection

hence

the

time

decreases

from

to

and

are

range

queries

which

retrieve

two

set-triplet

valued

attributes

the

salary

and

departments

of

employees

The

number

of

tuples

selected

are

identical

to

and

respectively

The

response

times

in

these

queries

are

higher

then

their

and

counterparts

due

to

the

retrieval

of

an

additional

set-triplet

valued

attribute

Again

TT

databases

do

not

perform

as

well

as

AT

databases

due

to

the

join

operation

Two

join

operations

are

required

in

and

as

compared

to

a

single

join

in

queries

and

Even

though

a

single

join

is

required

for

the

TTH

version

of

the

time

spent

in

processing

the

query

is

quite

high

due

to

the

join

being

on

the

entire

Empsl

and

Empd

relations

The

explanation

for

the

performance

of

TTL

databases

is

similar

to

the

one

given

for

queries

and

and

are

range

queries

which

retrieve

three

set-triplet

valued

attributes

the

salary

departments

and

skills

of

employees

The

number

of

tuples

selected

are

identical

to

and

respectively

As

expected

the

times

for

these

queries

are

higher

then

and

due

to

the

retrieval

of

an

additional

set-triplet

valued

attribute

Other

trends

are

similar

to

those

noticed

for

queries

and

Three

join

operations

are

required

in

and

The

performance

degradation

in

the

TTH

version

of

is

quite

striking

due

to

the

joins

between

the

entire

Empsl

Empd

and

Empsk

relations

selects

the

current

department

of

the

employees

who

satisfy

a

condition

in

the

past

-LRB-

i.e.

salary

on

-RRB-

The

time

required

in

processing

the

TT

queries

is

higher

then

the

AT

queries

due

to

the

requirement

of

a

join

operation

in

TT

TTL

queries

take

longer

to

process

due

to

longer

tuples

and

larger

cardinality

of

selected

tuples

selects

ssno

's

of

employees

whose

salary

is

greater

than

is

similar

to

except

the

skills

of

employees

are

retrieved

instead

of

ssno

's

The

processing

time

of

AT

and

TT

databases

increases

from

to

due

to

the

retrieval

of

a

set-triplet

valued

attribute

in

the

latter

query

The

processing

time

of

TTL

however

is

almost

constant

due

to

retrieval

of

an

atomic

attribute

in

both

and

Processing

the

ATH

query

takes

significantly

longer

than

the

TTH

query

ATH

query

requires

an

unpack

operation

for

reaching

the

historical

values

The

unpack

operation

has

heavy

I/O

overhead

since

it

reads/writes

entire

historical

tuples

which

are

longer

into

temporary

relations

Elimination

of

duplicates

also

requires

sorting

which

is

very

costly

retrieves

skills

of

employees

It

requires

a

join

operation

in

processing

TT

queries

thus

increasing

their

processing

time

However

TT

database

still

performs

much

better

than

the

AT

database

is

a

range

query

which

returns

ssno

's

of

employees

whose

salary

is

between

and

is

similar

but

retrieves

skills

of

employees

The

performance

trends

in

and

are

similar

to

and

respectively

is

a

join

query

The

historical

versions

of

all

types

of

databases

perform

better

than

the

current

versions

due

to

the

extra

selection

operation

required

in

the

current

queries

All

types

of

databases

require

a

join

but

the

length

and

cardinality

of

selected

tuples

is

greater

in

TTL

followed

by

TT

and

finally

AT

databases

This

is

substantiated

by

the

increase

in

processing

time

from

AT

to

TT

to

TTL

as

seen

in

Table

also

shows

a

similar

performance

pattern

and

are

join

queries

The

first

one

involves

a

salary

value

and

the

second

one

involves

a

range

of

salary

values

The

explanation

for

the

increase

in

proccesing

time

from

AT

to

TTL

databases

in

is

similar

to

that

of

The

performance

of

AT

databases

degrades

in

due

to

the

unpack

operation

involves

a

join

operation

between

two

time-varying

attributes

Processing

times

are

more

or

less

the

same

for

AT

and

TT

databases

The

processing

time

for

TTLH

query

in

both

and

is

very

high

since

the

entire

Deptttl

and

Projttl

relations

are

joined

The

number

of

tuples

participating

in

the

join

and

their

length

is

quite

large

hence

the

increasing

the

processing

time

is

another

join

query

Processing

times

of

ATC

and

TTC

queries

are

not

significantly

different

Although

an

unpack

operation

is

needed

in

the

ATH

query

since

only

a

single

tuple

is

unpacked

the

processing

time

does

not

increase

much

Queries

through

are

aggregation

queries

In

larger

databases

we

were

not

able

to

complete

for

ATH

since

the

unpack

operation

created

too

many

intermediate

tuples

beyond

the

capacity

of

the

system

Furthermore

the

unpack

operation

required

for

the

ATH

queries

increased

the

processing

time

significantly

in

comparison

to

the

other

database

types

Overall

in

queries

to

AT

databases

had

better

performance

in

of

the

current

queries

whereas

TT

databases

performed

better

in

of

the

current

queries

In

historical

queries

TTL

databases

performed

better

only

in

of

the

queries

when

compared

to

AT

databases

Conclusions

We

can

derive

several

useful

conclusions

from

the

experiments

of

Section

As

one

would

expect

large

volume

of

data

in

temporal

databases

increase

the

processing

time

of

temporal

queries

However

as

the

size

of

the

database

decreases

from

parameter

set

to

and

shorter

history

is

maintained

in

the

database

the

performance

of

temporal

databases

would

converge

to

the

performance

of

snapshot

databases

In

case

of

point

queries

selecting

one

attribute

value

of

fewer

tuples

the

AT

database

performs

better

than

the

TT

database

ATC

queries

executing

on

a

single

relation

take

less

processing

time

than

their

TTC

counterparts

since

AT

databases

contain

fewer

tuples

than

TT

databases

Additionally

in

AT

databases

the

set-membership

operator

is

used

to

select

the

desired

triplet

-LRB-

s

-RRB-

from

the

history

of

a

set-triplet

valued

attribute

Moreover

TT

database

requires

join

operations

when

several

temporal

attributes

are

requested

by

the

query

It

can

be

seen

that

ATC

queries

involving

more

than

one

temporal

attribute

require

less

processing

time

In

the

TTC

queries

however

the

join

operation

increases

the

processing

time

Similarly

ATH

queries

involving

more

than

one

temporal

attribute

require

less

processing

time

since

a

simple

select

operation

is

used

to

fetch

the

entire

history

values

of

the

desired

attribute

TTH

queries

on

the

other

hand

require

a

join

operation

to

fetch

the

desired

values

Thus

as

the

number

of

qualifying

tuples

increase

and

one

or

more

attributes

are

retrieved

TT

queries

become

more

expensive

Unpack

is

a

costly

operation

to

reach

the

values

of

historical

attributes

Though

the

unpack

operation

can

be

completed

in

one

scan

it

still

needs

sorting

to

eliminate

duplicates

Furthermore

the

intermediate

tuples

are

written

to

temporary

files

This

creates

an

extra

overhead

for

AT

databases

since

the

tuples

are

longer

and

require

more

I/O

time

Queries

requiring

unpack

operation

degrades

the

performance

of

AT

databases

faster

than

the

performance

of

TT

queries

requiring

join

operations

In

TDBMS

the

join

operation

is

carried

out

in

an

efficient

way

Optimization

procedures

for

the

unpack

operation

are

also

needed

Furthermore

an

operation

which

allows

access

to

the

elements

of

a

set-triplet

valued

attribute

can

be

added

to

TRA

This

operation

will

be

used

in

most

of

the

queries

requiring

an

unpack

on

a

set-triplet

valued

attribute

Such

an

operation

is

similar

to

and

can

be

processed

by

a

sequential

scan

of

the

operand

relation

It

was

also

seen

that

having

all

temporal

attributes

within

a

single

relation

-LRB-

TTL

-RRB-

gives

better

performance

then

TT

only

in

a

few

queries

not

involving

joins

of

temporal

attributes

In

general

TTL

databases

require

more

processing

time

than

AT

and

TT

databases

due

to

the

large

size

of

TTL

relations

For

joins

involving

temporal

attributes

the

performance

of

TTL

database

degrades

substantially

as

seen

by

queries

and

Therefore

for

tuple

timestamping

TTL

is

not

a

better

choice

than

TT

relations

As

the

size

of

the

temporal

database

increases

we

observe

degradation

in

the

performance

of

AT

and

TT

databases

The

length

of

history

kept

in

the

database

as

well

as

the

frequency

of

changes

in

attribute

values

directly

affects

the

size

of

the

database

However

magnitude

of

the

performance

degradation

is

more

than

the

proportional

change

in

the

database

size

Furthermore

processing

time

of

queries

for

AT

and

TT

databases

in

general

are

stable

from

one

query

to

another

with

occasional

jumps

These

jumps

occur

in

queries

requiring

an

unpack

operation

in

AT

databases

whereas

they

occur

in

queries

requiring

excessive

join

operations

in

TT

databases

In

this

work

we

obtained

attribute

values

from

uniform

distributions

Our

results

can

be

verified

by

analytic

cost

estimations

However

in

real

life

attribute

distributions

are

not

uniform

on

the

contrary

most

of

the

time

they

are

skewed

We

focussed

our

attention

on

retrieval

queries

and

we

have

not

considered

update

operations

We

do

not

expect

much

of

a

difference

for

simple

update

operations

requiring

few

tuples

However

certain

update

patterns

as

well

as

update

operations

affecting

larger

number

of

tuples

may

cause

a

performance

difference

in

AT

and

TT

databases

We

plan

to

consider

these

issues

possible

optimization

of

TRA

operations

and

their

effect

on

the

performance

of

AT

and

TT

databases

in

a

separate

work

Acknowledgement

We

would

like

thank

Professors

Gultekin

Ozsoyoglu

and

Meral

Ozsoyoglu

for

permitting

us

to

use

the

ERAM

database

package

The

work

of

Abdullah

Uz

Tansel

is

partially

supported

by

the

PSC/CUNY

research

grant

The

work

of

Iqbal

A.

Goralwalla

and

M.

Tamer

Ozsu

has

been

supported

by

the

Natural

Sciences

and

Engineering

Research

Council

of

Canada

under

research

grant

References

-LSB-

-RSB-

Ariav

G.

A

Temporally

Oriented

Data

Model

ACM

TODS

Vol

No.

-LSB-

-RSB-

Ahn

I.

Snodgrass

R.

Partitioned

Storage

for

Temporal

Databases

Information

Systems

Vol

No.

pp

-LSB-

-RSB-

Ahn

I.

Snodgrass

R.

Performance

Analysis

of

Temporal

Queries

Information

Sciences

Vol

pp

-LSB-

-RSB-

Clifford

J.

Croker

A.

HRDM

A

Historical

Relational

Data

Model

Proc

of

the

Third

IEEE

International

Conf

on

Data

Engineering

-LSB-

-RSB-

Codd

E.F.

A

Relational

Model

of

Data

for

Large

Shared

Data

Banks

Comm

of

ACM

Vol

No.

-LRB-

-RRB-

pp

-LSB-

-RSB-

Hou

Wen-chi.

The

Implementation

of

the

Extended

Relational

Database

Management

System

MS

thesis

Case

Western

Reserve

University

-LSB-

-RSB-

Gadia

S.K.

A

Homogeneous

Relational

Model

and

Query

Languages

for

Temporal

Databases

ACM

TODS

Vol

No.

-LSB-

-RSB-

Goralwalla

I.A.

An

Implementation

of

a

Temporal

Relational

Database

Management

System

MS

thesis

Bilkent

University

June

-LSB-

-RSB-

Jensen

C.S.

et

al.

A

Consensus

Test

Suite

of

Temporal

Database

Queries

Aalborg

University

Technical

Report

November

-LSB-

-RSB-

Lorentzos

N.A.

Johnson

R.G.

Extending

Relational

Algebra

to

Manipulate

Temporal

Data

Information

Systems

Vol

No.

-LSB-

-RSB-

Mc

Kenzie

L.E.

Jr.

Snodgrass

R.T.

Evaluation

of

Relational

Algebras

Incorporating

the

Time

Dimension

in

Databases

ACM

Computing

Surveys

Vol

No.

Dec.

-LSB-

-RSB-

Navathe

S.B.

Ahmed

R.

TSQL

A

Language

Interface

for

History

Databases

Conf

on

Temporal

Aspects

of

Information

Systems

-LSB-

-RSB-

Ozsoyoglu

Z.M.

Ozsoyoglu

G.

An

Extension

of

Relational

Algebra

for

Summary

Tables

Proc

Second

LBL

Workshop

on

Statistical

Database

Management

-LSB-

-RSB-

Ozsoyoglu

G.

Ozsoyoglu

Z.M.

Matos

V.

Extending

Relational

Algebra

and

Relational

Calculus

with

Set-Valued

Attributes

and

Aggregate

Functions

ACM

Trans

Database

Syst.

Vol

No.

Dec.

pp

-LSB-

-RSB-

Sarda

N.

Extensions

to

SQL

for

Historical

Databases

IEEE

Trans

on

Knowledge

and

Data

Engineering

Vol

No.

June

pp

-LSB-

-RSB-

Snodgrass

R.

The

Temporal

Query

Language

TQuel

ACM

Trans

Database

Syst.

Vol

No.

June

-LSB-

-RSB-

Snodgrass

R.

-LRB-

Ed

-RRB-

Research

Concerning

Time

in

Databases

Project

Summaries

ACM

SIGMOD

Record

Vol

No.

-LSB-

-RSB-

Snodgrass

R.

-LRB-

Ed

-RRB-

IEEE

Data

Engineering

Vol

No.

-LSB-

-RSB-

Snodgrass

R.

Temporal

Databases

Status

and

Research

Directions

ACM

SIGMOD

Record

Vol

No.

Dec.

pp

-LSB-

-RSB-

Soo

M.D.

Bibliography

on

Temporal

Databases

Vol

No.

March

pp

-LSB-

-RSB-

Tansel

A.U.

Adding

Time

Dimension

to

Relational

Model

and

Extending

Relational

Algebra

Information

Systems

Vol

No.

-LRB-

-RRB-

pp

-LSB-

-RSB-

Tansel

A.U.

A

Statistical

Interface

for

Historical

Relational

Databases

Proc

of

the

Third

IEEE

International

Conf

on

Data

Engineering

pp

-LSB-

-RSB-

Tansel

A.

et

al.

Temporal

Databases

Theory

Design

and

Implementation

Benjamin/Cummings

A

Sample

queries

In

the

following

we

give

six

versions

of

a

query

for

the

query

current

and

historical

for

AT

TT

and

TTL

databases

The

other

queries

follow

a

similar

format

To

save

space

we

only

list

current

and

historical

versions

in

a

generic

format

Point

Query

ATC

What

is

the

current

salary

of

the

employee

with

a

ssno

of

ATH

What

is

the

salary

history

of

the

employee

with

a

ssno

of

TTC

What

is

the

current

salary

of

the

employee

with

a

ssno

of

TTH

What

is

the

salary

history

of

the

employee

with

a

ssno

of

TTLC

What

is

the

current

salary

of

the

employee

with

a

ssno

of

TTLH

What

is

the

salary

history

of

the

employee

with

a

ssno

of

Point

Query

Same

as

except

the

ssno

of

the

employee

is

Point

Query

Same

as

except

the

ssno

of

the

employee

is

Point

Query

C

What

are

the

current

salary

and

manager

values

of

the

employee

with

a

ssno

of

H

What

is

the

salary

and

manager

history

of

the

employee

with

a

ssno

of

Point

Query

C

What

are

the

current

salary

manager

and

skills

values

of

the

employee

with

a

ssno

of

H

What

is

the

salary

manager

and

skills

history

of

the

employee

with

a

ssno

of

Range

Query

C

What

are

the

current

salaries

of

employees

whose

names

are

less

than

H

What

are

the

salary

histories

of

employees

whose

names

are

less

than

Range

Query

C

What

are

the

current

salaries

of

employees

whose

names

are

less

than

H

What

are

the

salary

histories

of

employees

whose

names

are

less

than

Range

Query

C

What

are

the

current

salary

values

of

employees

H

What

are

the

salary

histories

of

employees

Range

Query

C

What

are

the

current

salaries

and

departments

of

employees

whose

names

are

less

than

H

What

are

the

salary

and

department

histories

of

employees

whose

names

are

less

than

Range

Query

C

What

are

the

current

salaries

and

departments

of

employees

whose

names

are

less

than

H

What

are

the

salary

and

department

histories

of

employees

whose

names

are

less

than

Range

Query

C

What

are

the

current

salary

and

department

values

of

employees

H

What

are

the

salary

and

department

histories

of

employees

Range

Query

C

What

are

the

current

salaries

departments

and

skills

of

employees

whose

names

are

less

than

H

What

are

the

salary

department

and

skill

histories

of

employees

whose

names

are

less

than

Range

Query

C

What

are

the

current

salaries

departments

and

skills

of

employees

whose

names

are

less

than

H

What

are

the

salary

department

and

skill

histories

of

employees

whose

names

are

less

than

Range

Query

C

What

are

the

current

salary

department

and

skill

values

of

employees

H

What

are

the

salary

department

and

skill

histories

of

employees

Point

Query

C

What

is

the

current

department

of

the

employee

whose

salary

was

on

H

What

is

the

current

department

of

the

employee

whose

salary

was

at

any

time

Range

Query

C

What

are

the

ssnos

of

employees

currently

making

more

than

H

What

are

the

ssnos

of

employees

who

make

more

than

in

their

salary

history

Range

Query

C

What

are

the

skills

of

employees

currently

making

more

than

H

What

are

the

skills

of

employees

who

make

more

than

in

their

salary

history

Range

Query

C

What

are

the

ssnos

of

employees

currently

making

between

and

H

What

are

the

ssnos

of

employees

who

make

between

and

in

their

salary

history

Range

Query

C

What

are

the

skills

of

employees

currently

making

between

and

H

What

are

the

skills

of

employees

who

make

between

and

in

their

salary

history

Join

between

two

Atomic

attributes

C

What

is

the

current

budget

of

project

number

and

what

are

the

ssnos

and

current

types

of

work

of

the

employees

assigned

to

it

H

What

is

the

budget

history

of

project

number

and

what

are

the

ssnos

and

histories

of

the

types

of

work

of

the

employees

assigned

to

it

Join

between

two

Atomic

attributes

H

What

are

the

ssnos

of

employees

who

worked

in

project

number

Join

between

two

Atomic

attributes

C

What

is

the

current

type

of

work

done

by

employees

whose

current

salary

is

H

What

is

the

history

of

type

of

work

done

by

employees

who

made

at

any

time

Join

between

two

Atomic

attributes

C

What

is

the

current

type

of

work

done

by

employees

whose

current

salary

is

H

What

is

the

history

of

type

of

work

done

by

employees

who

made

at

any

time

Join

between

two

set-triplet

attributes

C

What

are

the

department

and

project

numbers

of

the

departments

and

projects

whose

current

budget

is

the

same

H

What

are

the

department

and

project

numbers

of

the

departments

and

projects

which

have

the

same

budget

values

at

the

same

time

Join

between

two

set-triplet

attributes

C

What

are

the

department

numbers

managers

and

project

numbers

of

the

departments

and

projects

whose

current

budget

is

the

same

H

What

are

the

department

numbers

managers

and

project

numbers

of

the

departments

and

projects

which

have

the

same

budget

values

at

the

same

time

Join

between

two

set-triplet

attributes

C

What

is

the

current

budget

of

the

departments

for

which

the

employee

whose

ssno

is

is

currently

working

H

What

is

the

budget

history

of

the

departments

for

which

the

employee

whose

ssno

is

worked

at

any

time

Selection

on

a

set-triplet

attribute

and

retrieval

from

another

set-triplet

attribute

C

What

are

the

current

salaries

of

employees

currently

working

in

department

number

H

What

were

the

salaries

of

employees

when

they

were

working

in

department

number

Aggregation

-LRB-

-RRB-

C

What

is

the

current

average

salary

of

employees

currently

working

in

each

department

H

What

was

the

average

salary

of

employees

in

each

department

Aggregation

-LRB-

-RRB-

H

What

are

the

number

of

projects

each

employee

has

been

assigned

to

Aggregation

-LRB-

-RRB-

C

Which

department

has

currently

the

maximum

budget

H

Which

department

has

the

maximum

budget

Aggregation

-LRB-

-RRB-

C

What

was

the

current

average

rating

of

each

employee

for

the

projects

he

was

assigned

to

H

What

was

the

average

rating

of

each

employee

for

the

projects

he

was

assigned

to

Aggregation

-LRB-

-RRB-

H

What

was

the

highest

salary

earned

by

each

employee

B

Algebra

expressions

for

the

sample

queries

B.

Algebra

expressions

for

the

AT

queries

Point

Query

C

select

salaryV

from

emp

where

ssno

and

salaryt

-RSB-

H

select

salary

from

emp

where

ssno

Point

Query

C

select

salaryV

from

emp

where

ssno

and

salaryt

-RSB-

H

select

salary

from

emp

where

ssno

Point

Query

C

select

salaryV

from

emp

where

ssno

and

salaryt

-RSB-

H

select

salary

from

emp

where

ssno

Point

Query

C

select

salaryV

dnameV

from

emp

where

ssno

and

salaryt

-RSB-

and

dnamet

-RSB-

H

select

salary

dname

from

emp

where

ssno

Point

Query

C

select

salaryV

dnameV

skillsV

from

emp

where

ssno

and

salaryt

-RSB-

and

dnamet

-RSB-

and

skillst

-RSB-

H

select

salary

dname

skills

from

emp

where

ssno

Range

Query

C

select

salaryV

from

emp

where

ename

and

salaryt

-RSB-

H

select

salary

from

emp

where

ename

Range

Query

C

select

salaryV

from

emp

where

ename

and

salaryt

-RSB-

H

select

salary

from

emp

where

ename

Range

Query

C

select

salaryV

from

emp

where

salaryt

-RSB-

H

project

emp

on

salary

Range

Query

C

select

salaryV

dnameV

from

emp

where

ename

and

salaryt

-RSB-

and

dnamet

-RSB-

H

select

salary

dname

from

emp

where

ename

Range

Query

C

select

salaryV

dnameV

from

emp

where

ename

and

salaryt

-RSB-

and

dnamet

-RSB-

H

select

salary

dname

from

emp

where

ename

Range

Query

C

select

salaryV

dnameV

from

emp

where

salaryt

-RSB-

and

dnamet

-RSB-

H

project

emp

on

salary

dname

Range

Query

C

select

salaryV

dnameV

skillsV

from

emp

where

ename

and

salaryt

-RSB-

and

dnamet

-RSB-

and

skillst

-RSB-

H

select

salary

dname

skills

from

emp

where

ename

Range

Query

C

select

salaryV

dnameV

skillsV

from

emp

where

ename

and

salaryt

-RSB-

and

dnamet

-RSB-

and

skillst

-RSB-

H

select

salary

dname

skills

from

emp

where

ename

Range

Query

C

select

salaryV

dnameV

skillsV

from

emp

where

salaryt

-RSB-

and

dnamet

-RSB-

and

skillst

-RSB-

H

project

emp

on

salary

dname

skills

Point

Query

C

select

dname

from

-LRB-

select

salaryV

dnameV

from

emp

where

salaryt

-RSB-

and

dnamet

-RSB-

-RRB-

where

salary

H

select

dnameV

from

emp

where

dnamet

-RSB-

and

salaryv

-RSB-

Range

Query

C

select

ssno

from

-LRB-

select

salaryV

ssno

from

emp

where

salaryt

-RSB-

-RRB-

where

salary

H

select

ssno

from

-LRB-

unpack

emp

on

salary

-RRB-

where

salaryv

Range

Query

C

select

skills

from

-LRB-

select

salaryV

skills

from

emp

where

salaryt

-RSB-

-RRB-

where

salary

H

select

skills

from

-LRB-

unpack

emp

on

salary

-RRB-

where

salaryv

Range

Query

C

select

ssno

from

-LRB-

select

salaryV

ssno

from

emp

where

salaryt

-RSB-

-RRB-

where

salary

and

salary

H

select

ssno

from

-LRB-

unpack

emp

on

salary

-RRB-

where

salaryv

and

salaryv

Range

Query

C

select

skills

from

-LRB-

select

salaryV

skills

from

emp

where

salaryt

-RSB-

-RRB-

where

salary

and

salary

H

select

skills

from

-LRB-

unpack

emp

on

salary

-RRB-

where

salaryv

and

salaryv

Join

between

two

Atomic

attributes

C

project

-LRB-

-LRB-

select

budgetV

pno

from

proj

where

budgett

-RSB-

and

pno

-RRB-

njoin

-LRB-

select

typeV

ssno

pno

from

assigned

where

typet

-RSB-

-RRB-

-RRB-

on

ssno

type

budget

H

project

-LRB-

-LRB-

select

pno

budget

from

proj

where

pno

-RRB-

njoin

assigned

-RRB-

on

ssno

type

budget

Join

between

two

Atomic

attributes

H

project

-LRB-

-LRB-

select

pno

from

proj

where

pname

-RRB-

njoin

assigned

-RRB-

on

ssno

Join

between

two

Atomic

attributes

C

project

-LRB-

-LRB-

select

ssno

from

-LRB-

select

salaryV

ssno

from

emp

where

salaryt

-RSB-

-RRB-

where

salary

-RRB-

njoin

-LRB-

select

typeV

ssno

from

assigned

where

typet

-RSB-

-RRB-

-RRB-

on

type

H

project

-LRB-

-LRB-

select

ssno

from

emp

where

salaryv

-RSB-

-RRB-

njoin

assigned

-RRB-

on

type

Join

between

two

Atomic

attributes

C

project

-LRB-

-LRB-

select

ssno

from

-LRB-

select

salaryV

ssno

from

emp

where

salaryt

-RSB-

where

salary

-RRB-

njoin

-LRB-

select

typeV

ssno

from

assigned

where

typet

-RSB-

-RRB-

-RRB-

on

type

-RRB-

H

project

-LRB-

-LRB-

select

ssno

from

-LRB-

unpack

emp

on

salary

-RRB-

where

salaryv

-RRB-

njoin

assigned

-RRB-

on

type

Join

between

two

set-triplet

attributes

C

project

-LRB-

-LRB-

select

budgetV

dno

from

dept

where

budgett

-RSB-

-RRB-

njoin

-LRB-

select

budgetV

pno

from

proj

where

budgett

-RSB-

-RRB-

-RRB-

on

dno

pno

H

project

-LRB-

dept

njoin

proj

-RRB-

on

dno

pno

Join

between

two

set-triplet

attributes

C

project

-LRB-

-LRB-

select

budgetV

dno

manager

from

dept

where

budgett

-RSB-

-RRB-

njoin

-LRB-

select

budgetV

pno

from

proj

where

budgett

-RSB-

-RRB-

-RRB-

on

dno

pno

manager

H

project

-LRB-

dept

njoin

proj

-RRB-

on

dno

pno

manager

Join

between

two

set-triplet

attributes

C

project

-LRB-

-LRB-

select

dnameV

from

emp

where

dnamet

-RSB-

and

ssno

-RRB-

njoin

-LRB-

select

budgetV

dname

from

dept

where

budgett

-RSB-

-RRB-

-RRB-

on

budget

H

project

-LRB-

-LRB-

unpack

-LRB-

droptime

-LRB-

select

dname

from

emp

where

ssno

-RRB-

on

dname

-RRB-

on

dname

-RRB-

njoin

dept

-RRB-

on

budget

Selection

on

a

set-triplet

attribute

and

retrieval

from

another

set-triplet

attribute

C

select

salary

from

-LRB-

select

salaryV

dnameV

from

emp

where

salaryt

-RSB-

and

dnamet

-RSB-

-RRB-

where

dname

H

select

salary

from

emp

where

dnamev

-RSB-

Aggregation

-LRB-

-RRB-

C

-LRB-

select

salaryV

dnameV

from

emp

where

salaryt

-RSB-

and

dnamet

-RSB-

-RRB-

dname

avg

-LRB-

salary

-RRB-

H

-LRB-

unpack

-LRB-

unpack

emp

on

salary

-RRB-

on

dname

-RRB-

fdnameg

avg

-LRB-

salary

-RRB-

Aggregation

-LRB-

-RRB-

H

assigned

ssno

count

-LRB-

pno

-RRB-

Aggregation

-LRB-

-RRB-

C

-LRB-

select

budgetV

dno

from

dept

where

budgett

-RSB-

-RRB-

dno

max

-LRB-

budget

-RRB-

H

-LRB-

unpack

dept

on

budget

-RRB-

dno

max

-LRB-

budget

-RRB-

Aggregation

-LRB-

-RRB-

C

-LRB-

select

ratingV

ssno

from

assigned

where

ratingt

-RSB-

-RRB-

ssno

avg

-LRB-

rating

-RRB-

H

-LRB-

unpack

assigned

on

rating

-RRB-

ssno

avg

-LRB-

rating

-RRB-

Aggregation

-LRB-

-RRB-

H

-LRB-

unpack

emp

on

salary

-RRB-

ssno

max

-LRB-

salary

-RRB-

B.

Algebra

expressions

for

the

TT

queries

Point

Query

C

select

salaryv

from

empsl

where

ssno

and

salaryu

H

select

salaryv

from

empsl

where

ssno

Point

Query

C

select

salaryv

from

empsl

where

ssno

and

salaryu

H

select

salaryv

from

empsl

where

ssno

Point

Query

C

select

salaryv

from

empsl

where

ssno

and

salaryu

H

select

salaryv

from

empsl

where

ssno

Point

Query

C

project

-LRB-

-LRB-

select

ssno

salaryv

from

empsl

where

ssno

and

salaryu

-RRB-

njoin

-LRB-

select

ssno

dnamev

from

empd

where

ssno

and

dnameu

-RRB-

-RRB-

on

salaryv

dnamev

H

project

-LRB-

-LRB-

select

ssno

salaryv

from

empsl

where

ssno

-RRB-

njoin

-LRB-

select

ssno

dnamev

from

empd

where

ssno

-RRB-

-RRB-

on

salaryv

dnamev

Point

Query

C

project

-LRB-

-LRB-

-LRB-

select

ssno

salaryv

from

empsl

where

ssno

and

salaryu

-RRB-

njoin

-LRB-

select

ssno

dnamev

from

empd

where

ssno

and

dnameu

-RRB-

-RRB-

njoin

-LRB-

select

ssno

skillsv

from

empsk

where

ssno

and

skillsu

-RRB-

-RRB-

on

salaryv

dnamev

H

project

-LRB-

-LRB-

-LRB-

select

ssno

salaryv

from

empsl

where

ssno

-RRB-

njoin

-LRB-

select

ssno

dnamev

from

empd

where

ssno

-RRB-

-RRB-

njoin

-LRB-

select

ssno

skillsv

from

empsk

where

ssno

-RRB-

-RRB-

on

salaryv

dnamev

Range

Query

C

project

-LRB-

-LRB-

select

ssno

from

empa

where

ename

-RRB-

njoin

-LRB-

select

ssno

salaryv

from

empsl

where

salaryu

-RRB-

-RRB-

on

salaryv

H

project

-LRB-

-LRB-

select

ssno

from

empa

where

ename

-RRB-

njoin

empsl

-RRB-

on

salaryv

Range

Query

C

project

-LRB-

-LRB-

select

ssno

from

empa

where

ename

-RRB-

njoin

-LRB-

select

ssno

salaryv

from

empsl

where

salaryu

-RRB-

-RRB-

on

salaryv

H

project

-LRB-

-LRB-

select

ssno

from

empa

where

ename

-RRB-

njoin

empsl

-RRB-

on

salaryv

Range

Query

C

select

salaryv

from

empsl

where

salaryu

H

project

empsl

on

salaryv

Range

Query

C

project

-LRB-

-LRB-

-LRB-

select

ssno

from

empa

where

ename

-RRB-

njoin

-LRB-

select

ssno

salaryv

from

empsl

where

salaryu

-RRB-

-RRB-

njoin

-LRB-

select

ssno

dnamev

from

empd

where

dnameu

-RRB-

-RRB-

on

salaryv

dnamev

H

project

-LRB-

-LRB-

-LRB-

select

ssno

from

empa

where

ename

-RRB-

njoin

empsl

-RRB-

njoin

empd

-RRB-

on

salaryv

dnamev

Range

Query

C

project

-LRB-

-LRB-

-LRB-

select

ssno

from

empa

where

ename

-RRB-

njoin

-LRB-

select

ssno

salaryv

from

empsl

where

salaryu

-RRB-

-RRB-

njoin

-LRB-

select

ssno

dnamev

from

empd

where

dnameu

-RRB-

-RRB-

on

salaryv

dnamev

H

project

-LRB-

-LRB-

-LRB-

select

ssno

from

empa

where

ename

-RRB-

njoin

empsl

-RRB-

njoin

empd

-RRB-

on

salaryv

dnamev

Range

Query

C

project

-LRB-

-LRB-

select

ssno

salaryv

from

empsl

where

salaryu

-RRB-

njoin

-LRB-

select

ssno

dnamev

from

empd

where

dnameu

-RRB-

-RRB-

on

salaryv

dnamev

H

project

-LRB-

empsl

njoin

empd

-RRB-

on

salaryv

dnamev

Range

Query

C

project

-LRB-

-LRB-

-LRB-

-LRB-

select

ssno

from

empa

where

ename

-RRB-

njoin

-LRB-

select

ssno

salaryv

from

empsl

where

salaryu

-RRB-

-RRB-

njoin

-LRB-

select

ssno

dnamev

from

empd

where

dnameu

-RRB-

-RRB-

njoin

-LRB-

select

ssno

skillsv

from

empsk

where

skillsu

-RRB-

-RRB-

on

salaryv

dnamev

skillsv

H

project

-LRB-

-LRB-

-LRB-

-LRB-

select

ssno

from

empa

where

ename

-RRB-

njoin

empsl

-RRB-

njoin

empd

-RRB-

njoin

empsk

-RRB-

on

salaryv

dnamev

skillsv

Range

Query

C

project

-LRB-

-LRB-

-LRB-

-LRB-

select

ssno

from

empa

where

ename

-RRB-

njoin

-LRB-

select

ssno

salaryv

from

empsl

where

salaryu

-RRB-

-RRB-

njoin

-LRB-

select

ssno

dnamev

from

empd

where

dnameu

-RRB-

-RRB-

njoin

-LRB-

select

ssno

skillsv

from

empsk

where

skillsu

-RRB-

-RRB-

on

salaryv

dnamev

skillsv

H

project

-LRB-

-LRB-

-LRB-

-LRB-

select

ssno

from

empa

where

ename

-RRB-

njoin

empsl

-RRB-

njoin

empd

-RRB-

njoin

empsk

-RRB-

on

salaryv

dnamev

skillsv

Range

Query

C

project

-LRB-

-LRB-

-LRB-

select

ssno

salaryv

from

empsl

where

salaryu

-RRB-

njoin

-LRB-

select

ssno

dnamev

from

empd

where

dnameu

-RRB-

-RRB-

njoin

-LRB-

select

ssno

skillsv

from

empsk

where

skillsu

-RRB-

-RRB-

on

salaryv

dnamev

skillsv

H

project

-LRB-

-LRB-

empsl

njoin

empd

-RRB-

njoin

empsk

-RRB-

on

salaryv

dnamev

skillsv

Point

Query

C

project

-LRB-

-LRB-

select

ssno

salaryv

from

empsl

where

salaryv

and

salaryl

and

salaryu

-RRB-

njoin

-LRB-

select

ssno

dnamev

from

empd

where

dnameu

-RRB-

-RRB-

on

dnamev

H

project

-LRB-

-LRB-

select

ssno

salaryv

from

empsl

where

salaryv

-RRB-

njoin

-LRB-

select

ssno

dnamev

from

empd

where

dnameu

-RRB-

-RRB-

on

dnamev

Range

Query

C

select

ssno

from

empsl

where

salaryv

and

salaryu

H

select

ssno

from

empsl

where

salaryv

Range

Query

C

project

-LRB-

-LRB-

select

ssno

from

empsl

where

salaryv

and

salaryu

-RRB-

njoin

empsk

-RRB-

on

skillsv

H

project

-LRB-

-LRB-

select

ssno

from

empsl

where

salaryv

-RRB-

njoin

empsk

-RRB-

on

skillsv

Range

Query

C

select

ssno

from

empsl

where

salaryv

and

salaryv

and

salaryu

H

select

ssno

from

empsl

where

salaryv

and

salaryv

Range

Query

C

project

-LRB-

-LRB-

select

ssno

from

empsl

where

salaryv

and

salaryv

and

salaryu

-RRB-

njoin

empsk

-RRB-

on

skillsv

H

project

-LRB-

-LRB-

select

ssno

from

empsl

where

salaryv

and

salaryv

-RRB-

njoin

empsk

-RRB-

on

skillsv

Join

between

two

Atomic

attributes

C

project

-LRB-

-LRB-

select

pno

budgetv

from

projb

where

pno

and

budgetu

-RRB-

njoin

-LRB-

select

ssno

pno

typev

from

asst

where

typeu

-RRB-

-RRB-

on

ssno

typev

budgetv

H

project

-LRB-

-LRB-

select

pno

budgetv

from

projb

where

pno

-RRB-

njoin

asst

-RRB-

on

ssno

typev

budgetv

Join

between

two

Atomic

attributes

H

project

-LRB-

-LRB-

select

pno

from

proja

where

pname

-RRB-

njoin

asst

-RRB-

on

ssno

Join

between

two

Atomic

attributes

C

project

-LRB-

-LRB-

select

ssno

from

empsl

where

salaryv

and

salaryu

-RRB-

njoin

-LRB-

select

ssno

typev

from

asst

where

typeu

-RRB-

-RRB-

on

typev

H

project

-LRB-

-LRB-

select

ssno

from

empsl

where

salaryv

-RRB-

njoin

asst

-RRB-

on

typev

Join

between

two

Atomic

attributes

C

project

-LRB-

-LRB-

select

ssno

from

empsl

where

salaryv

and

salaryu

-RRB-

njoin

-LRB-

select

ssno

typev

from

asst

where

typeu

-RRB-

-RRB-

on

typev

H

project

-LRB-

-LRB-

select

ssno

from

empsl

where

salaryv

-RRB-

njoin

asst

-RRB-

on

typev

Join

between

two

set-triplet

attributes

C

project

-LRB-

-LRB-

select

dno

budgetv

from

deptb

where

budgetu

-RRB-

njoin

-LRB-

select

pno

budgetv

from

projb

where

budgetu

-RRB-

-RRB-

on

dno

pno

H

project

-LRB-

deptb

njoin

projb

-RRB-

on

dno

pno

Join

between

two

set-triplet

attributes

C

project

-LRB-

-LRB-

-LRB-

select

dno

budgetv

from

deptb

where

budgetu

-RRB-

njoin

-LRB-

select

pno

budgetv

from

projb

where

budgetu

-RRB-

-RRB-

njoin

deptm

-RRB-

on

dno

pno

managerv

H

project

-LRB-

-LRB-

deptb

njoin

projb

-RRB-

njoin

deptm

-RRB-

on

dno

pno

managerv

Join

between

two

set-triplet

attributes

C

project

-LRB-

-LRB-

select

dnamev

from

empd

where

ssno

and

dnameu

-RRB-

njoin

-LRB-

-LRB-

select

dno

budgetv

from

deptb

where

budgetu

-RRB-

njoin

depta

-RRB-

-RRB-

on

budgetv

H

project

-LRB-

-LRB-

select

dnamev

from

empd

where

ssno

-RRB-

njoin

-LRB-

deptb

njoin

depta

-RRB-

-RRB-

on

budgetv

Selection

on

a

set-triplet

attribute

and

retrieval

from

another

set-triplet

attribute

C

project

-LRB-

-LRB-

select

ssno

from

empd

where

dnamev

and

dnameu

-RRB-

njoin

-LRB-

select

ssno

salaryv

from

empsl

where

salaryu

-RRB-

-RRB-

on

salaryv

H

project

-LRB-

-LRB-

select

ssno

from

empd

where

dnamev

-RRB-

njoin

empsl

-RRB-

on

salaryv

Aggregation

-LRB-

-RRB-

C

-LRB-

-LRB-

select

ssno

dnamev

from

empd

where

dnameu

-RRB-

njoin

-LRB-

select

ssno

salaryv

from

empsl

where

salaryu

-RRB-

-RRB-

dnamev

avg

-LRB-

salaryv

-RRB-

H

-LRB-

empd

njoin

empsl

-RRB-

dnamev

avg

-LRB-

salaryv

-RRB-

Aggregation

-LRB-

-RRB-

H

asst

ssno

count

-LRB-

pno

-RRB-

Aggregation

-LRB-

-RRB-

C

-LRB-

select

dno

budgetv

from

deptb

where

budgetu

-RRB-

dno

max

-LRB-

budgetv

-RRB-

H

deptb

dno

max

-LRB-

budgetv

-RRB-

Aggregation

-LRB-

-RRB-

C

-LRB-

select

ssno

ratingv

from

assr

where

ratingu

-RRB-

ssno

avg

-LRB-

ratingv

-RRB-

H

assr

ssno

avg

-LRB-

ratingv

-RRB-

Aggregation

-LRB-

-RRB-

H

empsl

ssno

max

-LRB-

salaryv

-RRB-

B.

Algebra

expressions

for

the

TTL

queries

Point

Query

C

select

salary

from

empttl

where

ssno

and

dnameu

H

select

salary

from

empttl

where

ssno

Point

Query

C

select

salary

from

empttl

where

ssno

and

dnameu

H

select

salary

from

empttl

where

ssno

Point

Query

C

select

salary

from

empttl

where

ssno

and

dnameu

H

select

salary

from

empttl

where

ssno

Point

Query

C

select

salary

dnamev

from

empttl

where

ssno

and

dnameu

H

select

salary

dnamev

from

empttl

where

ssno

Point

Query

C

select

salary

skills

dnamev

from

empttl

where

ssno

and

dnameu

H

select

salary

skills

dnamev

from

empttl

where

ssno

Range

Query

C

select

salary

from

empttl

where

ename

and

dnameu

H

select

salary

from

empttl

where

ename

Range

Query

C

select

salary

from

empttl

where

ename

and

dnameu

H

select

salary

from

empttl

where

ename

Range

Query

C

select

salary

from

empttl

where

dnameu

H

project

empttl

on

salary

Range

Query

C

select

salary

dnamev

from

empttl

where

ename

and

dnameu

H

select

salary

dnamev

from

empttl

where

ename

Range

Query

C

select

salary

dnamev

from

empttl

where

ename

and

dnameu

H

select

salary

dnamev

from

empttl

where

ename

Range

Query

C

select

salary

dnamev

from

empttl

where

dnameu

H

project

empttl

on

salary

dnamev

Range

Query

C

select

salary

skills

dnamev

from

empttl

where

ename

and

dnameu

H

select

salary

skills

dnamev

from

empttl

where

ename

Range

Query

C

select

salary

skills

dnamev

from

empttl

where

ename

and

dnameu

H

select

salary

skills

dnamev

from

empttl

where

ename

Range

Query

C

select

salary

skills

dnamev

from

empttl

where

dnameu

H

project

empttl

on

salary

skills

dnamev

Point

Query

C

select

dnamev

from

empttl

where

dnameu

and

dnamel

and

dnameu

and

salary

H

select

dnamev

from

empttl

where

dnameu

and

salary

Range

Query

C

select

ssno

from

empttl

where

salary

and

dnameu

H

select

ssno

from

empttl

where

salary

Range

Query

C

select

skills

from

empttl

where

salary

and

dnameu

H

select

skills

from

empttl

where

salary

Range

Query

C

select

ssno

from

empttl

where

salary

and

salary

and

dnameu

H

select

ssno

from

empttl

where

salary

and

salary

Range

Query

C

select

skills

from

empttl

where

salary

and

salary

and

dnameu

H

select

skills

from

empttl

where

salary

and

salary

Join

between

two

Atomic

attributes

C

project

-LRB-

-LRB-

select

pno

budgetv

from

projttl

where

budgetu

and

pno

-RRB-

njoin

-LRB-

select

ssno

pno

type

from

assttl

where

ratingu

-RRB-

-RRB-

on

ssno

type

budgetv

H

project

-LRB-

-LRB-

select

pno

budgetv

from

projttl

where

pno

-RRB-

njoin

assttl

-RRB-

on

ssno

type

budgetv

Join

between

two

Atomic

attributes

H

project

-LRB-

-LRB-

select

pno

from

projttl

where

pname

-RRB-

njoin

assttl

-RRB-

on

ssno

Join

between

two

Atomic

attributes

C

project

-LRB-

-LRB-

select

ssno

from

empttl

where

salary

and

dnameu

-RRB-

njoin

-LRB-

select

ssno

type

from

assttl

where

ratingu

-RRB-

-RRB-

on

type

H

project

-LRB-

-LRB-

select

ssno

from

empttl

where

salary

-RRB-

njoin

assttl

-RRB-

on

type

Join

between

two

Atomic

attributes

C

project

-LRB-

-LRB-

select

ssno

from

empttl

where

salary

and

dnameu

-RRB-

njoin

-LRB-

select

ssno

type

from

assttl

where

ratingu

-RRB-

-RRB-

on

type

H

project

-LRB-

-LRB-

select

ssno

from

empttl

where

salary

-RRB-

njoin

assttl

-RRB-

on

type

Join

between

two

set-triplet

attributes

C

project

-LRB-

-LRB-

select

dno

budget

from

deptttl

where

manageru

-RRB-

njoin

-LRB-

select

pno

budgetv

from

projttl

where

budgetu

-RRB-

-RRB-

on

dno

pno

H

project

-LRB-

deptttl

njoin

projttl

-RRB-

on

dno

pno

Join

between

two

set-triplet

attributes

C

project

-LRB-

-LRB-

select

dno

budget

managerv

from

deptttl

where

manageru

-RRB-

njoin

-LRB-

select

pno

budgetv

from

projttl

where

budgetu

-RRB-

-RRB-

on

dno

pno

managerv

H

project

-LRB-

deptttl

njoin

projttl

-RRB-

on

dno

pno

managerv

Join

between

two

set-triplet

attributes

C

project

-LRB-

-LRB-

select

dnamev

from

empttl

where

dnameu

and

ssno

-RRB-

njoin

-LRB-

select

budget

dname

from

deptttl

where

manageru

-RRB-

-RRB-

on

budget

H

project

-LRB-

-LRB-

select

dnamev

from

empttl

where

ssno

-RRB-

njoin

deptttl

-RRB-

on

budget

Selection

on

a

set-triplet

attribute

and

retrieval

from

another

set-triplet

attribute

C

select

salary

from

empttl

where

dnamev

and

dnameu

H

select

salary

from

empttl

where

dnamev

Aggregation

-LRB-

-RRB-

C

-LRB-

select

ssno

salary

dnamev

from

empttl

where

dnameu

-RRB-

dnamev

avg

-LRB-

salary

-RRB-

H

empttl

dnamev

avg

-LRB-

salary

-RRB-

Aggregation

-LRB-

-RRB-

H

assttl

ssno

count

-LRB-

pno

-RRB-

Aggregation

-LRB-

-RRB-

C

-LRB-

select

dno

budget

from

deptttl

where

manageru

-RRB-

dno

max

-LRB-

budget

-RRB-

H

deptttl

dno

max

-LRB-

budget

-RRB-

Aggregation

-LRB-

-RRB-

C

-LRB-

select

ssno

ratingv

from

assttl

where

ratingu

-RRB-

ssno

avg

-LRB-

ratingv

-RRB-

H

assttl

ssno

avg

-LRB-

ratingv

-RRB-

Aggregation

-LRB-

-RRB-

H

empttl

ssno

max

-LRB-

salary

-RRB-

attribute timestamping
temporal databases
temporal queries
tuple timestamping