DESIGN

AND

PERFORMANCE

EVALUATION

OF

INDEXING

METHODS

FOR

DYNAMIC

ATTRIBUTES

IN

MOBILE

DATABASE

MANAGEMENT

SYSTEMS

a

thesis

submitted

to

the

department

of

computer

engineering

and

information

science

and

the

institute

of

engineering

and

science

of

bilkent

university

in

partial

fulfillment

of

the

requirements

for

the

degree

of

master

of

science

By

Jamel

Tayeb

May

ii

I

certify

that

I

have

read

this

thesis

and

that

in

my

opinion

it

is

fully

adequate

in

scope

and

in

quality

as

a

thesis

for

the

degree

of

Master

of

Science

Asst.

Prof.

Ozg?ur

Ulusoy

-LRB-

Supervisor

-RRB-

I

certify

that

I

have

read

this

thesis

and

that

in

my

opinion

it

is

fully

adequate

in

scope

and

in

quality

as

a

thesis

for

the

degree

of

Master

of

Science

Prof.

Varol

Akman

I

certify

that

I

have

read

this

thesis

and

that

in

my

opinion

it

is

fully

adequate

in

scope

and

in

quality

as

a

thesis

for

the

degree

of

Master

of

Science

Asst.

Prof.

Attila

G?ursoy

Approved

for

the

Institute

of

Engineering

and

Science

Prof.

Mehmet

Baray

Director

of

Institute

of

Engineering

and

Science

ABSTRACT

DESIGN

AND

PERFORMANCE

EVALUATION

OF

INDEXING

METHODS

FOR

DYNAMIC

ATTRIBUTES

IN

MOBILE

DATABASE

MANAGEMENT

SYSTEMS

Jamel

Tayeb

M.S.

in

Computer

Engineering

and

Information

Science

Supervisor

Asst.

Prof.

Ozg?ur

Ulusoy

May

In

traditional

databases

we

deal

with

static

attributes

which

change

very

infrequently

over

time

and

their

change

is

handled

with

an

explicit

update

operation

In

temporal

databases

the

time

of

change

of

attributes

is

also

important

and

every

update

creates

a

new

version

Attributes

typically

change

more

frequently

over

time

A

more

agitated

category

of

attributes

are

the

so-called

dynamic

attributes

whose

value

changes

continuously

over

time

thus

making

it

impractical

to

explicitly

update

them

as

they

change

In

this

thesis

we

conduct

a

performance

evaluation

study

of

two

indexing

methods

for

dynamic

attributes

These

are

based

on

the

key

idea

of

using

a

linear

function

that

describes

the

way

the

attribute

changes

over

time

and

allows

us

to

predict

its

value

in

the

future

based

on

any

value

of

it

in

the

past

The

problem

is

rooted

in

the

context

of

mobile

data

management

and

draws

upon

the

fields

of

spatial

and

temporal

indexing

We

contribute

various

experimental

results

mathematical

analyses

and

improvement

and

optimization

algorithms

Finally

inspired

by

a

few

of

the

observed

shortcomings

of

both

of

the

studied

techniques

we

propose

a

novel

indexing

method

which

we

call

the

FP-Index

which

is

shown

analytically

to

have

promising

prospects

and

to

beat

both

methods

over

most

performance

parameters

iii

OZET

TABANI

IC

IN

INDEKSLEME

Y?ONTEMLER

I

TASARIMI

VE

PERFORMANS

OLC

UM?U

Jamel

Tayeb

Bilgisayar

ve

Enformatik

M?uhendisli

gi

Y?uksek

Lisans

Tez

Y?oneticisi

Yard

Do?c

Dr.

Ozg?ur

Ulusoy

May?s

Genel

ama?cl

veri

tabanlar?n

olu?sturan

oznitelikler

nadiren

ve

baz

i?slemlerin

uygulanmas

sonucu

de

ger

de

gi?sikliklerine

u

grad?klar

i?cin

dura

gan

oznitelikler

olarak

adland?r?lmaktad?rlar

Zamansal

veri

tabanlar?nda

ozniteliklerin

de

gi?sikli

ge

u

grama

zamanlar

da

onemlidir

ve

her

de

gi?siklikte

ozniteli

gin

yeni

bir

versiyonu

yarat?l?r

Bu

tip

veri

tabanlar?nda

oznitelikler

dura

gan

ozniteliklere

oranla

genelde

daha

s?k

de

gi?sikli

ge

u

grarlar

Ozniteliklerin

dinamik

oznitelikler

olarak

adland?r?lan

bir

di

ger

kategorisi

ise

zamana

ba

gl

olarak

devaml

de

gi?sme

ozelli

gine

sahiptir

ve

bu

nedenle

her

de

ger

de

gi?siminin

bir

i?slem

arac?l

g?yla

veri

taban?na

yans?t?lmas

sisteme

cok

b?uy?uk

bir

y?uk

getirecektir

Bu

tezde

dinamik

oznitelikler

uzerinde

iki

de

gi?sik

indeksleme

metodunun

performans

analizi

ger?cekle?stirilmektedir

Bu

y?ontemlerdeki

temel

fikir

do

grusal

bir

i?slev

arac?l

g?yla

ozniteliklerin

ge?cmi?steki

de

gerlerini

de

kullanarak

gelecek

i?cin

alabilecekleri

de

gerlerin

belirlenmesidir

Bu

y?ontemlerin

ara?st?r?lmas

hareketli

veri

taban

y?onetimi

alan

temel

al?narak

ger?cekle?stirilirken

zamansal

ve

uzaysal

indeksleme

konular?ndan

da

gerekli

yerlerde

faydalan?lm

st?r

Tezin

ba?sl?ca

katk?lar

ce?sitli

deneysel

ara?st?rma

sonu?clar?n?n

sunulmas

yan?nda

baz

matematiksel

analizlerin

ger?cekle?stirilmesi

ve

elde

edilen

sonu?clar

s

g?nda

FP-Index

olarak

adland?rd

g?m?z

yeni

bir

indeksleme

y?ontemin

geli?stirilmesi

olmu?stur

Yeni

y?ontemin

di

ger

indeksleme

y?ontemlerine

olan

ust?unl?u

g?u

matematiksel

analiz

yoluyla

kan?tlanm

st?r

Anahtar

s?ozc?ukler

Hareketli

Veri

Taban

Y?onetimi

Uzaysal

Indeksleme

Dinamik

Oznitelikler

iv

ACKNOWLEDGMENTS

First

and

foremost

I

would

like

to

express

my

deepest

thanks

and

gratitude

to

my

advisor

Asst.

Prof.

Ozg?ur

Ulusoy

for

his

patient

supervision

of

this

thesis

He

granted

me

the

right

amount

of

independence

which

was

particularly

beneficial

to

the

progress

of

this

work

His

kind

acceptance

to

finish

my

thesis

at

this

stage

is

also

deeply

appreciated

Special

thanks

go

also

to

Prof.

Ouri

Wolfson

for

providing

the

substance

of

this

research

work

and

for

his

valuable

comments

I

am

grateful

to

Prof.

Varol

Akman

and

Asst.

Prof.

Attila

G?ursoy

for

reading

the

thesis

and

for

their

instructive

comments

I

would

also

like

to

thank

my

friend

Elkafi

Elhassini

for

his

faith

in

me

and

his

valuable

advice

Finally

My

thanks

go

to

my

brother

Soufien

and

sister

Lamia

for

their

categorical

encouragement

and

insistence

on

my

continuing

in

the

path

of

research

v

Dedicated

to

my

brother

Soufien

and

sister

Lamia

vi

Contents

INTRODUCTION

PROBLEM

DESCRIPTION

Introductory

Notions

The

Quadtree

Method

The

Cross

Points

Method

BACKGROUND

AND

RELATED

WORK

Indexing

in

General

Spatial

Indexing

The

Time

Dimension

Performance

Studies

Mobile

Data

Management

Computational

Geometry

THE

QUADTREE

METHOD

The

Simulation

Model

vii

CONTENTS

viii

Programs

and

Data

Structures

Storage

Requirements

Percentage

Space

Utilization

Build

Cost

An

Optimal

Quadtree

Regeneration

Algorithm

Finding

the

Order

of

Quadtrees

The

Path

Computation

Algorithm

Query

Processing

THE

CROSS

POINTS

METHOD

Program

and

Data

Structures

Performance

Results

A

Critique

of

the

Cross

Points

Method

THE

FP-INDEX

Introduction

Motivation

The

FP-Index

The

Nature

of

ff

and

Time

Units

Build

Cost

Storage

Requirements

and

Utilization

Primary

Memory

Consumption

Insertion

Cost

CONTENTS

ix

Range

Query

Performance

An

Optimization

Algorithm

for

Continuous

Queries

Introductory

Notions

The

Algorithm

Performance

Analysis

Summary

CONCLUSION

Chapter

INTRODUCTION

The

recent

technological

progress

in

portable

laptop

computers

and

the

smaller

palmtop

computers

led

to

the

speculation

that

they

will

be

ubiquitous

in

the

near

future

They

are

becoming

increasingly

more

powerful

cheaper

and

dotted

with

the

ability

to

communicate

with

fixed

networks

via

the

wireless

medium

If

they

become

cheap

enough

we

expect

to

have

hundreds

of

thousands

of

people

-LRB-

some

even

talk

about

millions

-RRB-

moving

around

with

such

devices

each

person

having

his

own

information

needs

Users

information

needs

will

be

particularly

stimulated

with

the

mobile

devices

ability

to

communicate

Both

this

ability

to

communicate

with

hosts

in

a

fixed

network

and

the

expected

information

demands

of

these

mobile

users

challenged

the

research

community

with

new

problems

and

started

up

the

new

research

field

of

mobile

computing

We

are

here

at

one

of

its

very

young

branches

namely

the

field

of

mobile

data

management

The

standard

architecture

of

a

mobile

computing

system

consists

of

a

small

set

of

fixed

hosts

linked

via

a

wide

area

network

and

a

larger

set

of

mobile

computers

which

would

occasionally

request

services

from

the

fixed

hosts

Typically

the

fixed

hosts

have

ample

computational

power

and

a

large

storage

capacity

while

the

mobile

computers

are

limited

by

both

CPU

speed

and

storage

capacity

as

well

as

battery

resources

A

small

set

of

special

fixed

hosts

are

called

mobile

support

stations

and

are

dedicated

to

serving

the

wireless

communication

needs

of

the

mobile

users

and

also

linking

them

to

the

resourceful

CHAPTER

INTRODUCTION

network

which

will

supply

them

with

various

-LRB-

commercial

-RRB-

services

There

then

immediately

arises

the

necessity

to

handle

mobility

of

the

users

-LRB-

among

other

things

-RRB-

Location

is

the

most

important

piece

of

information

in

a

mobile

system

It

gives

rise

for

example

to

a

new

paradigm

of

queries

called

location-dependent

queries

-LSB-

-RSB-

which

are

queries

whose

answer

depends

on

the

location

from

which

they

were

issued

Consider

a

person

driving

a

car

who

occasionally

wants

to

be

informed

about

motels

that

are

within

five

miles

of

his

location

in

order

to

select

a

reasonably

priced

hotel

Such

a

service

would

be

valuable

to

any

traveler

-LRB-

especially

at

night

-RRB-

and

would

indeed

make

his

search

for

a

suitable

motel

a

very

easy

and

comfortable

task

It

is

clear

that

the

set

of

motels

computed

as

an

answer

to

his

query

would

be

different

each

time

his

car

moves

by

a

reasonable

distance

Alternatively

the

driver

could

request

the

information

to

be

continuously

updated

on

his

on-board

computer

screen

as

the

car

moves

For

this

to

be

possible

the

mobile

support

stations

will

need

to

track

his

position

in

an

efficient

way

that

does

not

involve

very

frequent

communication

nor

the

unpleasant

and

unrealistic

prospect

of

having

to

update

the

position

attribute

in

a

quasi-continuous

manner

Remember

also

that

there

might

be

thousands

of

moving

vehicles

each

with

similar

demands

A

solution

that

was

first

proposed

in

-LSB-

-RSB-

is

for

the

moving

object/vehicle

to

supply

its

motion

equation

and

current

position

which

would

then

be

used

by

the

mobile

support

stations

to

predict

the

position

in

the

near

future

This

way

we

will

be

able

to

answer

location-dependent

queries

without

the

need

to

communicate

very

frequently

with

the

moving

object

to

check

its

location

Since

the

motion

equation

is

just

an

approximation

we

expect

that

after

some

time

the

discrepancy

between

the

object

's

real

position

and

its

position

as

perceived

by

the

mobile

support

station

will

reach

an

unacceptable

magnitude

This

may

start

to

compromise

the

correctness

of

the

supplied

answers

However

it

suffices

to

update

the

position

occasionally

-LRB-

or

the

motion

function

or

both

-RRB-

to

remedy

this

problem

The

issue

of

imprecision

modeling

in

the

context

of

this

application

is

treated

in

more

detail

in

-LSB-

WCD

-RSB-

Consider

then

the

case

where

we

have

a

large

number

of

such

mobile

users

CHAPTER

INTRODUCTION

At

any

given

time

we

need

to

track

their

positions

The

focus

of

our

work

is

on

queries

on

the

set

of

objects

themselves

such

as

which

subset

will

cross

a

given

segment

of

space

during

a

given

time

slice

This

is

in

contrast

to

queries

issued

by

the

mobile

objects

seeking

information

about

their

surrounding

space

If

we

view

position

as

one

attribute

of

the

moving

object

then

it

is

indeed

a

peculiar

kind

of

attribute

in

that

it

is

continuously

changing

with

time

without

explicit

continuous

updates

on

the

database

storing

it

Attributes

with

such

a

property

were

called

dynamic

attributes

in

-LSB-

-RSB-

At

this

point

we

are

ready

to

describe

the

goal

of

the

research

work

presented

in

this

thesis

and

state

our

major

contributions

The

purpose

of

this

work

is

to

conduct

a

thorough

experimental

evaluation

of

two

indexing

techniques

for

dynamic

attributes

which

support

a

variety

of

range

searches

Besides

the

experimental

study

which

is

based

on

simulation

we

occasionally

resort

to

modest

mathematical

analysis

of

a

few

performance

parameters

We

present

an

index

construction

algorithm

that

is

optimal

in

the

disk

access

and

CPU

costs

It

is

given

as

an

improvement

over

a

naive

algorithm

The

thesis

is

further

enriched

by

our

contribution

of

a

novel

indexing

method

that

amends

many

of

the

shortcomings

of

the

first

two

In

the

context

of

this

new

method

we

present

an

optimal

query

processing

algorithm

that

handles

one

category

of

queries

very

efficiently

and

can

potentially

reduce

the

cost

of

a

single

query

to

less

than

one

disk

access

We

leave

any

further

details

to

the

forthcoming

chapters

The

outline

of

this

thesis

is

as

follows

In

Chapter

we

describe

the

research

problem

in

full

detail

and

also

introduce

the

two

indexing

techniques

to

be

studied

Chapter

provides

some

background

information

to

introduce

the

field

into

which

our

work

is

situated

We

also

describe

related

work

and

briefly

survey

from

the

literature

what

we

deemed

worth

mentioning

or

what

was

helpful

to

us

in

the

early

stages

of

our

work

The

next

three

chapters

represent

the

core

of

the

thesis

Chapter

provides

the

results

of

studying

the

first

technique

which

is

the

quadtree

method

Chapter

is

dedicated

to

the

second

indexing

technique

called

the

cross

point

method

In

Chapter

we

introduce

our

own

novel

access

method

which

we

dubbed

the

FP-Index

Its

conception

draws

largely

upon

the

insight

gained

from

studying

the

previous

CHAPTER

INTRODUCTION

two

techniques

Finally

we

present

our

conclusions

in

Chapter

Chapter

PROBLEM

DESCRIPTION

In

our

work

we

conduct

a

performance

study

of

two

indexing

techniques

for

dynamic

attributes

The

purpose

of

this

chapter

is

to

elaborate

on

this

problem

statement

and

introduce

the

techniques

to

be

studied

We

start

in

Section

by

introducing

prerequisite

concepts

that

are

central

to

our

study

After

that

we

describe

the

first

technique

which

is

called

the

quadtree

method

in

Section

The

second

technique

named

the

cross

points

is

presented

in

Section

Introductory

Notions

Our

work

is

largely

based

on

the

ideas

introduced

by

Sistla

et

al.

in

-LSB-

-RSB-

The

authors

present

a

new

data

model

suitable

for

representing

moving

objects

in

database

systems

The

model

is

called

the

Moving

Objects

Spatio-Temporal

-LRB-

MOST

-RRB-

data

model

and

relies

on

the

key

idea

of

representing

the

position

as

a

function

of

time

In

other

words

each

object

is

associated

with

a

motion

function

that

allows

us

to

predict

its

position

in

the

future

given

its

position

at

some

point

in

the

past

If

the

position

of

the

moving

object

is

one

of

its

attributes

then

this

technique

allows

us

to

avoid

the

naive

and

unrealistic

scheme

of

having

to

update

the

position

attribute

whenever

it

changes

A

peculiar

property

of

such

an

attribute

is

that

it

changes

continuously

with

CHAPTER

PROBLEM

DESCRIPTION

time

We

are

familiar

with

the

static

attribute

whose

value

changes

in

a

discrete

-LRB-

as

opposed

to

continuous

-RRB-

way

over

time

and

have

to

be

explicitly

updated

upon

each

such

change

Examples

include

the

salary

attribute

in

an

employee

relation

However

we

are

here

faced

with

attributes

that

change

continuously

with

time

without

being

explicitly

updated

-LSB-

-RSB-

Such

attributes

were

given

the

name

dynamic

attributes

by

the

authors

of

-LSB-

-RSB-

Below

we

present

their

description

of

the

characteristics

of

such

attributes

in

the

form

of

a

definition

Definition

A

dynamic

attribute

A

is

represented

by

three

sub-attributes

A

value

A

updatetime

and

A

function

where

A

function

is

a

function

of

a

single

variable

t

that

has

value

at

t

The

semantics

is

that

at

time

A

updatetime

the

value

of

A

is

A

value

and

until

the

next

update

of

A

the

value

of

A

at

time

A

updatetime

is

given

by

A

value

A

function

-LRB-

-RRB-

An

update

of

a

dynamic

attribute

may

change

the

value

or

function

sub-attributes

-LRB-

or

both

-RRB-

We

thus

want

to

explore

how

we

could

efficiently

index

and

retrieve

information

about

such

attributes

We

next

need

to

describe

the

types

of

queries

expected

or

supported

In

-LSB-

-RSB-

three

types

of

queries

are

discerned

for

the

MOST

data

model

These

are

the

instantaneous

the

continuous

and

the

persistent

queries

An

instantaneous

query

submitted

at

time

ti

is

processed

against

the

database

state

at

ti

The

following

example

is

given

in

-LSB-

-RSB-

Display

the

motels

within

miles

of

my

position

A

continuous

query

submitted

at

time

ti

is

processed

against

all

database

states

starting

from

ti

-LRB-

i.e.

-LSB-

ti

-RRB-

-RRB-

It

is

described

as

an

instantaneous

query

being

continuously

reissued

at

each

clock

tick

In

the

motels

example

the

user

will

just

require

to

be

continuously

informed

about

which

motels

are

coming

within

miles

of

his

position

If

we

let

Sj

denote

the

state

of

the

database

at

time

tj

then

at

each

tj

ti

the

continuous

query

is

reevaluated

against

Sj

The

persistent

query

is

a

bit

more

demanding

Like

the

continuous

query

it

has

to

be

evaluated

at

each

clock

tick

after

its

time

of

submission

ti

However

unlike

the

continuous

query

at

tj

it

has

to

be

evaluated

against

the

set

of

states

Si

Si

Sj

Sj

rather

than

against

CHAPTER

PROBLEM

DESCRIPTION

Sj

alone

The

example

query

provided

in

-LSB-

-RSB-

is

the

following

let

me

know

when

the

speed

of

object

o

in

the

direction

of

the

x-axis

doubles

within

minutes

Persistent

queries

arise

in

the

expression

of

temporal

triggers

in

active

database

applications

-LSB-

-RSB-

In

our

research

the

focus

is

on

supporting

instantaneous

and

continuous

queries

However

the

semantics

we

have

in

mind

is

slightly

different

from

that

exhibited

in

the

examples

provided

by

Sistla

et

al.

in

-LSB-

-RSB-

In

the

paper

the

authors

consider

queries

issued

by

the

moving

objects

themselves

-LRB-

i.e.

the

mobile

client

-RRB-

that

mainly

seek

information

about

spatially

static

objects

such

as

motels

restaurants

hospitals

etc.

Our

focus

in

this

study

is

on

range

queries

which

ask

about

the

moving

objects

themselves

The

generic

and

generalized

form

of

our

queries

is

the

following

Give

me

all

the

objects

whose

value

for

attribute

A

falls

in

the

attribute

range

-LSB-

ai

aj

-RSB-

at

some

time

between

time

instances

tb

and

te

Let

tnow

denote

the

time

at

which

the

query

was

submitted

Depending

upon

the

values

for

tb

and

te

we

may

have

any

of

the

following

four

types

of

queries

If

tb

te

tnow

we

have

an

instantaneous

range

query

asking

about

the

present

If

tb

te

ti

and

ti

tnow

we

have

an

instantaneous

range

query

asking

about

the

future

If

tb

tnow

and

te

we

have

a

continuous

range

query

If

tb

ti

and

te

tj

-LRB-

tnow

ti

tj

-RRB-

we

have

a

general

two-dimensional

range

query

over

the

attribute

and

time

dimensions

We

remark

that

in

practice

we

map

the

first

three

types

of

queries

to

the

fourth

one

which

is

more

general

In

instantaneous

range

queries

-LRB-

cases

and

-RRB-

we

approximate

the

time

point

ti

by

the

time

range

-LSB-

ti

ffit

ti

ffit

-RSB-

where

CHAPTER

PROBLEM

DESCRIPTION

time

attribute

o

o

o

o

o

o

Figure

Trajectories

of

moving

objects

in

the

time-attribute

space

ffit

is

a

small

time

lapse

In

continuous

queries

the

theoretically

infinite

range

-LSB-

tb

-RRB-

is

usually

decomposed

into

the

set

of

contiguous

intervals

-LSB-

ti

ti

T

-RSB-

-LSB-

ti

T

ti

T

-RSB-

-LSB-

ti

n?T

ti

-LRB-

n

-RRB-

T

-RSB-

-LRB-

-RRB-

This

again

reduces

it

to

the

fourth

case

We

return

back

to

the

key

idea

behind

the

management

of

dynamic

attributes

As

mentioned

above

we

tame

the

rapid

change

of

object

positions

by

using

a

motion

function

the

idea

is

due

to

-LSB-

-RSB-

Each

object

upon

entering

the

system

supplies

its

current

position

and

its

motion

function

and

may

later

on

update

both

of

them

Since

in

practice

the

objects

will

not

follow

perfectly

their

motion

functions

answers

to

queries

are

only

approximate

and

are

bound

to

contain

some

amount

of

error

This

is

expressed

in

-LSB-

-RSB-

with

the

following

remark

the

answer

to

future

queries

is

tentative

and

should

be

regarded

as

correct

according

to

what

is

currently

known

about

the

real

world

The

work

of

Wolfson

et

al.

-LSB-

WCD

-RSB-

is

devoted

to

this

specific

topic

of

imprecision

and

the

provision

of

bounds

on

the

amount

of

error

However

it

is

more

specialized

to

the

context

of

moving

vehicles

across

a

given

route

In

our

work

we

consider

objects

with

linear

motion

functions

f

-LRB-

t

-RRB-

at

b

no

other

types

of

functions

are

considered

This

work

could

however

in

principle

be

extended

to

quadratic

or

more

complicated

functions

We

leave

that

for

future

work

With

the

motion

function

in

hand

we

could

plot

the

trajectory

of

each

object

in

the

time-attribute

space

as

shown

in

Figure

In

fact

we

propose

to

solve

this

problem

by

representing

the

position

as

a

function

of

time

it

changes

as

time

passes

without

an

explicit

update

CHAPTER

PROBLEM

DESCRIPTION

the

two

indexing

methods

we

study

in

this

thesis

take

the

plotted

trajectories

as

a

starting

point

The

two

methods

are

the

cross

points

and

the

quadtree

method

and

are

due

to

Wolfson

-LSB-

-RSB-

Below

we

describe

the

details

of

each

approach

The

Quadtree

Method

As

we

mentioned

above

since

we

can

plot

the

objects

trajectories

in

twodimensional

space

the

problem

of

dynamic

attribute

indexing

is

transformed

into

a

spatial

indexing

problem

For

this

we

could

draw

upon

the

literature

for

spatial

access

methods

-LSB-

-RSB-

and

adapt

one

access

method

to

our

specific

problem

We

have

selected

the

quadtree

indexing

structure

The

quadtree

is

treated

thoroughly

in

-LSB-

-RSB-

with

several

of

its

variants

The

idea

common

to

all

quadtree

variations

is

the

recursive

decomposition

of

indexed

space

However

we

are

interested

in

the

so

called

region

quadtree

which

is

based

on

the

successive

subdivision

of

space

into

four

equal-sized

quadrants

This

is

shown

in

Figure

Among

the

region

quadtree

variants

we

are

interested

in

a

special

class

called

PR

quadtrees

In

the

PR

quadtree

we

recursively

partition

quadrants

until

we

have

no

more

than

one

data

element

stored

in

every

leaf

The

main

disadvantage

of

this

policy

is

that

if

we

have

two

points

that

are

very

near

to

each

other

we

will

need

to

have

a

very

fine

partitioning

of

indexed

space

just

for

the

sake

of

having

those

two

points

fall

into

different

subquadrants

This

results

in

an

unnecessarily

deep

quadtree

directory

We

note

at

this

point

that

the

quadtree

is

mainly

used

as

an

in-memory

index

Samet

's

discussion

of

quadtree

variants

in

-LSB-

-RSB-

draws

largely

from

its

use

in

image

processing

applications

Adaptation

of

the

PR

quadtree

to

handle

data

stored

in

disk

pages

yields

the

so

called

bucket

PR

quadtree

In

the

bucket

PR

quadtree

given

a

set

of

N

points

we

partition

the

indexed

space

recursively

until

no

more

than

B

points

fall

in

every

single

subquadrant

We

call

B

the

bucket

size

Typically

B

will

be

equal

to

the

number

of

data

records

that

fit

in

a

single

disk

page

Let

us

then

look

into

the

structure

of

the

quadtree

directory

CHAPTER

PROBLEM

DESCRIPTION

North-West

North-East

South-West

South-East

time

attribute

A

min

max

A

t

i

t

i

T

indexed

space

Figure

Partitioning

of

the

indexed

space

in

the

region

quadtree

X

Y

X

Y

SW

NW

NE

SE

Size

Type

Disk

Page

min

min

max

max

Parent

Figure

Record

structure

of

the

quadtree

node

Like

a

binary

tree

a

node

in

the

quadtree

directory

has

to

embody

enough

information

to

direct

the

search

for

data

to

the

appropriate

lower

subtrees

In

other

words

it

has

to

ensure

proper

branching

It

also

has

to

have

pointers

to

its

four

subtrees

This

is

the

minimum

information

that

we

have

to

include

in

the

record

definition

for

quadtree

nodes

For

the

information

that

guides

searches

we

choose

to

include

the

boundaries

of

the

subquadrants

of

space

that

is

being

indexed

by

the

tree

rooted

at

the

current

node

The

coordinates

-LRB-

Xmin

Ymin

-RRB-

and

-LRB-

Xmax

Ymax

-RRB-

of

the

lower

left

and

upper

right

corners

-LRB-

respectively

-RRB-

of

the

indexed

quadrant

are

enough

We

then

need

four

pointers

to

the

south-west

north-west

north-east

and

south-east

children

of

the

node

These

will

take

the

value

if

the

node

is

a

leaf

node

The

complete

record

structure

of

a

quadtree

node

is

shown

in

Figure

The

Parent

field

points

to

the

parent

node

and

takes

the

value

for

the

case

of

the

root

The

Size

field

counts

the

number

of

index

elements

in

the

data

page

pointed

to

by

a

leaf

node

It

is

needed

to

detect

bucket

overflow

and

underflow

and

is

not

used

for

internal

nodes

The

Type

field

differentiates

between

leaf

and

internal

nodes

for

the

search

insertion

and

deletion

operations

Finally

the

disk

page

field

is

a

pointer

to

the

page

on

the

disk

which

contains

the

data

points

falling

CHAPTER

PROBLEM

DESCRIPTION

in

the

subquadrant

indexed

by

the

current

node

This

field

is

also

active

only

in

leaf

nodes

and

is

not

used

by

internal

nodes

We

then

look

at

how

we

adapt

the

bucket

PR

quadtree

to

our

application

The

idea

is

the

following

We

start

with

an

empty

data

page

that

is

supposed

to

contain

index

elements

from

the

whole

data

space

Every

trajectory

is

known

to

cross

the

initial

quadrant

since

it

encompasses

the

whole

data

space

Because

of

this

we

insert

the

first

B

trajectories

associated

data

with

no

problem

The

index

elements

consist

of

the

object

ID

together

with

the

intercept

b

and

slope

a

of

its

trajectory

's

equation

f

-LRB-

t

-RRB-

at

b

A

bucket

split

will

occur

at

the

B

insertion

it

is

executed

as

follows

We

take

the

-LRB-

a

b

-RRB-

pair

of

each

object

in

the

bucket

and

use

it

in

conjunction

with

the

bucket

boundaries

Xmin

Ymin

Xmax

Ymax

to

find

out

which

of

the

four

subquadrants

the

trajectory

crosses

We

then

insert

the

corresponding

ID

a

b

record

in

every

crossed

subquadrant

-LRB-

there

can

be

at

most

three

out

of

four

-RRB-

An

example

of

this

is

shown

in

Figures

and

A

bucket

split

requires

that

we

allocate

four

new

disk

pages

one

for

each

subquadrant

Upon

completion

of

bucket

split

computations

the

father

data

page

is

disposed

of

The

leaf

quadtree

node

that

was

pointing

to

it

must

itself

allocate

memory

for

four

leaf

nodes

which

will

point

to

the

four

newly

allocated

disk

pages

It

thus

becomes

an

internal

node

Furthermore

the

boundaries

of

the

four

subquadrants

have

to

be

computed

from

the

boundaries

of

the

father

quadrant

In

our

application

the

quadtree

directory

consisting

of

the

search

nodes

will

reside

in

memory

whereas

data

pages

are

on

the

disk

Once

the

application

is

running

and

the

tree

has

been

constructed

we

would

execute

a

search

for

an

object

or

trajectory

in

the

following

manner

The

linear

motion

equation

f

-LRB-

t

-RRB-

at

b

is

our

search

key

and

the

ID

of

the

search

object

is

used

once

we

reach

the

relevant

data

pages

Starting

at

the

root

of

the

quadtree

we

use

the

-LRB-

a

b

-RRB-

pair

and

the

boundary

fields

Xmin

Ymin

Xmax

and

Ymax

found

in

the

root

to

decide

which

ways

to

go

that

is

which

subquadrants

are

crossed

by

the

sought

object

We

then

descend

the

next

level

and

repeat

the

same

thing

until

we

reach

the

relevant

leaves

at

which

point

we

use

the

disk

page

pointer

field

to

bring

the

relevant

data

pages

into

the

buffer

-LRB-

if

they

are

not

there

-RRB-

The

difference

between

the

quadtree

and

the

binary

tree

searches

CHAPTER

PROBLEM

DESCRIPTION

NW

SE

NE

-LRB-

a

-RRB-

Figure

An

object

's

trajectory

crossing

the

north-east

subquadrant

of

a

larger

quadrant

NW

SE

-LRB-

b

-RRB-

NE-NE

NE-NW

NE-SE

NE-SW

Figure

Upon

overflow

the

father

quadrant

itself

splits

into

four

subquadrants

and

the

object

generates

three

copies

in

the

south-west

north-west

and

north-east

subquadrants

is

that

in

the

binary

tree

we

branch

only

one

way

while

in

our

application

of

the

quadtree

we

can

have

up

to

three

ways

to

branch

from

a

single

index

node

The

search

procedure

as

described

is

the

basis

of

insertion

deletion

and

update

operations

Traversal

of

the

quadtree

to

answer

range

queries

is

done

in

an

analogous

manner

except

that

the

search

key

consists

of

the

boundaries

of

the

range

and

we

check

for

overlap

between

the

range

and

the

quadrant

at

each

node

reached

The

study

of

performance

of

the

quadtree

method

is

presented

in

Chapter

The

Cross

Points

Method

The

idea

of

the

cross

points

method

is

illustrated

in

Figure

for

a

simple

system

with

only

three

objects

A

cross

point

is

the

name

given

to

the

intersection

between

two

trajectories

Given

the

plotted

trajectories

we

record

all

the

intersections

between

all

the

pairs

of

objects

-LRB-

or

only

those

which

will

take

place

in

the

near

future

-RRB-

An

intersection

or

a

cross

point

is

defined

by

the

time

tCP

at

which

it

takes

place

and

the

IDs

of

the

two

objects

participating

in

it

Now

since

at

any

point

in

time

ti

each

object

has

a

fixed

value

on

the

attribute

dimension

computable

from

its

associated

linear

function

of

time

CHAPTER

PROBLEM

DESCRIPTION

time

attribute

o

o

o

Before

t

Between

t

After

t

t

t

a

a

a

and

t

a

a

a

a

a

a

Figure

The

basic

idea

of

the

cross

points

method

between

intersection

events

the

order

is

fixed

there

is

a

unique

ordering

O

-LRB-

ti

-RRB-

aiN

of

the

attribute

values

of

the

objects

in

the

system

The

key

observation

upon

which

the

method

is

based

is

that

between

any

two

cross

point

events

the

ordering

of

the

objects

attribute

values

does

not

change

More

formally

if

and

are

the

times

at

which

the

first

and

second

intersection

events

took

place

then

-LSB-

tCP

-RRB-

we

have

O

-LRB-

t

-RRB-

O

-LRB-

-RRB-

It

then

suffices

to

store

this

order

in

any

unidimensional

index

or

data

structure

and

maintain

it

whenever

an

intersection

event

takes

place

by

simply

flipping

the

order

of

the

two

objects

which

intersected

Between

cross

point

events

we

are

able

to

answer

any

instantaneous

range

queries

about

the

present

by

executing

a

range

search

over

the

indexing

structure

and

retrieving

the

IDs

of

all

the

objects

found

in

the

range

A

few

observations

are

in

order

It

is

immediately

clear

that

for

N

objects

we

have

to

store

N

data

elements

or

records

In

other

words

no

duplication

of

any

kind

is

necessary

Moreover

we

also

have

to

store

information

about

all

the

cross

point

events

that

will

take

place

in

the

future

To

do

this

we

compute

the

forthcoming

intersection

events

periodically

Denote

the

period

by

T

More

precisely

at

time

point

ti

we

compute

all

the

cross

points

which

occur

in

the

future

time

slice

-LSB-

ti

ti

T

-RSB-

For

this

reason

we

call

T

the

lookahead

interval

Another

important

observation

is

that

we

have

to

store

the

cross

points

in

sorted

order

according

to

their

occurrence

in

time

We

finally

state

that

the

cross

points

method

does

not

support

continuous

queries

The

problem

of

adapting

it

to

do

so

is

left

as

a

future

work

We

have

chosen

the

binary

tree

as

the

data

structure

for

storing

CHAPTER

PROBLEM

DESCRIPTION

the

sorted

attribute

order

of

the

N

objects

in

the

system

Besides

we

store

the

set

of

forthcoming

intersection

events

in

a

linked

list

with

the

earliest

cross

point

at

the

head

of

the

list

The

study

of

performance

of

the

cross

points

method

is

presented

in

Chapter

Chapter

BACKGROUND

AND

RELATED

WORK

In

this

chapter

we

provide

an

overview

of

the

relevant

research

literature

and

introduce

the

necessary

background

for

the

coming

chapters

In

Section

we

talk

about

the

indexing

problem

in

general

Section

introduces

the

particular

field

of

spatial

indexing

Section

talks

about

access

methods

that

involve

the

time

dimension

In

Section

we

talk

about

performance

evaluation

studies

and

introduce

major

performance

criteria

for

assessing

indexing

techniques

In

Section

we

introduce

the

field

of

mobile

data

management

Finally

we

include

a

brief

mention

of

the

field

of

computational

geometry

in

Section

Indexing

in

General

Indexing

is

at

the

heart

of

the

field

of

database

management

Whenever

there

is

a

repository

of

data

there

immediately

arises

the

problem

of

accessing

it

efficiently

which

is

the

indexing

problem

stated

in

its

most

general

form

Over

the

past

decades

the

research

community

has

continuously

been

challenged

by

new

forms

of

the

indexing

problem

Factors

accounting

for

this

renewal

include

the

advent

of

new

hardware

new

disk

technologies

the

prospects

of

CHAPTER

BACKGROUND

AND

RELATED

WORK

exploiting

concurrency

or

parallelism

and

above

all

new

kinds

of

data

and

more

challenging

database

sizes

These

factors

stimulated

researchers

to

design

new

access

methods

and

improvements

or

variants

of

existing

ones

The

purpose

of

this

section

is

to

report

on

prior

work

on

indexing

that

is

most

relevant

to

our

research

or

that

helped

us

in

indirect

ways

to

improve

our

understanding

of

the

indexing

problem

The

ubiquitous

B-tree

-LSB-

-RSB-

-LRB-

and

its

even

more

ubiquitous

variant

the

B

tree

-RRB-

is

the

father

of

many

of

today

's

popular

access

methods

It

is

the

successful

secondary

storage

indexing

solution

for

single

attribute

data

over

an

ordered

attribute

space

We

assume

the

reader

is

familiar

with

its

basic

principles

We

just

remind

here

that

the

B

tree

stores

all

data

records

at

the

leaf

nodes

and

uses

the

non-leaf

nodes

-LRB-

index

nodes

-RRB-

only

as

a

search

directory

The

B-tree

on

the

other

hand

uses

the

nodes

as

both

a

data

repository

and

an

indexing

directory

The

typically

large

fanout

of

B-trees

has

the

consequence

that

the

height

of

the

B-tree

index

rarely

exceeds

two

-LSB-

-RSB-

Given

that

the

root

is

always

stored

in

main

memory

most

insertions

deletions

and

exact

match

queries

require

no

more

than

four

disk

accesses

-LSB-

-RSB-

B-trees

continue

to

be

studied

until

recently

though

from

different

perspectives

An

example

is

the

field

of

concurrency

control

where

special

techniques

were

needed

to

prevent

indices

from

becoming

concurrency

bottlenecks

-LSB-

-RSB-

B-tree

concurrency

control

algorithms

were

experimentally

evaluated

in

-LSB-

-RSB-

where

more

than

a

dozen

such

algorithms

are

cited

In

-LSB-

-RSB-

an

attempt

is

made

to

parallelize

B-trees

by

storing

a

single

B-tree

on

multiple

disks

Among

the

techniques

proposed

are

record

distribution

that

relies

on

partitioning

the

key

space

page

distribution

and

the

use

of

large

pages

where

each

page

is

fragmented

and

its

fragments

are

stored

on

multiple

disks

Underlying

B

trees

is

a

general

philosophy

of

indexing

captured

in

Lomet

's

notion

of

Grow

and

Post

Index

Trees

-LRB-

GP-trees

-RRB-

which

describe

a

class

of

methods

The

main

characteristics

are

given

in

the

following

excerpt

taken

from

-LSB-

-RSB-

GP-trees

have

nodes

that

map

to

disk

blocks

and

possess

a

growth

paradigm

in

which

adding

data

in

a

key

range

leads

eventually

to

CHAPTER

BACKGROUND

AND

RELATED

WORK

growth

in

the

space

used

locally

to

hold

it

together

with

the

posting

of

a

new

index

term

or

terms

for

the

growing

space

to

parent

nodes

According

to

Lomet

B-trees

represent

both

the

genesis

and

the

archetype

of

the

class

of

GP

methods

-LSB-

-RSB-

The

paper

provides

an

interesting

insight

and

many

useful

remarks

on

access

methods

in

general

and

guidelines

on

adapting

GP-tree

like

indices

to

spatial

data

Remember

that

growth

of

B

trees

occurs

by

splitting

a

full

node

into

two

reducing

the

local

storage

utilization

from

to

This

results

in

an

average

space

utilization

of

about

-LSB-

-RSB-

In

-LSB-

-RSB-

and

-LSB-

-RSB-

a

new

technique

called

partial

expansion

is

used

that

improves

utilization

to

In

this

technique

two

node

sizes

are

used

a

small

and

a

large

one

When

a

small

node

overflows

instead

of

doubling

space

locally

through

splitting

its

data

into

two

small

nodes

the

small-sized

node

is

replaced

by

the

large-sized

one

-LRB-

which

obviously

is

less

than

double

the

size

of

small

nodes

-RRB-

When

the

large

node

in

turn

overflows

it

is

replaced

by

two

small

nodes

This

way

growth

is

more

smooth

since

doubling

of

local

space

occurs

over

two

steps

The

papers

include

a

thorough

analysis

of

the

technique

considering

also

its

more

generalized

version

where

doubling

occurs

over

an

arbitrary

-LRB-

finite

-RRB-

number

of

steps

The

same

problem

of

improving

bucket

utilization

is

explored

in

-LSB-

-RSB-

in

the

context

of

spatial

data

and

for

k-d

tree

based

access

methods

The

heuristic

used

is

essentially

the

same

In

order

to

improve

the

bucket

utilization

bucket

splits

have

to

be

avoided

whenever

possible

-LSB-

-RSB-

The

idea

is

to

perform

local

redistributions

of

objects

over

adjacent

buckets

provided

this

does

not

increase

the

imbalance

of

the

indexing

structure

From

this

more

or

less

general

exposition

on

indexing

we

move

to

the

more

specialized

field

of

spatial

data

indexing

Spatial

Indexing

Spatial

data

is

simply

n-dimensional

data

defined

over

the

n-dimensional

Euclidean

space

It

ranges

from

a

set

of

points

in

space

-LRB-

which

is

the

focus

of

our

specific

research

problem

-RRB-

to

a

set

of

points

in

n-dimensional

space

-LRB-

n

-RRB-

where

we

have

the

problem

of

multiattribute

indexing

In

both

CHAPTER

BACKGROUND

AND

RELATED

WORK

cases

we

have

points

which

are

objects

of

zero

size

Alternatively

we

may

have

objects

of

non-zero

size

which

range

from

a

collection

of

-LRB-

-RRB-

rectangles

to

hyperrectangles

and

hypervolumes

in

n-dimensional

space

The

B

tree

being

essentially

for

single

attribute

indexing

or

unidimensional

data

is

not

suitable

for

solving

the

spatial

indexing

problem

A

classical

source

on

spatial

data

structures

is

-LSB-

-RSB-

Samet

's

treatment

of

the

subject

is

divided

into

point

data

curvilinear

data

volume

data

and

data

that

consist

of

a

collection

of

small

rectangles

-LRB-

a

typical

VLSI

application

-RRB-

The

emphasis

is

on

hierarchical

methods

that

rely

on

a

recursive

decomposition

of

the

indexed

space

into

disjoint

subspaces

-LSB-

-RSB-

identifies

four

major

application

domains

of

spatial

data

management

These

are

mechanical

CAD

-LRB-

described

as

the

application

with

the

most

demanding

geometrical

requirements

-RRB-

and

constructive

solid

geometry

VLSI

CAD

vision

systems

-LRB-

in

robotics

and

manufacturing

-RRB-

and

geographic

and

cartographic

applications

-LRB-

which

are

most

relevant

to

our

problem

-RRB-

These

have

given

rise

to

novel

access

methods

which

themselves

stimulated

many

improvements

yielding

several

variants

Let

us

then

mention

some

notable

spatial

indexing

techniques

One

of

the

most

popular

spatial

indices

is

the

R-tree

-LSB-

-RSB-

It

associates

with

each

object

its

minimal

bounding

rectangle

-LRB-

MBR

-RRB-

-LRB-

-LSB-

-RSB-

-LSB-

-RSB-

-LSB-

an

bn

-RSB-

-RRB-

where

-LSB-

ai

bi

-RSB-

denotes

the

extent

of

the

object

along

the

ith

dimension

The

indexed

space

is

also

represented

by

similar

n-dimensional

hyperrectangles

and

the

index

structure

is

similar

to

that

of

the

B-tree

Each

index

node

is

an

array

of

entries

wherein

each

entry

contains

the

n

boundaries

of

a

hyperrectangle

and

a

pointer

to

the

node

encompassing

all

objects

whose

MBRs

are

contained

in

that

hyperrectangle

A

peculiar

feature

of

the

R-tree

is

that

the

indexing

hyperrectangles

may

overlap

This

means

that

the

indexed

space

is

not

divided

into

disjoint

subspaces

The

consequence

of

this

on

the

search

operation

is

that

more

than

one

subtree

under

a

node

visited

may

need

to

be

searched

-LSB-

-RSB-

This

is

because

an

object

's

bounding

rectangle

may

be

situated

inside

two

or

more

covering

-LRB-

and

overlapping

-RRB-

hyperrectangles

An

example

of

this

for

the

two

dimensional

case

is

depicted

in

Figures

and

Furthermore

insertions

and

splits

require

some

reorganizations

and

make

use

CHAPTER

BACKGROUND

AND

RELATED

WORK

MBR

indexed

space

H

H

Figure

Overlapping

hyperrectangles

in

R-tree

representation

of

the

indexed

space

H

H

index

node

P

P

Figure

Both

pointers

and

will

have

to

be

followed

when

searching

for

object

o

bounded

by

MBR

of

a

heuristic

optimization

which

consists

of

trying

to

minimize

the

area

of

the

hyperrectangles

that

encompass

objects

MBRs

Several

variants

of

the

R-tree

have

been

proposed

in

the

literature

Among

them

we

count

the

R

tree

-LSB-

-RSB-

and

the

R

tree

-LSB-

-RSB-

In

the

latter

Beckmann

et

al.

question

the

choice

of

the

heuristic

that

minimizes

the

area

of

hyperrectangles

and

propose

to

minimize

the

overlap

between

them

the

overall

storage

utilization

and

the

of

hyperrectangles

A

more

recent

proposal

is

the

X-tree

-LSB-

-RSB-

which

starts

from

the

observation

that

R-tree

like

index

structures

are

not

adequate

for

indexing

high-dimensional

data

sets

An

emphasis

is

again

put

on

minimizing

the

overlap

between

the

index

's

bounding

boxes

and

the

so

called

supernodes

are

used

to

mitigate

the

effects

of

high

overlap

which

quickly

becomes

a

dominant

phenomenon

at

higher

dimensionality

Another

recent

R-tree

based

index

is

the

SS-tree

-LSB-

-RSB-

which

uses

ellipsoid

bounding

regions

Other

spatial

access

methods

include

the

filter

tree

of

Sevcik

and

Koudas

-LSB-

-RSB-

It

is

based

on

the

principle

of

separating

the

objects

by

size

placing

larger

objects

at

higher

levels

of

the

tree

and

smaller

ones

at

the

bottom

levels

It

yields

good

performance

for

range

queries

and

spatial

joins

A

spatial

index

that

departs

slightly

from

the

R-tree

is

the

cell

tree

of

G?unther

and

Bilmes

-LSB-

-RSB-

It

solves

the

same

problem

of

indexing

multidimensional

objects

of

margin

is

the

sum

of

the

lengths

of

the

edges

of

a

rectangle

-LSB-

-RSB-

CHAPTER

BACKGROUND

AND

RELATED

WORK

non-zero

size

but

does

not

use

bounding

rectangles

Instead

it

uses

clipping

and

represents

objects

as

unions

of

convex

cells

called

convex

chains

Cell

trees

are

height-balanced

and

have

the

same

structure

as

R-trees

except

that

hyperrectangles

in

index

nodes

are

replaced

by

convex

polyhedra

All

the

above

methods

are

for

objects

of

non-zero

size

in

n-dimensional

space

Another

version

of

the

spatial

indexing

problem

alluded

to

earlier

is

multiattribute

indexing

where

objects

are

simply

points

in

n-dimensional

space

An

example

of

such

access

methods

is

Lomet

and

Salzberg

's

hB-tree

or

holey

brick

B-tree

-LSB-

-RSB-

It

is

also

similar

in

spirit

to

the

B-tree

but

its

indexed

regions

may

have

holes

or

are

bricks

with

perhaps

smaller

bricks

removed

from

them

The

list

of

spatial

access

methods

is

definitely

long

We

should

mainly

retain

that

we

are

indexing

a

two-dimensional

space

where

time

is

one

of

the

dimensions

For

this

reason

both

spatial

indexing

structures

and

indexes

where

the

time

dimension

is

involved

might

prove

useful

in

our

research

The

Time

Dimension

Since

we

are

indexing

data

that

changes

dynamically

over

time

the

notion

of

time

is

crucial

when

approaching

our

problem

A

brief

digression

on

access

methods

which

involve

time

is

in

place

Relevant

areas

include

mainly

temporal

and

multiversion

access

methods

A

prominent

temporal

index

is

the

time

index

-LSB-

-RSB-

Data

records

have

interval

attributes

of

the

form

-LSB-

ts

te

-RSB-

recording

the

start

and

ending

of

the

record

's

valid

time

Since

there

is

a

total

order

on

the

values

of

ts

and

te

in

the

system

they

could

be

used

for

indexing

Quoting

Elmasri

et

al.

-LSB-

-RSB-

the

idea

behind

our

time

index

is

to

maintain

a

set

of

linearly

ordered

indexing

points

on

the

time

dimension

In

fact

they

use

the

points

ts

and

te

in

conjunction

with

a

simple

B

tree

An

append

only

policy

is

adopted

where

no

deletions

are

allowed

so

that

the

database

size

can

potentially

grow

without

bounds

To

remedy

this

Elmasri

et

al.

assume

the

existence

of

a

purge

mechanism

which

cuts

off

data

pages

that

are

old

enough

or

transfers

them

to

archival

storage

The

time

index

is

important

to

us

mainly

because

we

suspect

CHAPTER

BACKGROUND

AND

RELATED

WORK

that

it

might

somehow

be

adapted

to

solve

our

problem

In

fact

an

interesting

research

problem

is

whether

we

could

map

our

problem

of

indexing

dynamic

attributes

to

the

temporal

indexing

domain

Another

question

is

whether

we

could

have

in

our

solution

a

way

to

purge

old

data

This

would

relieve

us

of

the

need

to

destroy

and

rebuild

our

index

periodically

The

latter

property

is

more

pronounced

in

the

so

called

time-split

B-tree

or

TSB-tree

of

Lomet

and

Salzberg

-LSB-

-RSB-

It

is

an

access

method

for

multiversion

data

that

also

follows

a

non-delete

policy

and

migrates

data

incrementally

from

a

magnetic

disk

to

an

optical

disk

In

the

TSB-tree

nodes

both

timestamps

and

keys

are

used

for

indexing

When

data

nodes

overflow

they

could

be

split

either

on

the

key

or

timestamp

-LRB-

hence

time

-RRB-

attributes

Splits

based

on

timestamps

are

called

time

splits

and

are

the

mechanism

for

purging

historical

data

one

node

at

a

time

-LSB-

-RSB-

Our

interest

in

the

TSB-tree

comes

from

its

smooth

progress

along

the

time

dimension

as

newer

timestamps

dominate

the

tree

and

older

data

are

moved

to

optical

-LRB-

write-once

-RRB-

disks

where

they

become

historical

data

Although

the

methods

we

study

in

this

thesis

for

dynamic

attribute

indexing

do

not

have

such

a

feature

we

would

still

like

to

find

one

that

supports

it

In

-LSB-

-RSB-

an

analytic

and

experimental

study

of

the

TSB-tree

's

performance

is

provided

We

remark

that

many

multiversion

access

structures

are

based

on

the

B

tree

This

is

mainly

because

a

partial

order

could

easily

be

imposed

on

timestamps

or

valid

times

Lanka

and

Mays

-LSB-

-RSB-

propose

what

they

call

a

fully

persistent

B

tree

for

multiversion

data

where

they

use

a

graph

for

storing

the

information

on

the

partial

order

formed

by

versions

In

-LSB-

BGO

-RSB-

a

technique

is

presented

for

transforming

a

normal

-LRB-

single

version

-RRB-

B-tree

into

a

multiversion

B-tree

The

authors

claim

that

the

technique

is

general

and

could

apply

to

a

number

of

spatial

and

non-spatial

hierarchical

external

access

structures

Furthermore

the

resulting

multiversion

B-tree

is

proved

to

be

asymptotically

optimal

in

the

worst

case

in

time

and

space

for

several

operations

and

queries

CHAPTER

BACKGROUND

AND

RELATED

WORK

Performance

Studies

A

performance

study

whether

analytic

or

experimental

is

an

integral

part

of

any

work

on

access

methods

Moreover

comparative

studies

are

more

important

once

a

multitude

of

indexing

techniques

have

been

proposed

as

solutions

to

the

same

problem

Zobel

et

al.

-LSB-

-RSB-

list

four

principal

ways

of

comparing

algorithms

such

as

indexing

techniques

which

are

direct

argument

mathematical

modeling

simulation

and

experiment

Our

work

is

largely

based

on

simulation

experiments

However

where

experiments

are

missing

we

resort

to

argumentation

and

also

make

modest

attempts

at

providing

a

mathematical

analysis

whenever

it

illuminates

better

and

improves

understanding

Our

interest

in

performance

studies

is

three-fold

First

we

would

like

to

have

an

idea

about

the

real

values

used

in

the

literature

for

some

hardware

parameters

such

as

typical

disk

page

sizes

buffer

sizes

or

disk

access

times

Let

us

take

the

example

of

page

size

for

which

we

adopt

the

value

of

Kilobytes

This

is

a

standard

value

which

we

found

in

most

experimental

studies

-LSB-

-RSB-

In

-LSB-

-RSB-

Salzberg

states

the

following

in

minimum

size

pages

are

usually

In

-LSB-

-RSB-

G?unther

and

Bilmes

base

their

experiments

on

page

sizes

of

bytes

bytes

and

bytes

this

is

the

only

exception

we

found

Another

example

parameter

is

the

time

it

takes

to

access

or

fetch

a

disk

page

We

use

minimum

and

maximum

values

of

msec

and

msec

respectively

Again

Salzberg

-LSB-

-RSB-

states

that

each

fetch

of

a

page

takes

about

msec

on

average

on

the

fastest

disk

drives

We

quote

a

more

accurate

characterization

of

disk

access

cost

from

-LSB-

-RSB-

In

the

following

we

assume

an

average

seek

time

of

msec

an

average

latency

time

of

msec

and

a

transfer

time

for

one

page

-LRB-

i.e.

for

KB

-RRB-

of

msec

These

parameters

are

typical

values

for

current

disks

and

result

in

msec

for

reading

a

page

The

second

reason

why

we

are

interested

in

surveying

performance

studies

is

to

have

an

idea

about

the

comparative

behavior

of

the

important

and

popular

access

methods

in

the

literature

We

have

to

say

however

that

studies

comparing

more

than

two

methods

are

rare

A

notable

example

of

such

a

study

is

CHAPTER

BACKGROUND

AND

RELATED

WORK

the

comparative

performance

evaluation

of

spatial

access

methods

conducted

by

Greene

-LSB-

-RSB-

Four

indexing

schemes

were

implemented

which

are

the

R

tree

R

tree

K-D-B-tree

and

The

paper

concludes

that

the

R-tree

provides

the

best

tradeoff

between

performance

and

implementation

complexity

The

study

is

based

on

real

implementation

within

the

POSTGRES

system

which

makes

it

more

reliable

Another

work

dedicated

to

the

comparison

of

several

access

methods

is

-LSB-

-RSB-

The

paper

contains

two

separate

parts

one

for

point

access

methods

-LRB-

objects

of

zero

size

-RRB-

and

one

for

spatial

access

methods

In

sum

eight

indexing

structures

were

implemented

and

evaluated

The

paper

also

departs

from

the

uniformly

distributed

data

assumption

-LRB-

so

prevalent

in

the

literature

-RRB-

and

uses

skewed

data

trying

several

probability

distributions

beside

real

data

Finally

the

third

reason

behind

our

interest

in

performance

studies

is

to

survey

the

major

performance

parameters

In

simpler

words

we

want

to

see

what

it

takes

to

be

a

good

access

method

Among

the

parameters

one

has

to

keep

an

eye

on

when

designing

analyzing

or

assessing

an

access

method

we

list

the

following

Disk

storage

requirements

of

the

resulting

indexed

data

Primary

and

secondary

-LRB-

if

index

nodes

may

reside

on

the

disk

-RRB-

memory

requirements

of

the

indexing

nodes

-LRB-

or

index

's

directory

-RRB-

The

ratio

of

directory

pages

to

data

pages

The

height

of

the

index

The

time

needed

to

construct

the

index

-LRB-

especially

if

it

has

to

be

reconstructed

periodically

-RRB-

The

auxiliary

temporary

memory

needed

to

construct

the

index

The

disk

access

cost

of

insertions

deletions

and

updates

Point

and

range

search

costs

-LRB-

in

terms

of

number

of

disk

accesses

-RRB-

Average

memory/storage

utilization

-LRB-

a

figure

of

is

considered

acceptable

-RRB-

-LSB-

-RSB-

CHAPTER

BACKGROUND

AND

RELATED

WORK

The

cost

of

any

auxiliary

maintenance

operations

necessary

for

the

proper

functioning

of

the

index

Performance

under

non-uniform

-LRB-

even

ugly

-RRB-

data

distributions

Scalability

to

larger

database

sizes

Existence

of

opportunities

to

exploit

parallelism

and

concurrency

on

both

the

index

nodes

-LRB-

or

directory

-RRB-

and

data

nodes

Ease

of

implementation

and

simplicity

of

associated

algorithms

However

we

do

not

expect

any

single

access

method

to

score

positively

on

all

these

criteria

As

Zobel

et

al.

note

no

indexing

scheme

is

all

powerful

-LSB-

-RSB-

Mobile

Data

Management

The

field

of

mobile

data

management

represents

the

larger

context

into

which

our

research

problem

fits

Recent

technological

developments

that

made

portable

computers

more

powerful

and

cheap

started

up

the

new

field

of

mobile

computing

The

advent

of

palmtop

computers

capable

of

running

a

number

of

popular

applications

led

to

the

speculation

that

such

devices

will

be

ubiquitous

in

the

near

future

Indeed

Dunham

and

Helal

-LSB-

-RSB-

use

the

year

in

a

fictitious

example

comparing

a

transaction

in

the

present

with

its

counterpart

in

the

mobile

world

of

On

the

power

of

recent

laptop

computers

Alonso

and

Korth

-LSB-

-RSB-

remark

that

laptops

have

become

capacious

enough

to

hold

databases

that

would

have

been

called

very

large

not

too

long

ago

and

fast

enough

to

support

complex

database

operations

Mobility

has

thus

stirred

up

the

research

community

to

deal

with

new

challenging

problems

We

might

safely

say

that

both

mobile

computing

and

mobile

data

management

have

just

been

born

as

research

fields

Satyanarayanan

in

a

paper

entitled

Fundamental

Challenges

in

Mobile

Computing

-LSB-

-RSB-

attempts

to

answer

the

question

what

is

unique

and

conceptually

different

about

mobile

computing

and

provides

fertile

topics

for

exploration

This

shows

that

the

CHAPTER

BACKGROUND

AND

RELATED

WORK

field

of

mobile

computing

is

still

trying

to

define

its

problems

As

for

the

field

of

mobile

data

management

it

recently

witnessed

a

series

of

papers

all

of

which

attempting

to

answer

basically

the

same

question

namely

what

new

research

problems

does

mobility

bring

about

into

the

field

of

data

management

-LSB-

-RSB-

A

cursory

survey

of

activity

in

the

field

leads

us

to

suggest

that

the

year

is

the

birth

date

of

mobile

data

management

There

has

been

very

faint

activity

-LRB-

to

the

best

of

our

knowledge

-RRB-

in

-LRB-

but

see

-LSB-

-RSB-

-RRB-

In

this

latter

paper

Imielinski

and

Badrinath

forward

the

following

remark

in

their

section

on

future

work

the

research

work

described

in

this

paper

is

to

our

knowledge

one

of

the

few

efforts

that

is

addressing

issues

of

information

access

in

a

mobile

distributed

environment

In

a

paper

-LSB-

-RSB-

Wolfson

describes

a

new

project

in

which

the

problem

of

efficiently

allocating

and

deallocating

copies

of

data

items

residing

in

databases

to

mobile

computers

is

investigated

In

general

major

areas

of

impact

of

mobility

include

query

processing

transaction

processing

location

management

replication

management

handling

disconnection

coping

with

scale

and

security

There

is

ongoing

research

and

preliminary

solutions

have

been

proposed

in

most

of

these

areas

However

we

will

not

attempt

to

present

them

here

-LSB-

-RSB-

explores

the

impact

of

mobility

on

real-time

mobile

data

management

Finally

we

mention

a

narrower

field

which

fits

more

as

a

context

for

our

work

this

is

the

area

of

vehicle

navigation

systems

-LSB-

-RSB-

It

seems

to

combine

all

of

the

fields

mentioned

above

so

that

we

need

spatial

mobile

and

real-time

data

management

It

is

directly

related

to

our

research

problem

as

we

are

basically

indexing

data

that

is

rapidly

changing

over

time

A

relevant

work

in

this

area

is

that

of

Shekhar

and

Yang

-LSB-

-RSB-

where

indexing

is

also

considered

in

the

context

of

intelligent

vehicle

navigation

systems

Their

index

is

called

MoBiLe

file

and

maps

the

two-dimensional

space

of

motion

to

the

disk

tracks

and

sectors

while

attempting

to

preserve

proximity

relationships

This

map

requires

a

mapping

function

and

knowledge

about

the

population

distribution

an

object

's

geographical

location

is

then

used

as

the

primary

key

to

locate

the

disk

block

where

it

resides

However

since

they

do

not

make

use

of

a

motion

equation

the

nature

of

their

work

is

different

from

ours

CHAPTER

BACKGROUND

AND

RELATED

WORK

Computational

Geometry

Another

related

area

is

the

field

of

computational

geometry

-LSB-

-RSB-

The

dynamic

range

search

is

the

field

that

is

most

relevant

to

our

work

-LSB-

-RSB-

However

the

methods

of

computational

geometers

have

mostly

been

theoretical

putting

an

emphasis

on

asymptotic

analysis

rather

than

more

fine-grained

analyses

required

by

a

practitioner

interested

in

real

performance

issues

Moreover

the

data

set

is

always

assumed

to

be

in

memory

and

secondary

storage

issues

are

not

considered

A

more

detailed

exposition

of

these

views

appears

in

-LSB-

-RSB-

The

authors

conclude

the

paper

with

recommendations

for

the

computational

geometry

community

to

provide

practical

tools

and

techniques

together

with

its

contributions

to

the

understanding

and

solving

of

basic

geometric

problems

Among

the

data

structures

developed

in

computational

geometry

we

mention

the

range

tree

and

the

segment

tree

-LSB-

-RSB-

In

general

these

data

structures

and

the

algorithms

developed

as

solutions

for

the

dynamic

range

search

problem

might

prove

useful

in

our

research

We

feel

however

that

some

effort

is

needed

to

bridge

the

gap

between

the

wealth

of

theoretical

results

of

computational

geometers

and

our

concerns

about

the

design

of

a

secondary

storage

indexing

structure

As

such

a

future

research

question

is

whether

we

could

transform

our

dynamic

attribute

indexing

problem

into

a

more

abstract

version

for

which

ingenious

solutions

already

exist

in

computational

geometry

The

literature

of

the

field

should

at

least

serve

as

a

source

of

inspiration

Chapter

THE

QUADTREE

METHOD

This

chapter

provides

detailed

experimental

and

analytic

studies

about

the

quadtree

approach

to

dynamic

attribute

indexing

We

start

by

describing

the

general

simulation

model

common

to

both

the

quadtree

and

cross

points

approaches

in

Section

We

then

study

the

data

structures

and

programs

specific

to

the

quadtree

simulation

experiments

in

Section

In

Section

we

review

the

storage

requirements

of

the

quadtree

based

index

and

present

the

relevent

experimental

results

In

Section

we

provide

a

mathematical

analysis

of

the

average

percentage

space

utilization

of

the

quadtree

in

the

context

of

our

specific

application

In

Section

we

describe

the

cost

involved

in

the

regeneration

of

the

index

which

takes

place

periodically

this

is

called

build

cost

We

then

contribute

an

important

improvement

over

the

naive

approach

to

index

reconstruction

this

is

an

optimal

algorithm

described

in

detail

in

Section

Finally

we

mention

query

processing

performance

of

the

method

in

Section

The

Simulation

Model

The

general

model

is

roughly

common

to

both

the

quadtree

and

cross

points

approaches

and

consists

of

a

few

parameters

intrinsic

to

the

performance

study

plus

a

set

of

workload

parameters

The

former

set

of

parameters

include

N

CHAPTER

THE

QUADTREE

METHOD

the

number

of

objects

in

the

system

which

serves

to

test

the

scalability

of

each

method

and

the

maximum

number

of

objects

it

can

handle

within

reasonable

performance

constraints

Given

N

we

generate

randomly

the

corresponding

N

linear

equations

describing

the

way

attributes

change

over

time

This

is

done

by

generating

the

intercepts

b

randomly

and

uniformly

distributed

over

the

attribute

space

-LSB-

Amin

Amax

-RSB-

We

then

generate

the

values

of

the

slopes

a

in

the

range

determined

by

how

fast

we

would

like

our

objects

attribute

values

to

change

-LRB-

on

the

average

-RRB-

They

also

include

T

a

period

of

time

which

we

call

quadtree

regeneration

period

in

the

quadtree

method

and

the

lookahead

interval

in

the

cross

points

method

In

the

former

method

the

quadtree

is

destroyed

and

rebuilt

every

T

time

units

so

that

its

rebuilding

at

time

tnow

means

that

it

will

be

used

to

index

objects

only

until

time

tnow

T

In

the

cross-points

method

the

set

of

cross

points

that

may

be

stored

is

limited

by

space

constraints

and

hence

only

intersections

that

fall

in

the

time

interval

-LSB-

tnow

tnow

T

-RSB-

are

computed

at

time

tnow

The

average

speed

of

the

objects

moving

in

the

system

is

also

important

let

this

be

denoted

by

v.

Of

more

value

however

is

how

big

is

v

compared

to

the

total

indexed

distance

which

we

denote

by

A

We

capture

this

observation

in

a

model

parameter

which

we

call

speed

ratio

defined

as

follows

Definition

The

speed

ratio

ff

of

a

system

is

the

ratio

of

the

average

speed

of

objects

divided

by

the

total

length

of

the

indexed

unidimensional

space

It

can

also

be

expressed

as

the

fraction

of

distance

an

object

moves

in

a

single

time

unit

relative

to

the

total

distance

The

formula

is

ff

v

A

This

parameter

is

an

intrinsic

property

of

the

system

of

objects

and

for

this

matter

we

will

even

assume

it

given

Conceptually

ff

is

an

indication

of

the

dynamism

of

our

system

the

higher

it

is

the

more

agitated

the

objects

are

while

the

lower

it

is

the

more

sluggish

the

overall

system

becomes

To

evaluate

query

processing

performance

we

use

the

range

size

of

queries

as

a

parameter

since

we

are

mainly

interested

in

range

searches

Here

too

it

is

the

relative

value

of

the

range

with

respect

to

A

that

is

significant

rather

CHAPTER

THE

QUADTREE

METHOD

than

its

absolute

range

length

-LRB-

which

we

shall

denote

by

R

-RRB-

The

number

of

pages

in

the

buffer

BF

-LRB-

buffer

size

-RRB-

is

also

an

important

factor

when

disk

access

comes

into

play

Note

that

data

are

disk-resident

only

in

the

quadtree

approach

while

in

the

cross-points

method

both

the

binary

tree

and

its

associated

set

of

intersections

are

memory-resident

Finally

there

is

the

so-called

merge

threshold

used

only

in

the

quadtree

approach

It

is

needed

in

its

delete

function

where

we

have

to

check

whether

the

number

of

elements

in

the

four

sibling

leaf

nodes

has

fallen

below

a

certain

value

to

justify

merging

them

into

one

leaf

node

-LRB-

which

shrinks

four

disk

pages

into

one

-RRB-

The

merge

threshold

is

the

name

given

to

this

value

In

fact

we

used

one

single

threshold

value

throughout

the

simulations

that

was

determined

to

be

optimal

by

experimentation

The

second

set

of

parameters

is

related

to

workload

and

query

processing

The

former

consists

of

the

number

of

insertion

deletion

and

update

requests

expected

every

T

time

units

These

result

in

changes

in

the

contents

of

the

indexing

structure

and

are

characteristic

of

the

nature

of

both

the

application

domain

and

the

-LRB-

resultant

-RRB-

indexing

problem

to

be

solved

The

main

query

processing

parameters

are

the

number

of

instantaneous

and

continuous

queries

every

T

time

units

Note

that

a

continuous

query

arriving

at

some

time

point

in

the

interval

-LSB-

ti

ti

T

-RSB-

should

also

be

considered

at

later

intervals

-LSB-

tj

tj

T

-RSB-

-LRB-

tj

ti

n?T

for

some

n

-RRB-

until

explicitly

cancelled

The

parameters

we

have

described

are

summarized

in

Table

Next

we

describe

the

simulation

programs

Programs

and

Data

Structures

Since

we

study

two

techniques

we

have

two

main

driver

programs

for

our

simulation

one

for

the

quadtree

approach

and

the

second

for

the

cross

points

approach

implemented

using

a

binary

tree

Besides

we

isolate

all

the

code

necessary

for

generating

workload

into

a

separate

file

and

all

the

functions

responsible

for

buffer

management

into

yet

another

file

making

up

for

roughly

four

distinguishable

program

components

The

programs

were

written

in

C

-LRB-

approximately

lines

of

code

-RRB-

The

experiments

were

run

on

Sun

Sparc

CHAPTER

THE

QUADTREE

METHOD

N

Number

of

objects

in

the

system

T

Regeneration

or

looka-head

period

ff

Speed

ratio

R

Range

size

of

queries

BF

Buffer

size

NIQ

Number

of

instantaneous

queries

every

T

NCQ

Number

of

continuous

queries

every

T

INS

Number

of

insert

requests

every

T

DEL

Number

of

delete

requests

every

T

UPD

Number

of

update

requests

every

T

Table

Simulation

model

parameters

workstations

running

the

Solaris

operating

system

In

this

section

we

describe

quadtree-related

data

structures

Description

of

data

structures

for

the

cross

points

method

is

given

in

the

next

chapter

dedicated

to

it

We

use

the

notation

R

F

F

ieldn

for

record

structures

First

we

describe

page-related

data

structures

In

the

quadtree

approach

we

model

the

disk

as

an

array

of

pages

and

represent

pages

as

a

collection

-LRB-

again

array

-RRB-

of

objects

plus

a

field

indicating

the

number

of

elements

in

the

page

Using

symbols

we

write

D

pND

to

denote

that

a

disk

D

is

a

vector

of

ND

pages

where

each

page

pi

Ni

Ei

is

a

record

with

a

number

of

elements

field

Ni

and

the

elements

themselves

Ei

eNi

stored

in

an

array

-LRB-

or

vector

-RRB-

Similarly

BF

pBF

means

that

our

buffer

is

modeled

as

a

vector

of

BF

buffer

pages

each

having

the

same

record

structure

as

a

disk

page

In

our

experiments

ND

was

fixed

to

the

maximum

that

we

expect

will

be

needed

and

is

also

limited

by

the

machine

's

main

memory

capacity

while

BF

is

the

model

parameter

described

above

We

manage

the

buffer

using

the

Least

Recently

Used

-LRB-

LRU

-RRB-

page

replacement

policy

For

this

we

have

a

buffer

manager

data

structure

BM

psBF

where

psi

dpi

lrui

records

the

page

status

of

the

ith

page

of

the

buffer

This

page

status

is

composed

of

the

number

of

the

disk

page

currently

residing

in

BF

-LSB-

i

-RSB-

and

the

LRU

stamp

lrui

with

which

it

was

brought

into

the

buffer

The

LRU

policy

is

naively

implemented

using

a

global

counter

incremented

each

time

a

new

page

is

fetched

from

the

disk

and

brought

into

the

buffer

CHAPTER

THE

QUADTREE

METHOD

then

its

value

is

assigned

to

lrui

if

the

page

is

assigned

to

BF

-LSB-

i

-RSB-

The

main

functions

implemented

in

our

buffer

manager

program

include

functions

that

transfer

a

page

from

disk

to

buffer

-LRB-

page

fetch

-RRB-

and

from

buffer

to

disk

-LRB-

page

flush

-RRB-

besides

a

set

of

functions

for

freeing

a

given

number

of

buffer

pages

-LRB-

at

most

in

our

application

-RRB-

given

the

constraint

that

one

or

more

designated

pages

must

remain

there

-LRB-

even

if

their

LRU

order

has

come

-RRB-

The

latter

are

needed

in

insertion

and

deletion

functions

of

the

quadtree

Next

we

see

in-memory

data

structures

The

simplest

such

structure

is

the

object

The

record

is

O

ID

a

b

where

ID

is

the

object

ID

and

a

and

b

are

the

slope

and

intercept

-LRB-

respectively

-RRB-

of

the

object

's

trajectory

described

by

the

linear

function

f

-LRB-

t

-RRB-

at

b.

Objects

are

the

elements

ei

mentioned

above

that

occupy

disk

-LRB-

or

buffer

-RRB-

pages

The

major

data

structure

in

the

quadtree

approach

is

the

quadnode

upon

which

the

quadtree

implementation

is

based

A

quadnode

record

QN

was

described

earlier

and

is

defined

as

follows

QN

Xmin

Ymin

Xmax

Ymax

NQN

Type

PN

SW

NW

NE

SE

Par

The

fields

Xmin

Ymin

Xmax

and

Ymax

define

the

boundaries

of

the

rectangular

space

being

indexed

by

the

quadtree

rooted

at

QN

Field

NQN

stores

the

number

of

index

points

indexed

by

the

quadtree

rooted

at

QN

The

Type

field

designates

the

type

of

the

node

which

can

be

leaf

-LRB-

Type

-RRB-

next-to-leaf

-LRB-

Type

-RRB-

or

internal

-LRB-

Type

-RRB-

Differentiation

between

leaf

and

next-toleaf

is

crucial

to

all

search

insert

update

and

delete

operations

while

the

need

to

distinguish

between

next-to-leaf

and

internal

nodes

arises

in

the

context

of

delete

and

merge

operations

Field

PN

stands

for

page

number

and

is

active

when

QN

is

a

leaf

node

in

which

case

it

gives

the

number

of

the

disk

page

containing

the

actual

indexed

elements

When

QN

is

not

a

leaf

node

the

field

PN

is

simply

not

used

The

SW

NW

NE

and

SE

fields

are

pointers

to

the

four

subquadrants

of

QN

which

are

respectively

the

south-west

northwest

north-east

and

south-east

subquadrants

These

fields

take

the

value

when

QN

is

a

leaf

node

and

point

to

actual

quadnode

records

otherwise

Finally

Par

is

also

a

pointer

that

points

to

the

parent

node

of

QN

and

is

required

by

the

deletion

and

merge

functions

CHAPTER

THE

QUADTREE

METHOD

Storage

Requirements

The

main

parameters

we

are

interested

to

measure

before

looking

into

query

processing

performance

are

the

number

of

disk

accesses

required

to

build

the

quadtree

every

T

time

units

-LRB-

henceforth

denoted

by

TU

-RRB-

and

the

storage

requirements

of

the

tree

Figures

and

show

disk

consumption

as

a

function

of

the

number

of

objects

N

being

indexed

-LRB-

also

called

system

size

-RRB-

Note

that

both

graphs

have

the

same

pattern

in

which

the

number

of

disk

Number

of

Objects

Number

of

Disk

Pages

Number

of

Objects

Number

of

Disk

Pages

Figure

Disk

consumption

for

small

system

sizes

Figure

Disk

consumption

for

large

system

sizes

pages

remains

fixed

for

a

while

then

increases

rapidly

over

a

small

interval

of

objects

count

N

until

it

reaches

some

new

plateau

at

which

it

remains

fixed

for

an

even

longer

interval

of

N

The

notion

or

pattern

of

plateau

is

so

prevalent

in

other

experiments

and

almost

intrinsic

to

the

nature

of

our

application

that

it

deserves

a

precise

definition

so

that

we

can

make

frequent

use

of

the

term

later

Definition

A

plateau

is

an

interval

-LSB-

Ni

Ni

L

-RRB-

in

the

number

of

objects

over

which

the

resulting

quadtree

requires

exactly

the

same

number

of

disk

pages

We

say

L

is

the

plateau

length

If

L

is

very

small

we

will

not

really

have

a

plateau

in

the

graph

and

the

definition

would

thus

not

be

very

faithful

to

the

term

selected

However

for

the

moment

let

us

assume

that

L

is

usually

relatively

big

and

we

shall

later

go

deeper

into

the

anatomy

of

plateaus

in

our

specific

application

To

continue

CHAPTER

THE

QUADTREE

METHOD

t

i

t

Tt

i

aa

j

j

Figure

The

trajectory

spends

the

whole

session

in

the

same

attribute

interval

-LSB-

aj

aj

-RSB-

hence

causing

object

copies

to

be

redundantly

stored

in

every

time

interval

-LRB-

of

width

t

in

the

figure

-RRB-

the

description

we

see

that

plateaus

occur

at

values

of

and

disk

pages

The

last

plateau

is

not

reached

by

the

graph

and

occurs

at

and

is

the

disk

consumption

when

N

reaches

-LRB-

experiments

stop

at

N

-RRB-

The

number

of

disk

pages

in

a

plateau

is

thus

four

times

that

of

the

previous

plateau

The

quadtree

starts

with

a

single

page

and

every

disk

page

in

our

application

has

a

capacity

B

index

elements

-LRB-

bytes

divided

by

bytes

the

size

of

an

object

record

-RRB-

When

filled

the

single

page

is

split

into

four

and

the

B

objects

are

redistributed

over

the

four

subquadrants

generating

N

index

elements

satisfying

B

N

-LRB-

B

-RRB-

as

each

trajectory

may

cross

at

most

three

subquadrants

The

peculiarity

of

our

application

lies

in

the

fact

that

almost

all

splits

generate

exactly

two

index

elements

and

these

fall

either

in

the

northern

-LRB-

NW

and

NE

-RRB-

or

the

southern

-LRB-

SW

and

SE

-RRB-

subquadrants

To

explain

why

this

is

so

we

first

define

a

session

to

be

the

time

span

between

two

consecutive

reconstructions

of

the

quadtree

Thus

a

session

lasts

T

TUs

and

we

let

the

ith

session

-LRB-

call

it

Si

-RRB-

begin

at

time

ti

i?T

Note

also

that

the

time

span

of

a

subquadrant

in

our

quadtree

is

halved

upon

splitting

which

also

divides

the

attribute

interval

indexed

into

two

When

the

number

of

objects

is

relatively

large

our

original

two-dimensional

space

becomes

very

finely

partitioned

so

that

the

time

interval

indexed

by

any

single

leaf

subquadrant

becomes

too

short

for

most

objects

to

cross

the

attribute

boundary

This

is

especially

so

when

the

speed

ratio

ff

of

the

system

is

low

CHAPTER

THE

QUADTREE

METHOD

Figure

reveals

the

redundancy

-LRB-

though

in

an

exaggerated

fashion

-RRB-

Assume

that

for

a

given

session

Si

and

a

given

number

of

objects

N

the

attribute

space

is

divided

into

p

intervals

and

the

time

space

into

q

intervals

Figure

illustrates

the

situation

where

an

arbitrary

object

o

's

position

yo

satisfies

aj

yo

aj

during

the

session

span

-LSB-

ti

ti

T

-RRB-

In

other

words

the

trajectory

passes

through

only

one

single

attribute

interval

-LRB-

here

denoted

by

-LSB-

aj

aj

-RSB-

-RRB-

over

the

whole

session

Corresponding

to

this

attribute

interval

object

o

will

have

as

many

copies

as

there

are

subintervals

of

-LSB-

ti

ti

T

-RRB-

that

is

q

The

q

copies

are

redundant

in

the

sense

that

they

convey

the

same

information

and

could

thus

be

replaced

by

one

Figure

is

an

extreme

case

and

in

practice

an

object

may

cross

two

or

more

attribute

intervals

in

a

single

session

How

many

such

attribute

intervals

an

object

is

expected

to

cross

in

a

single

session

depends

on

the

speed

ratio

ff

and

the

granularity

of

partitioning

of

the

indexed

space

-LRB-

in

other

words

N

-RRB-

Low

values

of

ff

and

a

very

fine

partitioning

lead

to

much

redundancy

of

the

type

depicted

in

Figure

On

the

other

hand

a

high

ff

and

a

coarse

partition

of

space

reduces

redundancy

as

trajectories

are

more

likely

to

cross

many

attribute

intervals

in

a

single

session

Let

us

quantify

with

more

precision

the

average

number

of

copies

of

a

single

object

To

state

the

question

in

a

different

way

we

would

like

to

count

the

number

of

subquadrants

a

given

trajectory

crosses

in

a

given

partitioned

-LRB-

twodimensional

-RRB-

space

For

this

we

denote

by

m

the

average

number

of

attribute

intervals

-LRB-

or

slices

-RRB-

that

a

trajectory

with

a

slope

v

spans

in

a

time

interval

T

Let

us

further

assume

that

the

attribute

space

is

subdivided

into

equalsized

intervals

each

of

length

ffia

Then

using

the

motion

equation

f

-LRB-

t

-RRB-

vt

b

defining

the

trajectory

we

know

the

object

will

move

a

distance

v?t

along

the

attribute

dimension

m

can

then

take

one

of

two

values

given

in

the

form

of

the

following

inequality

v?T

ffia

m

v?T

ffia

ss

-LRB-

-RRB-

Remember

that

m

is

a

natural

number

and

it

takes

one

of

the

two

consecutive

values

given

in

inequality

depending

upon

where

the

object

starts

and

finishes

inside

the

attribute

slices

at

the

beginning

ti

and

end

ti

T

of

the

session

Once

we

know

m

we

need

also

to

fix

the

number

of

time

slices

into

which

our

CHAPTER

THE

QUADTREE

METHOD

n

Figure

A

line

crossing

an

n

m

grid

session

is

partitioned

we

will

denote

this

by

n

At

this

point

we

know

that

our

object

's

trajectory

spans

n

time

slices

and

m

attribute

slices

A

more

abstract

version

of

the

problem

is

then

the

following

Given

an

n?m

grid

of

squares

and

a

line

crossing

it

from

the

square

-LRB-

-RRB-

to

the

square

-LRB-

n

m

-RRB-

how

many

squares

Cn

m

does

the

line

pass

through

This

is

depicted

in

Figure

Note

that

in

any

single

column

-LRB-

which

corresponds

to

a

time

slice

in

our

application

-RRB-

the

trajectory

can

cross

one

or

two

squares

depending

on

whether

or

not

it

crosses

one

of

the

horizontal

boundaries

of

that

column

Since

there

are

m

such

boundaries

to

be

crossed

in

m

squares

and

since

each

such

crossing

adds

an

extra

square

the

total

number

of

squares

Cn

m

crossed

is

given

by

the

simple

formula

Cn

m

n

m

-LRB-

-RRB-

Thus

when

an

object

moves

across

m

attribute

slices

in

a

session

partitioned

into

n

time

slices

it

will

incur

n

m

copies

However

this

is

a

maximum

and

we

may

subtract

one

for

every

boundary

which

the

trajectory

crosses

at

a

corner

-LRB-

the

point

of

intersection

of

four

squares

-RRB-

Generally

we

expect

this

to

be

rare

and

it

will

anyway

not

make

a

big

difference

We

remark

that

n

is

the

lower

bound

for

Cn

m

and

occurs

when

the

trajectory

is

a

perfect

diagonal

of

the

rectangular

grid

We

have

gone

through

this

analysis

to

give

an

idea

and

a

feeling

of

where

the

high

space

requirements

of

the

quadtree

come

from

Coming

back

to

our

specific

application

we

remark

as

we

said

above

that

our

objects

tend

to

spend

the

whole

session

in

a

very

small

number

of

attribute

intervals

in

other

words

m

is

small

This

leads

to

the

fact

that

upon

splitting

very

few

objects

will

generate

one

or

three

copies

while

most

of

them

generate

exactly

two

copies

that

reside

either

in

the

upper

or

lower

halves

of

the

parent

quadrant

Even

in

the

case

where

a

trajectory

crosses

three

subquadrants

of

CHAPTER

THE

QUADTREE

METHOD

a

given

parent

quadrant

it

is

likely

that

it

will

cross

only

one

subquadrant

of

a

nearby

quadrant

hence

averaging

to

two

The

result

is

that

in

most

cases

we

have

a

next-to-perfect

duplication

factor

of

two

in

a

local

split

of

a

data

bucket

This

turns

out

to

have

a

relation

with

plateaus

which

we

reexamine

at

this

point

We

have

earlier

stated

that

the

number

of

disk

pages

required

by

the

quadtree

reaches

plateaus

at

the

values

of

and

It

is

not

difficult

to

see

that

plateaus

occur

at

values

of

-LRB-

i

-RRB-

The

question

is

then

why

do

we

have

plateaus

or

why

does

the

number

of

disk

pages

stabilize

for

a

while

at

values

of

The

reason

is

that

all

subquadrants

tend

to

fill

up

at

the

same

rate

and

reach

capacity

B

at

the

same

time

This

leads

to

a

wave

of

splits

across

all

quadrants

of

the

quadtree

that

is

triggered

by

a

relatively

small

number

of

newly

inserted

objects

Furthermore

insertion

of

a

single

object

sometimes

triggers

splits

in

all

-LRB-

or

a

big

portion

of

-RRB-

quadrants

that

correspond

to

a

single

attribute

interval

-LRB-

it

splits

a

whole

row

-RRB-

After

these

splits

are

over

it

will

take

quite

some

time

-LRB-

i.e.

many

insertions

-RRB-

before

the

new

disk

pages

are

filled

again

During

these

insertions

disk

pages

are

getting

nearer

to

full

capacity

but

no

new

disk

pages

are

being

required

by

the

quadtree

For

this

reason

we

have

a

plateau

shape

followed

by

a

sharp

rise

that

only

ends

at

the

next

plateau

The

number

comes

from

the

fact

that

the

quadtree

starts

with

one

-LRB-

-RRB-

disk

page

and

every

split

wave

multiplies

the

number

of

disk

pages

by

four

Notice

also

that

so

that

in

a

plateau

of

we

actually

have

our

original

index

space

partitioned

into

a

grid

of

quadrants

The

ubiquitousness

of

this

quadtree

configuration

in

our

application

and

the

alternating

pattern

of

plateaus

and

splits

compel

us

to

introduce

the

following

term

which

we

will

need

later

Definition

An

ith-regular

quadtree

is

one

which

partitions

the

underlying

indexed

space

into

a

grid

of

quadrants

We

also

say

that

it

is

at

the

ith

plateau

This

leads

-LRB-

among

other

things

-RRB-

to

a

prohibitively

large

number

of

index

points

illustrated

in

Figure

for

a

system

size

above

Notice

that

we

reach

one

million

index

points

at

N

and

as

much

as

million

index

points

CHAPTER

THE

QUADTREE

METHOD

37 100002000

Number

of

Objects

Number

of

Index

Points

-LRB-

-RRB-

Figure

Number

of

index

points

Number

of

Objects

Storage

Requirements

-LRB-

Mbytes

-RRB-

Number

of

Objects

Storage

Requirements

-LRB-

Mbytes

-RRB-

Figure

Storage

requirements

for

small

system

sizes

Figure

Storage

requirements

for

large

system

sizes

at

N

This

huge

number

of

index

points

requires

substantial

memory

We

have

translated

the

number

of

pages

parameter

in

earlier

graphs

into

the

corresponding

memory

requirements

in

megabytes

-LRB-

Kbytes/page

-RRB-

and

the

result

is

given

in

Figures

and

Here

again

we

have

the

plateau

pattern

with

a

plateau

at

Mbyte

for

the

-LRB-

number

of

objects

-RRB-

interval

-LSB-

-RSB-

the

next

at

Mbytes

for

the

interval

-LSB-

-RSB-

the

next

at

Mbytes

for

the

interval

-LSB-

-RSB-

and

the

plateau

at

Mbytes

for

the

interval

-LSB-

-RSB-

We

also

have

a

plateau

at

Mbytes

that

starts

beyond

the

point

N

We

think

this

space

overhead

to

be

impractical

especially

that

we

may

have

several

attributes

The

main

reason

for

this

is

the

redundancy

or

number

of

copies

which

becomes

higher

and

higher

as

the

number

of

objects

in

the

system

increases

To

understand

this

better

we

introduce

a

measure

of

redundancy

CHAPTER

THE

QUADTREE

METHOD

38 100002000

Number

of

Objects

Duplication

Ratio

Figure

Duplication

ratio

Definition

The

Duplication

Ratio

D

of

a

quadtree

is

the

average

number

of

copies

that

a

single

object

has

in

the

quadtree

D

Number

of

Index

Points

Number

of

Objects

The

duplication

ratio

is

given

in

Figure

as

a

function

of

N

Again

the

plateau

pattern

prevails

but

this

time

plateaus

occur

at

powers

of

two

-LRB-

i

-RRB-

rather

than

four

so

that

we

also

have

plateaus

at

D

and

D

-LRB-

not

included

in

the

figure

-RRB-

The

figure

shows

a

plateau

at

D

then

at

D

-LRB-

not

a

power

of

-RRB-

then

at

D

for

N

ss

We

observe

that

D

corresponds

to

the

number

of

quadrants

on

each

side

of

the

indexed

space

which

we

denote

by

-LSB-

Amin

Amax

-RSB-

-LSB-

ti

ti

T

-RSB-

At

plateaus

D

is

a

perfect

power

of

two

and

is

exactly

equal

to

the

number

of

quadrants

on

every

side

of

the

original

quadrant

In

between

plateaus

-LRB-

or

during

split

waves

-RRB-

the

value

of

D

is

related

to

the

number

of

quadrants

on

the

border

of

the

indexed

quadrant

that

experienced

a

split

let

us

see

how

First

call

this

number

m

and

let

A

Amax

Amin

be

the

length

of

the

indexed

attribute

space

If

we

are

in

a

split

wave

between

the

ith

and

i

plateau

then

m

so

that

when

the

wave

ends

we

have

quadrants

on

the

space

border

When

m

border

quadrants

split

they

produce

border

quadrants

of

length

i

A

and

we

still

have

m

quadrants

of

length

A

The

total

number

of

border

quadrants

at

this

point

-LRB-

after

mth

border

split

but

before

m

one

-RRB-

is

thus

-LRB-

m

-RRB-

m

We

then

conjecture

that

D

could

be

approximated

by

this

value

so

that

if

Di

m

denotes

the

duplication

ratio

after

the

ith

plateau

is

over

and

m

border

quadrant

splits

took

place

then

Di

m

ss

m

CHAPTER

THE

QUADTREE

METHOD

39 501001502

Duplication

Ratio

Number

of

Disk

Pages

Number

of

Objects

Average

Insertion

Cost

-LRB-

Disk

Accesses

-RRB-

Figure

The

relation

between

the

number

of

disk

pages

and

the

duplication

ratio

Figure

Insertion

cost

A

simple

experiment

might

prove

its

validity

but

we

will

stop

considering

this

topic

and

retain

that

the

redundancy

as

captured

by

the

duplication

ratio

D

is

responsible

for

most

of

the

disadvantages

of

the

bucket

PR

quadtree

indexing

structure

in

the

narrow

context

of

our

application

Before

we

close

the

topic

however

we

have

a

final

remark

on

the

relation

between

D

and

the

number

of

disk

pages

which

is

given

in

Figure

Recall

that

every

disk

page

is

pointed

to

by

a

leaf

node

of

the

quadtree

residing

in

memory

Then

the

number

of

disk

pages

is

equal

to

the

number

of

quadrants

produced

through

insertions

and

splits

This

as

the

small

digression

above

suggests

is

roughly

equal

to

the

square

of

the

number

of

border

quadrants

on

a

single

side

of

the

indexed

space

Thus

disk

consumption

is

the

square

of

D

which

is

confirmed

by

Figure

Among

the

performance

parameters

affected

by

the

redundancy

described

above

is

the

cost

of

insertions

deletions

and

updates

If

an

object

is

duplicated

q

times

then

it

resides

in

q

disk

pages

and

any

of

the

above

operations

targeting

it

will

have

to

access

all

those

q

pages

The

same

thing

applies

to

the

insertion

of

a

new

object

If

in

time

span

T

its

trajectory

crosses

m

attribute

slices

and

the

current

quadtree

is

ith-regular

then

its

insertion

cost

will

be

m

as

analyzed

earlier

The

average

number

of

disk

accesses

needed

to

insert

an

object

is

given

in

Figure

as

a

function

of

N

The

value

of

the

buffer

size

used

was

Again

we

have

plateaus

at

This

unfortunately

means

CHAPTER

THE

QUADTREE

METHOD

that

when

our

quadtree

-LRB-

by

the

effect

of

insertions

and

splits

-RRB-

passes

from

the

ith

plateau

to

the

i

plateau

the

cost

of

insertion

and

deletion

of

an

object

which

crosses

m

attribute

slices

-LRB-

in

T

TUs

-RRB-

passes

from

m

to

hence

effectively

doubling

An

examination

of

our

graphs

reveals

that

in

the

process

N

increases

by

only

about

The

deterioration

of

performance

is

not

only

dependent

on

N

but

also

disproportionate

to

its

percentage

increase

One

more

performance

variable

dramatically

affected

by

redundancy

is

the

cost

of

reconstructing

the

quadtree

which

we

call

build

cost

Before

we

look

into

this

problem

we

prefer

to

digress

for

a

while

on

the

efficiency

of

memory

utilization

by

our

quadtree

Percentage

Space

Utilization

In

this

section

we

are

interested

in

computing

and

knowing

about

the

space

efficiency

of

our

quadtree

in

the

context

of

our

particular

application

The

main

characterizing

features

of

our

application

have

been

mentioned

previously

and

include

the

fact

that

upon

quadrant

split

each

object

generates

two

copies

and

usually

resides

in

the

upper

or

lower

half

of

the

split

quadrant

We

will

also

assume

that

a

trajectory

falls

in

a

single

attribute

interval

-LSB-

aj

aj

-RRB-

We

will

attempt

a

mathematical

analysis

of

utilization

in

which

we

seek

a

formula

for

the

average

space

efficiency

of

our

quadtree

We

begin

by

establishing

the

necessary

terminology

We

say

that

an

ith

plateau

is

full

if

all

the

disk

pages

are

full

-LRB-

contain

B

index

elements

-RRB-

Furthermore

when

the

first

quadrant

in

a

full

ith

plateau

splits

we

say

the

ith

plateau

breaks

and

that

the

ith

split

wave

begins

The

ith

split

wave

ends

when

the

last

quadrant

of

the

ith-regular

quadtree

that

has

not

yet

split

undergoes

a

split

yielding

the

i

quadtree

and

initiating

the

i

plateau

Let

Pi

denote

the

number

of

index

elements

at

the

ith

full

plateau

then

Pi

where

B

is

as

usual

the

bucket

size

Let

P

sw

i

denote

the

number

of

index

elements

immediately

after

the

ith

split

wave

ends

We

will

perform

our

analysis

based

on

a

scenario

of

a

shortest

split

wave

that

is

one

which

ends

with

the

minimum

number

of

insertions

This

wave

is

as

follows

We

start

with

a

full

ith

plateau

containing

quadrants

CHAPTER

THE

QUADTREE

METHOD

and

attribute

intervals

As

such

and

based

on

our

assumption

of

a

single

trajectory

falling

in

a

single

attribute

interval

-LSB-

aj

aj

-RSB-

we

need

exactly

insertions

to

begin

and

end

the

ith

split

wave

Each

such

insertion

causes

splits

along

the

time

axis

which

transforms

a

row

into

a

grid

All

these

assumptions

are

inspired

by

the

real

behavior

of

splits

and

trajectories

in

our

application

and

a

different

split

speed

may

not

affect

the

average

space

efficiency

which

we

are

seeking

to

compute

Let

P

-LRB-

N

-RRB-

be

equal

to

the

number

of

index

points

in

the

quadtree

which

indexes

N

objects

and

D

-LRB-

N

-RRB-

be

the

number

of

disk

pages

required

to

store

a

quadtree

which

indexes

N

objects

We

use

a

classical

definition

of

utilization

Definition

The

Utilization

Ratio

U

is

the

fraction

of

memory

used

by

the

index

elements

in

a

given

quadtree

relative

to

the

total

memory

capacity

of

the

disk

pages

consumed

by

that

quadtree

U

-LRB-

N

-RRB-

P

-LRB-

N

-RRB-

D

-LRB-

N

-RRB-

B

-LRB-

-RRB-

The

notation

U

-LRB-

N

-RRB-

is

for

utilization

ratio

in

a

quadtree

of

N

objects

We

are

interested

in

the

mean

utilization

ratio

U

which

we

define

using

the

formula

U

lim

N

PNp

U

-LRB-

p

-RRB-

N

-LRB-

-RRB-

However

this

being

theoretical

we

need

to

compute

the

mean

over

a

finite

range

of

values

of

N

We

choose

the

range

of

values

between

two

consecutive

plateaus

as

our

finite

range

Let

Ni

denote

the

number

of

objects

at

an

ith

full

plateau

of

a

quadtree

We

define

the

ith

mean

utilization

ratio

Ui

as

follows

Ui

PNi

p

Ni

U

-LRB-

p

-RRB-

Ni

Ni

-LRB-

-RRB-

Let

us

express

formula

in

words

Starting

from

the

point

when

the

ith

plateau

breaks

we

insert

objects

consecutively

until

we

reach

the

full

i

plateau

and

compute

the

utilization

after

every

insertion

-LRB-

this

is

the

term

U

-LRB-

p

-RRB-

in

the

summation

-RRB-

We

then

calculate

Ui

as

the

arithmetic

mean

of

those

intermediate

values

Let

us

then

compute

P

sw

i

Recall

that

P

sw

i

was

defined

as

the

number

of

index

points

immediately

after

the

ith

split

wave

ends

At

this

point

we

have

the

previous

Pi

index

points

CHAPTER

THE

QUADTREE

METHOD

each

generated

two

copies

during

the

split

waves

and

the

newly

inserted

objects

-LRB-

which

trigger

row

splits

-RRB-

each

yielding

copies

-LRB-

is

the

new

side

length

of

the

indexed

space

-RRB-

We

then

have

P

sw

i

which

after

replacing

Pi

by

its

values

of

simplifies

into

the

formula

P

sw

i

-LRB-

B

-RRB-

-LRB-

-RRB-

We

can

then

compute

the

disk

utilization

immediately

after

the

ith

split

ends

which

we

denote

by

Usw

i

Using

Equation

in

which

P

-LRB-

N

-RRB-

P

sw

i

and

D

-LRB-

N

-RRB-

and

replacing

we

find

Usw

i

B

ss

-LRB-

-RRB-

The

utility

of

this

formula

lies

in

the

fact

that

it

corresponds

to

the

minimal

space

utilization

of

the

quadtree

in

our

application

This

is

so

because

any

insertion

beyond

this

point

will

increase

the

occupancy

of

the

quadrants

-LRB-

whose

number

remains

fixed

-RRB-

and

this

continues

until

we

reach

the

full

i

plateau

Thus

it

tells

us

that

the

worst

case

percentage

utilization

of

our

quadtree

is

This

is

not

very

comforting

though

and

we

now

pass

to

the

more

serious

task

of

computing

the

ith

mean

utilization

ratio

We

start

by

computing

the

number

of

insertions

-LRB-

new

objects

-RRB-

needed

to

pass

from

the

ith

full

plateau

to

the

i

st

full

plateau

which

we

denote

by

Ni

We

know

Ni

Ni

Ni

-LRB-

by

definition

-RRB-

Note

that

Ni

is

the

sum

of

two

values

The

first

is

the

number

of

insertions

needed

to

end

the

split

wave

and

the

second

is

the

number

of

insertions

needed

to

bring

the

newly

formed

i

st-regular

quadtree

to

the

status

of

a

full

i

st

plateau

These

two

phases

will

also

govern

our

subsequent

analysis

and

we

need

to

give

them

names

Let

us

call

the

first

one

the

SPLIT

phase

and

the

second

one

the

F

ILL

phase

At

a

full

i

plateau

the

duplication

ratio

is

-LRB-

side

length

of

the

grid

-RRB-

Hence

the

number

of

objects

needed

in

the

F

ILL

phase

may

be

computed

from

the

number

of

index

points

generated

during

this

phase

divided

by

the

duplication

ratio

This

results

in

the

following

formula

for

Ni

Ni

Pi

P

sw

i

-LRB-

-RRB-

Stated

in

words

the

difference

between

the

number

of

index

points

at

the

full

i

plateau

and

that

just

after

the

split

wave

ended

divided

by

the

CHAPTER

THE

QUADTREE

METHOD

duplication

ratio

yields

the

number

of

objects

that

were

inserted

in

the

F

ILL

phase

Simplifying

Equation

gives

the

cleaner

formula

Ni

-LRB-

-RRB-

As

there

are

insertions

in

the

SPLIT

phase

the

number

of

insertions

in

the

F

ILL

phase

is

Ni

-LRB-

B

-RRB-

Now

let

U

iSP

LIT

-LRB-

m

-RRB-

denote

the

utilization

ratio

when

m

objects

have

been

inserted

in

the

SPLIT

phase

m

satisfies

the

constraint

m

By

analogy

we

define

U

iF

ILL

-LRB-

m

-RRB-

as

the

utilization

ratio

when

m

objects

have

been

inserted

and

we

are

in

the

F

ILL

phase

that

is

m

satisfies

the

constraint

m

Ni

These

are

exactly

the

component

utilizations

we

talked

about

earlier

that

we

want

to

sum

and

divide

by

Ni

Ni

to

obtain

Ui

-LRB-

see

Equation

-RRB-

A

more

precise

expression

for

Ui

is

then

as

follows

Ui

m

U

iSP

LIT

-LRB-

m

-RRB-

m

U

iF

ILL

-LRB-

m

-RRB-

Ni

-LRB-

-RRB-

It

now

suffices

to

find

formulas

for

U

iSP

LIT

-LRB-

m

-RRB-

and

U

iF

ILL

-LRB-

m

-RRB-

To

save

space

we

will

not

give

the

details

of

the

derivations

involved

Below

is

the

formula

for

U

iSP

LIT

-LRB-

m

-RRB-

in

terms

of

i

m

and

B.

U

iSP

LIT

-LRB-

m

-RRB-

m

B

B

-LRB-

-RRB-

The

reader

may

verify

for

the

special

case

m

utilization

equals

B

which

agrees

with

Equation

for

Usw

i

derived

in

a

different

way

The

formula

for

U

iF

ILL

-LRB-

m

-RRB-

is

U

iF

ILL

-LRB-

m

-RRB-

m

B

-LRB-

-RRB-

Finally

using

Equations

and

then

substituting

them

into

Equation

and

simplifying

gives

us

Ui

B

B

A

-LRB-

-RRB-

We

now

shall

use

a

few

approximations

to

simplify

further

the

above

formula

and

see

better

what

it

stands

for

We

approximate

B

B

by

which

we

expect

is

acceptable

in

most

applications

In

our

specific

application

B

so

that

B

B

We

also

denote

by

ffi

the

quantity

We

then

have

the

following

formula

for

Ui

Ui

ss

-LRB-

-RRB-

CHAPTER

THE

QUADTREE

METHOD

44 100020003

Number

of

Objects

Space

Utilization

-LRB-

-RRB-

Number

of

Objects

Space

Utilization

-LRB-

-RRB-

Figure

Percentage

utilization

To

simplify

the

formula

even

further

notice

that

ffi

i

so

that

limi

ffi

We

may

then

approximate

ffi

by

as

i

need

not

in

fact

be

arbitrarily

large

-LRB-

e.g.

for

i

ffi

-RRB-

In

a

sense

we

are

at

this

particular

approximation

removing

the

effect

of

selecting

a

certain

ith

plateau

when

we

started

this

analysis

In

other

words

any

such

i

would

produce

roughly

the

same

mean

utilization

and

so

we

are

compelled

to

drop

the

subscript

i

from

Ui

This

leads

to

the

more

expressive

and

consize

formula

U

ss

B

-LRB-

-RRB-

The

final

step

is

to

neglect

as

well

-LRB-

in

our

application

-RRB-

which

leaves

us

with

the

elegant

result

U

ss

-LRB-

-RRB-

The

average

percentage

utilization

in

our

particular

application

and

use

of

the

quadtree

is

therefore

This

is

not

surprising

though

as

it

is

the

midpoint

between

the

maximum

utilization

of

-LRB-

which

occurs

in

a

full

plateau

-RRB-

and

the

minimum

utilization

of

proved

earlier

-LRB-

see

Equation

-RRB-

and

which

occurs

at

Usw

i

The

experimental

evaluation

of

the

percentage

utilization

as

a

function

of

the

number

of

objects

is

given

in

Figure

It

confirms

the

fact

that

minimum

utilization

does

not

drop

below

Maximum

utilization

however

is

always

bounded

by

the

barrier

This

is

because

in

practice

the

i

split

wave

begins

before

the

ith

plateau

becomes

full

In

other

terms

when

the

first

quadrant

split

in

a

partitioned

space

takes

place

there

are

still

quadrants

which

are

not

yet

full

-LRB-

i.e.

contain

less

than

B

index

elements

-RRB-

CHAPTER

THE

QUADTREE

METHOD

Number

of

Objects

0.05000.010000.015000.020000.025000.030000.035000.0

Average

Build

Cost

-LRB-

Disk

Accesses

-RRB-

Number

of

Objects

Average

Build

Cost

-LRB-

Disk

Accesses

-RRB-

Figure

BF

pages

Figure

BF

pages

Build

Cost

The

cost

of

rebuilding

the

quadtree

is

more

severely

affected

by

an

excessive

amount

of

redundancy

or

object

copies

as

it

is

based

solely

on

insertion

and

has

to

undergo

all

the

split

waves

that

are

within

its

range

We

illustrate

the

average

build

cost

as

a

function

of

the

number

of

objects

for

different

values

of

buffer

size

and

a

fixed

T

in

Figures

and

First

note

that

we

conducted

experiments

to

study

the

effect

of

T

on

build

cost

Interestingly

enough

it

transpires

that

it

does

not

affect

build

cost

The

regeneration

period

T

does

not

affect

the

number

of

index

points

created

either

then

it

also

will

not

affect

the

disk

utilization

of

the

quadtree

-LRB-

being

directly

related

to

index

points

set

size

-RRB-

In

one

experiment

we

fixed

buffer

size

at

and

N

at

varying

T

from

to

at

steps

of

obtaining

a

quasi-fixed

average

build

cost

of

In

a

similar

setting

we

got

a

quasi-fixed

number

of

index

points

around

This

may

not

be

very

surprising

since

the

driving

factor

behind

bucket

overflows

-LRB-

and

thus

splits

-RRB-

is

the

number

of

objects

while

split

and

insertion

overheads

are

what

constitute

build

cost

Does

this

mean

that

we

could

enjoy

an

infinite

T

so

that

our

quadtree

is

generated

only

once

Can

we

at

least

hope

in

practice

to

enjoy

a

long

period

without

reconstructing

the

quadtree

The

answer

is

no

The

reason

lies

in

insertions

and

deletions

If

all

the

objects

which

have

existed

in

the

index

at

some

time

tpast

have

left

the

system

by

time

tnow

and

were

all

explicitly

deleted

-LRB-

otherwise

the

index

will

grow

without

bounds

-RRB-

then

we

have

practically

regenerated

the

quadtree

in

the

sense

that

we

incurred

the

same

cost

We

thus

CHAPTER

THE

QUADTREE

METHOD

Number

of

Objects

Average

Build

Cost

-LRB-

Disk

Accesses

-RRB-

1000.01500.02000.02500.03000.03500.04000.0

Number

of

Objects

Average

Build

Cost

-LRB-

Disk

Accesses

-RRB-

Figure

BF

pages

Figure

BF

pages

Number

of

Objects

Average

Build

Cost

-LRB-

Disk

Accesses

-RRB-

Number

of

Objects

Average

Build

Cost

-LRB-

Disk

Accesses

-RRB-

Figure

BF

pages

Figure

BF

pages

conjecture

that

a

suitable

T

depends

on

the

average

lifetime

of

the

objects

in

the

system

which

we

will

denote

by

L

If

T

is

too

small

compared

to

L

then

we

are

-LRB-

uselessly

-RRB-

incurring

the

high

cost

of

regeneration

while

constructing

essentially

the

same

tree

On

the

other

hand

if

T

is

much

greater

than

L

then

we

find

ourselves

effectively

reconstructing

the

tree

anyway

as

generations

of

objects

come

and

go

Such

observations

compel

us

to

conclude

that

T

's

best

value

should

be

L

-LRB-

especially

if

the

standard

deviation

of

object

lifetimes

is

small

-RRB-

We

present

this

as

a

conclusion

in

the

form

of

the

following

primitive

equation

where

Topt

stands

for

the

optimal

value

of

T

Topt

L

-LRB-

-RRB-

However

we

do

not

in

any

way

mean

it

to

be

a

solution

to

its

relevant

optimization

problem

as

it

was

derived

through

common

sense

rather

than

by

analytic

means

What

is

more

important

is

that

it

is

of

no

use

if

the

build

cost

is

prohibitive

A

cursory

look

at

the

graphs

illustrating

build

cost

reveals

values

in

the

order

of

disk

accesses

for

only

objects

The

buffer

size

provides

little

help

in

absorbing

such

a

high

cost

In

fact

its

only

effect

CHAPTER

THE

QUADTREE

METHOD

as

revealed

by

the

graphs

is

to

delay

the

explosion

of

build

cost

by

a

few

objects

The

graphs

have

an

interesting

pattern

that

is

again

related

to

the

alternation

of

SPLIT

and

F

ILL

phases

in

the

construction

of

the

quadtree

It

is

linear

during

F

ILL

phases

During

the

shorter

SPLIT

phase

it

makes

a

small

twist

upward

so

that

the

next

F

ILL

phase

's

graph

is

a

steeper

linear

function

The

reason

for

this

high

cost

is

that

as

we

construct

the

quadtree

from

scratch

we

have

to

bear

all

the

costs

of

the

consecutive

split

waves

one

after

another

hence

effectively

inserting

every

object

many

times

Besides

the

CPU

cost

of

all

those

insertions

and

reinsertions

-LRB-

at

splits

-RRB-

is

also

unacceptable

-LRB-

it

was

the

main

reason

why

we

did

not

try

values

of

N

beyond

it

simply

takes

hours

-RRB-

This

unfortunately

leads

us

to

rule

out

the

bucket

PR

quadtree

as

a

choice

to

solve

our

problem

as

long

as

we

have

not

devised

a

regeneration

algorithm

of

tolerable

cost

We

can

best

characterize

a

tolerable

-LRB-

time

-RRB-

cost

as

one

which

is

significantly

low

compared

to

T

The

next

section

treats

this

problem

in

more

depth

and

presents

a

solution

which

we

think

is

optimal

An

Optimal

Quadtree

Regeneration

Al

gorithm

Given

the

number

of

objects

N

in

our

system

we

might

know

beforehand

that

we

are

to

go

through

a

certain

number

of

costly

split

waves

if

we

follow

the

naive

approach

of

starting

with

a

single

bucket

and

making

consecutive

insertions

For

example

in

our

application

B

and

so

we

know

that

if

N

we

will

encounter

a

bucket

split

at

object

insertion

operation

number

This

suggests

that

if

we

could

know

or

predict

right

from

the

beginning

-LRB-

given

only

N

-RRB-

the

final

shape

of

our

quadtree

then

we

could

just

start

with

an

empty

quadtree

of

that

shape

and

fill

it

properly

with

index

points

In

a

sense

our

earlier

-LRB-

naive

-RRB-

approach

built

the

quadtree

top-down

we

are

here

proposing

to

build

it

bottom-up

By

the

word

shape

of

the

quadtree

we

actually

meant

its

corresponding

partition

of

the

original

indexed

quadrant

and

by

final

shape

we

meant

the

final

plateau

at

which

the

quadtree

settles

after

N

insertions

Let

us

call

i

in

an

CHAPTER

THE

QUADTREE

METHOD

ith-regular

quadtree

the

order

of

that

quadtree

The

problem

is

then

reduced

to

finding

the

order

i

given

N

which

we

explore

in

the

next

subsection

Finding

the

Order

of

Quadtrees

We

seek

a

formula

for

the

order

of

a

quadtree

which

we

derive

by

simple

analysis

Let

us

start

with

the

base

case

The

condition

N

B

tells

us

that

we

will

have

to

split

the

bucket

anyway

We

then

obtain

index

points

and

buckets

of

capacity

Notice

that

if

then

the

quadtree

is

enough

to

store

the

N

objects

The

condition

similarly

tells

us

that

-LRB-

if

we

went

top-down

-RRB-

we

will

have

to

go

through

the

second

split

wave

anyway

after

which

we

have

index

points

-LRB-

copies

per

object

as

assumed

before

-RRB-

and

buckets

of

capacity

The

next

condition

to

evaluate

is

then

Generalizing

this

we

find

that

the

top-down

insertion

of

N

objects

will

reach

the

ith-split

wave

if

the

condition

is

satisfied

By

the

same

token

the

i

split

will

not

be

reached

if

N

-LRB-

i

-RRB-

B.

Combining

these

two

constraints

we

obtain

the

following

characterization

of

when

N

objects

produce

an

ith-order

quadtree

N

B

The

following

formula

for

i

is

then

readily

computed

i

N

B

-LRB-

-RRB-

Remember

that

we

assume

that

the

ith

split

wave

breaks

the

ith

plateau

only

when

it

is

full

We

said

earlier

that

this

is

not

the

case

in

practice

where

one

or

more

of

the

buckets

of

the

ith-regular

quadtree

might

become

full

and

split

before

all

buckets

become

full

To

remedy

this

we

could

simply

add

to

i

hence

constructing

a

larger

grid

than

the

theoretical

prediction

to

cater

for

premature

splitting

-LRB-

which

is

always

the

case

in

real

applications

-RRB-

This

would

be

a

big

squander

of

memory

capacity

if

N

were

only

slightly

greater

than

where

we

expect

it

is

too

early

for

splits

of

the

next

wave

to

begin

On

the

other

hand

it

is

reasonable

to

do

so

if

N

were

too

near

to

the

value

B

In

the

former

case

we

propose

to

use

a

grid

and

add

overflow

buckets

for

the

-LRB-

hopefully

-RRB-

few

quadrants

which

are

found

to

have

overflowed

We

may

go

CHAPTER

THE

QUADTREE

METHOD

t

t

a

a

t

t

m

n

Q

m

n

Figure

Definition

of

Qm

n.

deeper

into

analyzing

this

tradeoff

but

we

choose

to

stop

here

and

come

back

to

the

main

regeneration

algorithm

The

Path

Computation

Algorithm

Before

presenting

the

algorithm

we

introduce

some

necessary

notation

In

what

follows

we

talk

about

an

ith-regular

quadtree

We

have

earlier

defined

A

to

be

the

length

of

the

attribute

dimension

Let

ffiti

denote

the

length

of

each

quadrant

along

the

time

axis

and

ffiai

denote

the

length

of

each

quadrant

along

the

attribute

axis

Let

our

indexed

space

be

S

-LSB-

T

-RSB-

-LSB-

A

-RSB-

and

let

Qm

n

-LSB-

mffiti

-LRB-

m

-RRB-

ffiti

-RRB-

-LSB-

nffiai

-LRB-

n

-RRB-

ffiai

-RRB-

-LRB-

m

n

-RRB-

designate

the

subquadrant

of

our

space

which

lies

at

the

intersection

of

the

mth

time

interval

and

nth

attribute

interval

as

shown

in

Figure

Finally

let

s

be

the

side

length

of

the

ith-regular

quadtree

measured

in

number

of

intervals

Since

there

will

be

buckets

in

the

final

quadtree

we

will

need

to

fill

and

write

disk

pages

during

reconstruction

and

this

is

then

the

minimum

disk

access

cost

which

we

can

hope

for

It

would

then

be

nice

if

we

could

shift

all

other

auxiliary

overhead

into

the

CPU

which

is

what

we

propose

to

do

The

idea

is

to

construct

an

in-memory

s

s

array

-LRB-

call

it

Q

-RRB-

which

corresponds

to

the

quadrants

Qm

n

of

our

indexed

space

defined

above

We

then

compute

for

each

of

the

N

trajectories

the

coordinates

-LRB-

m

and

n

m

n

-RRB-

of

CHAPTER

THE

QUADTREE

METHOD

Figure

In

two

consecutive

time

intervals

a

trajectory

crosses

either

two

or

three

quadrants

quadrants

it

crosses

and

add

the

object

information

to

every

such

quadrant

The

entry

Q

-LSB-

m

n

-RSB-

of

our

array

is

thus

a

set

defined

as

follows

Q

-LSB-

m

n

-RSB-

fop

trajectory

of

op

crosses

Qm

ng

We

call

the

latter

operation

object

path

computation

Let

us

then

provide

a

short

description

of

the

object

path

computation

algorithm

and

see

its

complexity

Given

an

object

op

we

examine

the

s

time

slices

-LSB-

mffiti

-LRB-

m

-RRB-

ffiti

-RRB-

-LRB-

m

s

-RRB-

one

by

one

in

increasing

order

of

m.

Using

the

motion

equation

fp

-LRB-

t

-RRB-

apt

bp

we

compute

at

each

time

slice

in

which

attribute

slices

object

op

's

trajectory

falls

there

can

be

at

most

two

of

them

Figure

shows

this

and

illustrates

the

important

observation

that

for

two

consecutive

time

intervals

there

can

be

at

most

three

quadrants

through

which

the

trajectory

passes

There

are

s

time

slices

and

consecutive

double

slices

then

an

object

can

have

at

most

index

points

-LRB-

and

at

least

-RRB-

which

is

our

upper

bound

The

path

computation

algorithm

is

thus

O

-LRB-

-RRB-

Since

is

the

minimum

it

is

more

accurate

to

say

that

the

number

of

insertions

into

the

array

Q

which

we

denote

by

Cpath?comp

satisfies

Cpath?comp

-LRB-

-RRB-

The

main

part

of

the

quadtree

regeneration

algorithm

is

the

loop

for

computing

the

paths

of

the

N

objects

This

is

given

below

for

p

to

N

do

for

m

to

s

do

n

find-attribute-interval

-LRB-

m

op

-RRB-

Q

-LSB-

m

n

-RSB-

Q

-LSB-

m

n

-RSB-

Sfopg

if

-LRB-

ap

-RRB-

and

-LRB-

op

crosses

Qm

n

-RRB-

then

CHAPTER

THE

QUADTREE

METHOD

Q

-LSB-

m

n

-RSB-

Q

-LSB-

m

n

-RSB-

Sfopg

if

-LRB-

ap

-RRB-

and

-LRB-

op

crosses

Qm

n

-RRB-

then

Q

-LSB-

m

n

-RSB-

Q

-LSB-

m

n

-RSB-

Sfopg

endfor

endfor

If

we

let

Cgeneration

denote

the

CPU

cost

of

regenerating

the

quadtree

then

Cgeneration

NCpath?comp

Hence

the

cost

of

regeneration

satisfies

the

inequality

Cgeneration

The

insertion

of

an

object

op

in

Q

-LSB-

m

n

-RSB-

expressed

in

the

above

algorithm

as

a

set

union

could

be

implemented

to

be

O

-LRB-

-RRB-

if

we

use

an

array

of

size

B

for

Q

-LSB-

m

n

-RSB-

The

CPU

cost

of

regenerating

our

quadtree

is

also

optimal

in

the

sense

that

no

multiple

insertions

or

recomputations

are

done

for

a

single

object

In

summary

no

extra

overhead

is

incurred

to

create

and

place

index

points

in

their

correct

quadrants

other

than

the

strict

minimum

Once

the

quadrants

array

Q

is

filled

we

just

transfer

its

contents

from

memory

to

the

disk

by

allocating

one

disk

page

for

every

Q

-LSB-

m

n

-RSB-

-LRB-

m

n

-RRB-

and

copying

the

index

points

in

Q

-LSB-

m

n

-RSB-

to

it

This

amounts

to

exactly

disk

page

accesses

which

are

also

the

minimal

number

of

accesses

possible

hence

the

optimality

of

the

algorithm

We

would

now

like

to

examine

what

the

above

bounds

translate

to

in

practice

We

want

to

estimate

the

CPU

cost

or

execution

time

Cgeneration

and

the

cost

of

disk

accesses

-LRB-

I/O

cost

-RRB-

for

several

values

of

N

For

the

latter

cost

we

will

use

maximal

and

minimal

disk

access

costs

of

and

respectively

which

are

typical

values

of

modern

hardware

used

in

recent

studies

as

well

For

the

CPU

cost

we

have

to

estimate

the

execution

cost

of

the

body

of

the

inner

loop

in

the

path

computation

algorithm

which

iterates

between

and

times

An

accurate

estimation

is

needed

because

the

number

of

iterations

is

in

the

order

of

millions

for

a

big

N

Before

that

we

present

a

direct

comparison

between

the

naive

approach

to

index

reconstruction

and

our

new

optimal

algorithm

in

terms

of

the

number

of

disk

accesses

needed

-LRB-

not

the

resulting

time

-RRB-

This

is

shown

in

Table

for

representative

values

of

CHAPTER

THE

QUADTREE

METHOD

N

Min

disk

time

Max

disk

time

Min

CPU

time

Max

CPU

time

Min

total

time

Max

total

time

sec

sec

sec

sec

sec

sec

sec

sec

sec

sec

sec

sec

sec

sec

sec

sec

sec

sec

sec

min

sec

min

min

min

min

min

min

min

min

min

min

min

min

min

min

min

Table

Runtime

estimations

of

CPU

and

disk

access

overheads

sec

stands

for

seconds

and

min

stands

for

minutes

N

Naive

QRA

Optimal

QRA

Table

Comparison

of

the

naive

and

optimal

quadtree

reconstruction

algorithms

-LRB-

QRAs

-RRB-

in

required

number

of

disk

accesses

N

between

and

The

values

are

hardly

comparable

For

the

naive

algorithm

we

used

the

experiment

where

buffer

size

was

It

is

clear

that

the

naive

approach

is

extremely

inefficient

compared

to

the

one

we

proposed

here

We

return

to

CPU

cost

estimation

for

the

optimal

algorithm

The

main

statements

of

the

loop

body

include

a

function

for

computing

one

attribute

interval

for

the

mth

time

slice

and

an

object

oi

To

optimize

code

we

could

get

rid

of

function

call

overhead

and

include

directly

the

function

body

Furthermore

find-attribute-interval

-LRB-

m

op

-RRB-

's

statements

do

not

involve

iteration

and

we

could

arrange

it

to

use

a

closed

formula

to

find

n

It

then

reduces

to

a

small

number

-LRB-

two

to

four

-RRB-

of

floating

point

operations

to

which

we

-LRB-

pessimistically

-RRB-

give

a

few

microseconds

to

execute

The

remaining

statements

constitute

a

collection

of

comparisons

and

one

or

two

array

assignment

CHAPTER

THE

QUADTREE

METHOD

statements

whose

overhead

is

about

a

few

hundred

nanoseconds

-LRB-

in

fact

in

a

RISC

pipelined

architecture

they

may

take

much

less

-RRB-

Then

we

choose

to

assign

the

latter

collection

of

statements

sec

and

the

code

for

computing

n

sec

for

a

total

cost

of

sec

In

Table

minimum

and

maximum

values

for

disk

cost

CPU

cost

and

total

reconstruction

cost

are

provided

For

several

values

of

N

the

product

is

used

to

compute

minimum

disk

cost

and

to

compute

maximum

disk

cost

Let

us

compare

what

we

obtained

with

the

previous

experiments

on

build

cost

For

our

standard

buffer

size

of

and

a

value

of

N

as

low

as

we

needed

disk

accesses

which

last

minutes

-LRB-

using

access

cost

-RRB-

With

this

method

we

only

need

seconds

to

rebuild

a

quadtree

with

objects

The

naive

quadtree

regeneration

algorithm

rendered

the

whole

indexing

structure

impractical

to

use

for

applications

where

the

number

of

objects

exceeds

The

new

algorithm

yields

reasonable

performance

for

values

of

N

around

where

the

average

cost

is

between

and

minutes

This

is

especially

so

if

we

could

start

rebuilding

the

tree

before

the

current

period

T

ends

With

this

algorithm

we

thus

have

improved

the

manageable

number

of

objects

by

an

order

of

magnitude

However

our

-LRB-

ideal

-RRB-

target

is

N

for

which

we

still

have

impractical

regeneration

time

-LRB-

half

an

hour

-RRB-

We

think

that

objects

is

already

a

big

system

size

enough

for

a

-LRB-

relatively

-RRB-

wide

spectrum

of

applications

and

that

the

execution

time

for

N

for

example

is

quite

good

-LRB-

average

is

below

seconds

-RRB-

As

for

our

target

of

objects

given

the

optimality

of

the

algorithm

there

is

little

hope

to

achieve

it

with

improvements

of

the

above

method

A

-LRB-

radically

-RRB-

different

approach

or

indexing

structure

seems

necessary

to

achieve

a

practical

solution

-LRB-

if

one

exists

-RRB-

for

such

a

large

N

Let

us

now

take

a

look

at

query

performance

Query

Processing

We

study

two

types

of

range

queries

instantaneous

and

continuous

queries

Both

are

two

dimensional

range

queries

each

with

a

time

range

and

an

attribute

range

An

instantaneous

query

submitted

at

time

tnow

with

an

attribute

range

-LSB-

Rlow

Rhigh

-RSB-

targets

the

time

range

-LSB-

tnow

ffit

tnow

ffit

-RSB-

where

ffit

is

a

small

CHAPTER

THE

QUADTREE

METHOD

time

lapse

to

be

chosen

according

to

the

application

domain

Assume

we

are

at

the

ith-regular

quadtree

Then

we

may

constrain

ffit

to

be

small

compared

to

a

single

time

interval

of

the

quadtree

-LRB-

i.e

ffit

o

-RRB-

In

an

ith-regular

quadtree

the

number

of

disk

accesses

required

to

answer

a

range

query

is

-LRB-

intuitively

-RRB-

equal

to

the

number

of

quadrants

covered

by

the

range

Let

us

characterize

this

more

accurately

Let

AQ

Rhigh

Rlow

denote

the

length

of

the

attribute

range

of

a

query

Q

and

TQ

Thigh

Tlow

the

length

of

the

time

range

of

query

Q.

Excluding

the

effect

of

buffering

the

disk

access

cost

Cdisk

Q

of

such

a

query

is

Cdisk

Q

AQ

ffiai

ss

TQ

ffiti

ss

-LRB-

-RRB-

We

have

simply

multiplied

the

number

of

intervals

covered

by

each

of

the

two

ranges

For

the

special

case

when

one

range

starts

exactly

at

the

beginning

of

an

interval

the

is

removed

from

its

corresponding

multiplicand

in

Equation

If

further

the

range

ends

exactly

before

the

beginning

of

an

interval

then

we

also

remove

the

ceiling

expression

As

ranges

are

supplied

independently

of

the

current

status

of

the

quadtree

and

its

partition

we

expect

the

general

case

embodied

in

Equation

to

hold

most

of

the

time

We

can

then

determine

the

cost

of

instantaneous

and

continuous

queries

using

this

formula

When

we

assumed

ffit

o

above

we

actually

wanted

the

instantaneous

query

to

fit

in

a

single

time

slice

ffiti

Alternatively

we

may

adopt

the

policy

of

evaluating

an

instantaneous

query

submitted

at

tnow

using

the

time

interval

in

which

tnow

falls

since

our

purpose

in

using

parameter

ffit

was

to

have

a

finite

approximation

to

the

infinitesimal

tnow

For

continuous

queries

the

theoretical

time

range

over

which

they

are

evaluated

is

-LSB-

tnow

-RRB-

In

practice

if

a

continuous

query

comes

in

a

period

-LSB-

p?T

-LRB-

p

-RRB-

T

-RRB-

it

is

first

evaluated

over

the

time

interval

-LSB-

tnow

-LRB-

p

-RRB-

T

-RRB-

then

over

all

subsequent

periods

of

the

application

until

it

is

explicitly

deleted

from

the

queries

list

Letting

Cdisk

inst

and

Cdisk

cont

denote

the

disk

cost

of

instantaneous

and

continuous

queries

-LRB-

respectively

-RRB-

over

an

ith-regular

quadtree

we

obtain

the

following

formulas

Cdisk

inst

AQ

ffiai

ss

-LRB-

-RRB-

Cdisk

cont

AQ

ffiai

ss

-LRB-

-RRB-

CHAPTER

THE

QUADTREE

METHOD

55 500010000

Number

of

Objects

Average

Query

Cost

-LRB-

Disk

accesses

-RRB-

Number

of

Objects

Average

Query

Cost

-LRB-

Disk

accesses

-RRB-

Figure

Range

size

Figure

Range

size

Number

of

Objects

Average

Query

Cost

-LRB-

Disk

accesses

-RRB-

Number

of

Objects

Average

Query

Cost

-LRB-

Disk

accesses

-RRB-

Figure

Range

size

Figure

Range

size

Number

of

Objects

Average

Query

Cost

-LRB-

Disk

Accesses

-RRB-

Number

of

Objects

Average

Query

Cost

-LRB-

Disk

Accesses

-RRB-

Figure

Range

size

Figure

Range

size

Number

of

Objects

Average

Query

Cost

-LRB-

Disk

Accesses

-RRB-

Number

of

Objects

Average

Query

Cost

-LRB-

Disk

Accesses

-RRB-

Figure

Range

size

Figure

Range

size

CHAPTER

THE

QUADTREE

METHOD

The

cost

of

an

instantaneous

query

is

just

the

number

of

attribute

intervals

its

attribute

range

spans

while

for

continuous

queries

it

is

that

number

multiplied

by

the

number

of

time

intervals

in

T

Figures

and

show

the

average

cost

of

instantaneous

queries

as

a

function

of

N

across

a

few

typical

attribute

range

percentages

-LRB-

and

-RRB-

The

range

percentage

is

the

length

of

the

query

range

divided

by

A

and

multiplied

by

Notice

that

for

small

percentages

-LRB-

and

-RRB-

we

roughly

need

one

disk

access

The

graphs

exhibit

the

usual

plateau

pattern

The

graphs

for

continuous

queries

average

disk

access

cost

are

given

in

Figures

and

As

equation

predicts

for

small

percentages

of

the

attribute

space

-LRB-

and

-RRB-

the

average

cost

is

exactly

equal

to

at

the

ith

plateau

-LRB-

and

in

the

figures

-RRB-

For

larger

ranges

they

are

a

multiple

of

The

CPU

overhead

is

that

of

navigating

through

the

quadtree

from

the

root

to

the

relevant

leaves

For

a

duplication

ratio

D

this

cost

is

O

-LRB-

-LRB-

DN

-RRB-

-RRB-

A

major

drawback

of

disk

cost

for

both

instantaneous

and

continuous

queries

that

was

alluded

to

earlier

is

that

the

cost

of

the

same

query

doubles

when

the

quadtree

passes

from

the

ith

plateau

to

the

i

plateau

Chapter

THE

CROSS

POINTS

METHOD

In

this

chapter

we

provide

the

results

of

our

study

of

the

cross

points

approach

to

dynamic

attribute

indexing

We

start

in

Section

with

a

description

of

the

program

used

in

the

simulation

study

and

associated

data

structures

Section

contains

the

performance

results

of

the

experiments

that

were

run

on

the

method

and

some

pertinent

observations

Finally

in

Section

we

provide

a

critique

that

sums

up

most

of

our

thoughts

and

observations

pertaining

to

the

general

feasibility

of

the

approach

Program

and

Data

Structures

The

binary

tree

program

has

two

main

data

structures

the

binary

tree

node

bintree

-LRB-

BT

-RRB-

and

the

crosspoint

-LRB-

CP

-RRB-

defined

as

follows

BT

ID

a

b

Lef

t

Right

Par

CP

Time

P

os

IDlow

IDhigh

In

the

BT

record

the

fields

ID

a

and

b

are

the

object

properties

defined

earlier

while

the

Left

Right

and

Par

are

the

classical

pointers

of

a

binary

tree

node

A

crosspoint

is

uniquely

defined

by

four

parameters

These

are

the

CHAPTER

THE

CROSS

POINTS

METHOD

time

and

position

at

which

the

intersection

happens

and

the

two

participating

objects

The

fields

Time

P

os

IDlow

and

IDhigh

embody

this

information

To

be

able

to

correctly

process

an

intersection

we

need

to

know

which

object

had

a

lower

position

than

the

other

before

intersection

the

subscripts

in

IDlow

and

IDhigh

indicate

this

Note

that

no

information

about

the

objects

is

stored

in

a

cross

point

except

their

IDs

The

binary

tree

thus

defined

does

not

contain

the

keys

which

serve

to

build

and

maintain

it

These

keys

are

the

positions

of

the

objects

and

are

computable

for

a

given

time

t

using

the

a

and

b

fields

from

the

linear

motion

equation

so

that

key

-LRB-

t

-RRB-

at

b

This

computation

is

done

at

every

node

along

the

path

in

an

insert

delete

or

search

operation

and

the

result

is

compared

with

the

given

key

to

decide

to

go

left

or

right

or

stop

This

is

a

design

decision

Before

that

we

attempted

using

the

time

at

which

an

object

was

last

invoked

in

an

intersection

event

-LRB-

call

it

tCP

-RRB-

to

compute

the

position

yCP

of

an

object

o

residing

in

the

tree

We

then

would

assign

yCP

to

the

Key

field

of

o

in

BT

Resorting

to

such

a

policy

would

have

two

virtues

First

using

a

Key

field

allows

us

to

get

rid

of

including

the

slope

and

intercept

fields

in

BT

hence

saving

four

bytes

per

object

in

the

tree

Second

we

would

save

floating

point

computations

in

each

search

operation

-LRB-

O

-LRB-

log

N

-RRB-

-RRB-

which

might

be

a

tangible

performance

gain

for

large

N

since

search

is

an

integral

part

of

all

query

processing

operations

as

well

as

insert

delete

and

update

requests

It

would

anyway

be

interesting

to

find

a

correct

and

efficient

way

to

store

keys

even

without

saving

up

fields

of

the

BT

record

Finally

we

mention

two

more

record

structures

from

the

workload

generator

program

These

are

the

operation

record

OP

which

encompasses

update

insert

and

delete

requests

and

the

query

record

Q

used

to

store

information

about

instantaneous

and

continuous

queries

These

are

defined

as

follows

OP

Time

ID

a

b

Q

Time

Rlow

Rhigh

The

Time

field

stores

the

time

at

which

the

request

arrived

to

the

system

Fields

Rlow

and

Rhigh

store

the

lower

and

higher

ends

-LRB-

respectively

-RRB-

of

the

queried

attribute

space

R

for

range

query

Q.

Queries

and

operations

are

CHAPTER

THE

CROSS

POINTS

METHOD

59 500100015

Number

of

Objects

Number

of

Cross

Points

Number

of

Objects

Number

of

Cross

Points

Figure

ff

Figure

ff

Number

of

Objects

Number

of

Cross

Points

Number

of

Objects

Average

Time

Between

CPs

-LRB-

TU

-RRB-

Figure

ff

Figure

ff

stored

in

linked

lists

ordered

by

the

Time

field

in

non-decreasing

order

At

this

point

we

close

the

description

of

our

programs

which

we

hope

is

enough

and

pass

to

the

results

of

the

experiments

Performance

Results

The

set

of

intersections

or

cross

points

turns

out

to

play

a

decisive

role

upon

which

depends

the

very

practicality

and

applicability

of

the

method

First

we

examine

the

size

of

this

set

in

Figures

and

Notice

that

the

Number

of

Objects

Average

Time

Between

CPs

-LRB-

TU

-RRB-

Number

of

Objects

Average

Time

Between

CPs

-LRB-

TU

-RRB-

Figure

ff

Figure

ff

CHAPTER

THE

CROSS

POINTS

METHOD

Speed

Ratio

-LRB-

-RRB-

Execution

Cost

-LRB-

minutes

-RRB-

Figure

Execution

time

of

the

module

which

computes

and

stores

cross

points

-LRB-

N

-RRB-

maximumvalue

we

tried

was

This

is

because

of

the

-LRB-

discouragingly

-RRB-

huge

number

of

resulting

intersection

points

we

got

In

these

graphs

we

calculated

the

number

of

cross

point

events

that

occur

within

the

first

TUs

of

our

simulation

These

exclude

newly

coming

objects

during

those

TUs

each

bringing

its

own

set

of

intersection

points

As

an

example

for

objects

and

ff

we

obtain

about

intersections

this

is

intersections

per

unit

time

What

is

worse

the

curve

looks

like

a

square

function

This

leads

to

a

very

small

time

lapse

between

one

intersection

and

the

next

which

we

call

average

time

between

cross

points

The

values

for

this

parameter

as

a

function

of

N

are

shown

in

Figures

and

At

N

and

ff

the

average

is

around

TUs

It

increases

by

an

order

of

magnitude

-LRB-

to

TUs

-RRB-

when

ff

drops

by

an

order

of

magnitude

-LRB-

-RRB-

The

problem

is

that

the

values

of

N

experimented

with

are

very

low

and

it

is

difficult

to

imagine

the

size

of

the

set

of

intersection

points

at

N

not

to

mention

our

target

of

objects

Given

that

graphs

have

the

shape

of

a

quadratic

function

it

is

easy

to

see

that

the

intersections

set

size

will

be

impractical

to

handle

both

in

space

and

time

We

have

not

succeeded

in

finding

a

closed

formula

for

the

expected

number

of

intersections

in

a

system

with

N

objects

We

know

however

that

it

is

O

-LRB-

-RRB-

and

that

the

constant

factor

in

the

big-Oh

notation

depends

mainly

on

ff

the

speed

ratio

Finding

such

a

formula

would

help

a

lot

in

understanding

whether

or

not

the

difficulties

of

the

cross

points

method

are

inherent

but

it

turns

out

to

be

a

challenging

task

As

the

number

of

intersections

is

quite

large

it

is

only

natural

that

merely

computing

and

storing

them

consumes

a

lot

of

space

and

time

resources

We

CHAPTER

THE

CROSS

POINTS

METHOD

are

more

interested

in

the

latter

cost

because

storage

space

may

still

be

affordable

and

space

requirements

could

be

reduced

by

decreasing

the

lookahead

interval

T

In

Figure

we

present

execution

time

of

the

module

which

computes

the

intersections

between

objects

The

number

of

objects

used

was

and

we

measure

as

a

function

of

ff

which

ranges

from

to

-LRB-

rather

optimistic

-RRB-

We

note

however

that

we

use

a

linked

list

to

store

the

cross

points

and

found

that

the

resulting

insertion

time

of

a

single

cross

point

is

very

expensive

The

values

are

therefore

exaggerated

but

still

indicative

Our

first

conclusion

is

thus

that

cross

points

need

at

least

a

logarithmic

time

insert

indexing

structure

such

as

the

height-balanced

AVL

tree

We

then

also

require

that

retrieving

the

next

cross

point

-LRB-

in

the

processing

phase

-RRB-

take

O

-LRB-

-RRB-

which

was

the

case

with

our

linked

list

-LRB-

next

cross

point

at

the

head

of

the

list

-RRB-

Still

however

doing

this

may

not

be

enough

to

make

the

method

practical

For

example

the

length

of

T

does

not

affect

the

complexity

of

the

cross

points

computation

algorithm

In

other

words

a

smaller

T

does

not

relieve

us

from

the

requirement

to

examine

all

possible

pairs

-LRB-

hence

the

quadratic

complexity

is

imposing

-RRB-

And

no

obvious

subset

of

pairs

of

objects

may

be

possibly

known

not

to

intersect

in

some

near

future

time

interval

ffit

This

also

gives

us

a

rough

criteria

for

the

choice

of

T

Namely

it

should

be

as

big

as

we

afford

memory

to

store

cross

points

data

and

might

be

limited

only

by

the

constraint

of

a

reasonable

cross

point

retrieval

time

-LRB-

preferably

O

-LRB-

-RRB-

as

mentioned

above

-RRB-

All

these

observations

together

with

the

fact

that

we

did

not

implement

a

height-balanced

tree

-LRB-

just

a

normal

binary

tree

-RRB-

for

the

study

discouraged

us

from

doing

any

experiments

on

query

processing

However

it

is

easy

to

see

before

hand

that

insertion

deletion

and

update

overheads

as

well

as

query

processing

performance

all

benefit

from

the

O

-LRB-

log

N

-RRB-

complexity

For

a

value

of

N

as

large

as

-LRB-

our

dream

value

-RRB-

log

N

which

is

roughly

the

actual

number

of

floating

point

operations

and

comparisons

needed

to

perform

an

insertion

or

a

deletion

plus

the

cost

of

rotations

that

keep

the

height

balance

-LRB-

which

are

local

most

of

the

time

-RRB-

We

then

expect

the

cross

points

method

to

scale

very

well

to

large

values

of

N

if

the

problematic

overhead

of

cross

point

management

is

somehow

circumvented

The

above

observations

pushed

CHAPTER

THE

CROSS

POINTS

METHOD

us

to

reconsider

the

foundations

of

the

method

and

go

more

deeply

into

its

anatomy

We

came

up

with

a

collection

of

ideas

which

we

embody

in

the

following

critique

of

the

method

A

Critique

of

the

Cross

Points

Method

Our

speculation

about

the

difficulties

experienced

with

the

cross

points

method

and

the

search

for

ways

to

circumvent

them

led

us

to

believe

that

it

is

inherently

inefficient

with

respect

to

the

problem

it

tries

to

solve

This

belief

is

based

on

the

following

important

observation

While

we

would

ultimately

like

to

support

range

queries

of

different

kinds

we

are

taking

pains

to

record

every

event

at

which

trajectories

of

any

pair

of

objects

cross

each

other

From

a

purely

pragmatic

standpoint

this

information

is

not

necessary

for

answering

range

queries

It

is

difficult

to

envisage

an

application

wherein

the

event

of

two

objects

attributes

taking

the

same

value

at

the

same

time

would

be

a

useful

piece

of

information

Note

that

this

the

generalized

understanding

or

definition

of

a

cross

point

To

translate

this

to

our

favorite

example

of

moving

vehicles

we

are

recording

every

instance

at

which

a

vehicle

overtakes

another

and

every

instance

at

which

two

vehicles

come

across

each

other

when

they

are

on

the

same

route

-LRB-

running

in

opposite

directions

-RRB-

Nevertheless

all

we

are

demanding

to

know

is

which

vehicles

will

be

in

a

given

segment

of

the

route

during

a

given

time

slice

-LRB-

this

is

the

general

two-dimensional

range

query

-RRB-

Taking

this

to

a

higher

level

of

abstraction

we

are

dealing

with

the

relationship

between

objects

which

when

viewed

mathematically

has

a

quadratic

cardinality

in

the

system

size

N

We

thus

have

unnecessarily

raised

both

the

space

and

time

complexity

of

our

problem

when

it

did

not

require

so

Remember

that

the

management

of

cross

points

is

the

auxiliary

overhead

that

was

needed

to

keep

the

main

indexing

structure

-LRB-

the

height-balanced

AVL

tree

-RRB-

functioning

properly

We

do

not

deny

that

by

just

looking

at

the

binary

tree

storing

attribute

order

we

have

both

an

elegant

structure

and

a

very

efficient

one

indeed

with

O

-LRB-

N

-RRB-

space

overhead

and

O

-LRB-

N

-RRB-

time

overhead

for

all

operations

and

queries

supported

However

the

price

we

pay

for

that

is

too

high

We

attempted

to

remedy

this

by

trying

to

find

a

more

efficient

way

to

manage

cross

points

CHAPTER

THE

CROSS

POINTS

METHOD

We

then

had

the

impression

that

the

cross

points

computation

problem

does

not

yield

itself

easily

to

complexity

reduction

There

apparently

is

little

room

for

optimizations

and

the

problem

is

inherently

quadratic

To

appreciate

this

more

consider

the

naive

approach

We

exhaustively

examine

all

the

pairs

of

objects

-LRB-

except

of

course

an

object

and

itself

-RRB-

and

compute

at

which

point

in

time

the

pair

intersects

It

might

be

in

the

future

and

it

could

have

been

in

the

past

If

the

intersection

is

in

a

reasonably

near

future

-LRB-

e.g.

within

the

specified

lookahead

interval

T

-RRB-

then

it

is

stored

or

appended

to

the

list

of

cross

points

taking

into

account

its

position

in

time

relative

to

the

other

cross

points

We

can

immediately

spot

the

following

two

sources

of

inefficiency

in

this

naive

algorithm

We

are

uselessly

computing

the

cross

point

events

which

take

place

in

the

far

future

Having

discovered

that

an

intersection

is

too

far

in

the

future

for

us

to

bear

the

cost

of

storing

it

we

just

ignore

it

Nevertheless

we

will

compute

it

again

in

the

coming

period

when

T

time

has

elapsed

In

fact

if

it

is

very

far

in

the

future

we

may

do

the

same

computation

several

times

-LRB-

i.e.

more

than

two

-RRB-

before

we

come

to

store

it

We

are

analogously

uselessly

storing

the

cross

point

events

which

took

place

in

the

past

What

is

even

worse

we

in

fact

compute

intersection

events

which

never

took

place

Using

the

moving

vehicles

analogy

assume

a

moving

vehicle

suddenly

popped

up

-LRB-

i.e.

registered

to

our

system

-RRB-

moving

at

a

relatively

high

speed

Then

the

naive

algorithm

will

assume

it

had

to

overtake

or

come

across

all

the

objects

that

are

currently

behind

it

-LRB-

depending

on

their

direction

of

motion

and

their

velocities

-RRB-

However

it

could

simply

have

just

entered

the

current

road

or

highway

from

a

junction

In

other

words

we

are

acting

as

if

each

object

begins

its

journey

along

the

attribute

dimension

from

one

of

its

endpoints

Our

attempts

to

reduce

the

search

space

or

rule

out

the

useless

pairs

which

are

known

not

to

intersect

in

the

future

failed

to

materialize

into

an

algorithm

We

remark

however

that

by

sorting

the

objects

along

the

attribute

dimension

and

also

sorting

then

according

to

the

absolute

values

of

their

slopes

we

could

know

which

subset

of

the

N

objects

will

meet

in

the

future

To

explain

this

CHAPTER

THE

CROSS

POINTS

METHOD

speed

behind

faster

behind

slower

ahead

faster

ahead

slower

A

A

position

V

V

max

min

min

max

Figure

Subset

of

vehicles

to

come

across

a

given

vehicle

in

the

future

The

selected

vehicle

is

at

the

center

and

the

shaded

area

is

for

vehicles

which

will

not

meet

it

The

vehicles

in

this

graph

move

in

the

same

direction

as

the

designated

one

in

the

center

speed

A

A

position

V

V

max

min

min

max

behind

ahead

Figure

The

same

situation

for

vehicles

moving

in

the

opposite

direction

to

that

of

the

given

vehicle

Speed

is

irrelevant

here

it

will

meet

with

all

vehicles

currently

ahead

of

it

and

with

of

the

vehicles

behind

it

we

again

resort

to

the

moving

vehicles

analogy

We

just

remind

the

reader

that

velocity

corresponds

to

the

slope

or

rate

of

change

of

the

attribute

value

in

the

linear

equation

f

-LRB-

t

-RRB-

at

b

associated

with

every

dynamic

attribute

The

idea

is

best

explained

in

Figures

and

We

plot

the

objects

in

the

position-velocity

For

any

arbitrary

object

in

this

space

we

want

to

know

which

objects

will

intersect

in

the

future

The

space

for

objects

moving

in

the

same

direction

as

its

own

is

depicted

in

Figure

and

the

second

case

for

objects

moving

in

the

direction

opposite

to

its

own

is

shown

in

Figure

Unfortunately

this

does

not

culminate

in

any

computation

which

allows

us

to

determine

the

forthcoming

intersections

in

less

than

complexity

However

it

seems

we

have

looked

from

too

narrow

an

angle

to

hope

for

a

solution

when

we

considered

a

single

object

's

prospects

From

a

global

system

perspective

we

would

like

to

know

about

the

criteria

-LRB-

if

any

-RRB-

for

predicting

the

forthcoming

cross

point

events

A

more

useful

and

precise

question

would

be

the

following

given

a

snapshot

of

the

system

at

some

point

in

time

is

there

a

mathematical

expression

for

the

next

pair

or

m

pairs

of

objects

that

will

sign

of

the

slope

which

corresponds

to

the

direction

of

motion

might

be

conceived

of

as

the

third

dimension

Instead

we

simply

use

two

graphs

CHAPTER

THE

CROSS

POINTS

METHOD

intersect

Consider

the

objects

in

sorted

order

along

the

attribute

dimension

Let

oi

and

oi

be

two

adjacent

objects

at

positions

ai

and

ai

moving

with

velocities

-LRB-

or

slopes

-RRB-

vi

and

vi

respectively

By

looking

at

the

sign

of

their

slopes

-LRB-

which

corresponds

to

the

direction

of

motion

for

vehicles

-RRB-

we

could

know

whether

or

not

they

will

intersect

in

the

future

If

this

is

the

case

then

the

time

tCP

at

which

their

intersection

event

takes

place

is

given

by

the

formula

tCP

ai

ai

vi

vi

-LRB-

-RRB-

This

is

just

the

distance

separating

the

two

objects

divided

by

their

relative

speeds

The

pair

of

objects

which

will

intersect

next

is

simply

the

pair

with

the

lowest

tCP

This

could

only

lead

us

to

an

O

-LRB-

N

-RRB-

algorithm

for

finding

the

next

cross

point

and

an

O

-LRB-

mN

-RRB-

algorithm

for

finding

the

next

m

cross

points

in

order

which

ironically

turns

out

to

be

worse

than

the

O

-LRB-

-RRB-

naive

algorithm

We

have

thus

provided

a

critique

and

an

explanation

of

the

difficulties

and

disadvantages

of

the

cross

points

method

We

also

described

a

few

of

our

attempts

to

introduce

improvements

on

the

method

which

though

did

not

culminate

with

success

have

resulted

in

a

better

understanding

of

its

anatomy

We

hope

we

were

nor

unjust

to

the

method

and

that

we

did

not

miss

any

important

observation

which

might

reverse

the

judgment

Chapter

THE

FP-INDEX

Introduction

In

Chapter

we

studied

the

use

of

the

PR

quadtree

for

dynamic

attribute

indexing

The

study

revealed

high

storage

requirements

which

in

turn

affect

query

processing

performance

This

compelled

us

to

investigate

new

ways

of

indexing

that

do

not

have

this

disadvantage

The

result

of

our

investigation

was

the

development

of

a

novel

indexing

method

that

is

at

the

same

time

much

simpler

and

more

efficient

across

most

performance

parameters

when

compared

to

the

quadtree

The

purpose

of

this

chapter

is

to

present

the

details

of

the

method

We

also

contribute

a

new

algorithm

for

processing

continuous

queries

that

is

optimal

in

the

number

of

disk

accesses

required

With

this

algorithm

we

could

even

reach

an

average

of

less

than

one

disk

access

per

continuous

query

We

start

by

giving

the

motivation

behind

the

method

in

Section

Section

gives

a

description

of

our

new

access

method

we

called

it

the

Fixed

Partitioning

Index

-LRB-

FP

index

-RRB-

In

Section

we

digress

briefly

on

the

practical

values

for

ff

and

the

length

of

a

single

time

unit

this

is

a

necessary

background

for

our

subsequent

analysis

and

estimations

Section

provides

an

analysis

of

build

cost

and

Section

describes

the

primary

and

secondary

memory

requirements

of

the

index

with

comparisons

to

the

quadtree

Section

gives

insertion

cost

and

presents

a

technique

called

delayed

insert

for

improving

it

In

Section

we

analyze

the

expected

cost

of

range

queries

when

using

our

index

both

CHAPTER

THE

FP-INDEX

continuous

and

instantaneous

queries

are

considered

Section

gives

the

details

of

our

novel

optimization

algorithm

for

continuous

queries

Finally

we

conclude

the

chapter

in

Section

Motivation

We

have

noted

earlier

that

one

of

the

drawbacks

of

the

quadtree

approach

is

an

excessive

number

of

copies

-LRB-

or

a

high

duplication

ratio

D

-RRB-

that

directly

affects

all

kinds

of

operations

and

both

kinds

of

queries

performed

on

the

tree

However

we

must

remark

that

there

is

no

way

to

avoid

duplication

which

is

inherent

to

our

problem

Since

we

are

monitoring

an

attribute

over

time

we

must

have

more

than

a

single

copy

of

its

corresponding

object

What

is

then

a

reasonable

number

of

copies

When

does

duplication

start

to

involve

unwarranted

redundancy

Let

us

return

to

the

specific

picture

of

things

in

our

quadtree

We

found

that

a

trajectory

spends

a

long

portion

-LRB-

if

not

all

-RRB-

of

T

crossing

a

single

attribute

interval

-LRB-

T

is

the

length

of

the

time

period

between

index

reconstructions

-RRB-

If

it

takes

n

time

intervals

to

cross

that

single

attribute

interval

then

we

are

uselessly

storing

n

copies

because

all

of

the

n

copies

convey

one

piece

of

information

namely

that

a

given

object

crossed

a

given

attribute

interval

between

some

time

tenters

and

another

time

tleaves

We

derived

earlier

the

expression

for

the

number

of

quadrants

crossed

by

a

trajectory

which

spans

m

attribute

intervals

over

n

time

intervals

which

was

n

m

We

could

as

well

have

used

a

single

copy

for

every

attribute

interval

covered

which

means

m

copies

-LRB-

then

also

n

redundant

copies

-RRB-

This

is

the

minimumwe

can

afford

if

the

subdivision

of

the

attribute

space

is

imposed

on

us

-LRB-

given

that

is

-RRB-

The

conception

of

the

proposed

method

of

dynamic

attribute

indexing

is

inspired

by

the

foregoing

observation

The

fact

that

an

object

spends

most

of

its

time

in

a

single

attribute

interval

suggests

to

us

that

we

might

exclude

the

time

dimension

altogether

from

our

indexing

information

and

use

a

unidimensional

index

The

details

of

the

method

are

outlined

in

the

next

section

CHAPTER

THE

FP-INDEX

t

i

Tt

enters

t

i

a

j

j

a

time

attribute

t

leaves

Figure

Non-transitory

objects

The

FP-Index

The

main

idea

of

the

FP-index

is

to

keep

the

technique

of

indexing

over

consecutive

time

intervals

of

length

T

-LRB-

known

as

sessions

-RRB-

but

index

only

on

the

single

attribute

dimension

We

still

regenerate

and

destroy

our

index

every

T

time

units

We

partition

in

a

static

way

our

attribute

space

-LSB-

A

-RRB-

into

E

equal-sized

attribute

intervals

each

of

length

ffiaE

A

E

We

will

call

E

the

partition

size

If

between

ti

and

ti

T

a

trajectory

crosses

m

such

-LRB-

consecutive

-RRB-

intervals

then

we

need

m

copies

of

the

corresponding

object

one

in

each

of

the

m

intervals

Furthermore

given

an

interval

and

an

object

crossing

it

besides

storing

the

three

object

parameters

-LRB-

ID

a

b

-RRB-

we

also

add

the

time

tenters

at

which

the

object

has

entered

the

interval

and

the

time

tleaves

at

which

the

object

left

the

interval

-LRB-

they

satisfy

ti

tenters

tleaves

ti

T

-RRB-

According

to

when

objects

might

enter

and

leave

the

attribute

interval

we

may

distinguish

three

cases

These

cases

correspond

to

two

categories

of

interval

crossing

Objects

might

have

entered

the

attribute

interval

at

some

time

earlier

than

ti

the

beginning

of

the

ith

session

Then

they

spend

all

the

session

inside

this

same

attribute

interval

-LRB-

aj

f

-LRB-

t

-RRB-

aj

ti

t

ti

T

-RRB-

These

objects

are

assigned

to

an

independent

category

which

we

call

the

category

of

non-transitory

objects

depicted

in

Figure

They

have

tenters

ti

and

tleaves

ti

T

although

they

actually

entered

before

ti

and

will

leave

after

ti

T

-LRB-

tleaves

ti

T

-RRB-

We

choose

this

assignment

for

query

processing

purposes

which

make

comparisons

easy

during

the

filtering

of

query

data

On

the

other

extreme

are

objects

which

enter

the

interval

after

ti

and

CHAPTER

THE

FP-INDEX

t

t

t

t

enters

leavesi

i

T

j

j

a

a

Figure

First

kind

of

transitory

objects

Trajectory

enters

the

given

attribute

interval

after

ti

the

beginning

of

the

session

and

leaves

it

before

its

end

-LRB-

at

ti

T

-RRB-

t

i

Tt

enters

t

i

t

t

leaves

leaves

a

j

j

a

time

attribute

Figure

Second

kind

of

transitory

objects

Trajectory

entered

the

given

attribute

interval

in

an

earlier

session

-LRB-

before

ti

-RRB-

and

leaves

it

before

the

end

of

the

current

session

-LRB-

at

ti

T

-RRB-

leave

it

before

ti

T

-LRB-

ti

tenters

tleaves

ti

T

-RRB-

as

shown

in

Figure

These

belong

to

the

second

category

which

we

call

transitory

objects

because

they

do

not

live

in

the

interval

for

the

length

of

the

session

but

pass

through

it

temporarily

Finally

the

third

case

of

interval

crossing

whose

objects

are

also

transitory

occurs

when

an

object

has

entered

the

interval

at

some

time

before

ti

but

leaves

the

interval

before

the

end

of

the

session

-LRB-

tleaves

ti

T

-RRB-

This

case

is

shown

in

Figure

For

these

objects

we

choose

the

assignment

tenters

ti

although

in

reality

tenters

ti

in

order

to

simplify

computations

and

filtering

as

mentioned

above

In

our

application

the

variables

tenters

and

tleaves

are

needed

in

the

processing

of

instantaneous

queries

which

cover

a

thin

time

segment

that

must

be

compared

with

them

to

check

for

overlap

Having

said

this

let

us

go

back

to

the

FP-index

This

is

a

linear

array

A

of

E

entries

where

the

ith

entry

is

responsible

for

indexing

the

ith

interval

As

such

it

relies

on

a

Fixed

Partitioning

of

the

attribute

space

hence

the

name

FP-index

Figure

shows

the

memory

and

disk

portions

of

the

FP-index

Each

entry

A

-LSB-

i

-RSB-

is

a

record

F

irstP

agei

LastPagei

with

two

fields

F

irstP

agei

is

a

pointer

to

the

first

disk

page

that

contains

data

about

the

objects

which

cross

the

ith

attribute

interval

during

the

current

session

Since

a

single

attribute

interval

may

easily

be

crossed

by

more

trajectories

than

can

be

stored

in

a

single

disk

page

A

-LSB-

i

-RSB-

must

point

us

to

a

set

CHAPTER

THE

FP-INDEX

P

P

P

P

P

P

P

P

P

En

E

Data

pages

on

secondary

storageIndex

directory

in

main

memory

Figure

The

FP-Index

of

disk

pages

We

implement

this

by

including

a

field

in

every

disk

page

that

contains

a

pointer

to

the

next

disk

page

in

the

chain

-LRB-

of

pages

-RRB-

corresponding

to

the

current

attribute

interval

In

order

to

facilitate

insertion

we

include

the

field

LastPagei

which

points

to

the

last

disk

page

of

the

chain

Notice

that

we

make

no

distinction

between

transitory

and

non-transitory

objects

in

the

index

All

of

them

are

stored

together

arbitrarily

without

regard

to

any

information

about

time

except

the

order

in

which

they

were

inserted

into

the

index

during

reconstruction

To

gain

more

insight

into

the

method

let

us

make

some

analysis

and

reconsider

the

amount

of

duplication

involved

Let

v

denote

the

average

speed

of

objects

in

the

system

In

the

FP-index

an

object

has

as

many

copies

m

as

the

number

of

attribute

intervals

it

crosses

in

a

time

T

The

distance

covered

by

an

object

in

a

session

is

v?T

thus

we

have

a

duplication

ratio

D

as

follows

D

v?T

ffiaE

ss

-LRB-

-RRB-

To

ease

our

job

we

will

remove

the

ceiling

from

Equation

this

results

in

an

error

less

than

We

will

see

later

that

our

D

is

in

the

order

of

a

few

tens

in

CHAPTER

THE

FP-INDEX

fact

even

if

it

is

smaller

than

that

we

still

consider

decimal

fractions

negligible

Then

we

have

D

v?T

ffiaE

Remember

that

the

speed

ratio

ff

was

defined

by

the

formula

ff

v?A

as

the

fraction

of

distance

traveled

by

an

object

moving

with

mean

speed

v

in

a

single

time

unit

with

respect

to

A

Then

we

have

v

ff?A

Substituting

this

in

Equation

we

obtain

D

ff?A?T

ffiaE

-LRB-

-RRB-

However

by

definition

E

A

ffiaE

Substituting

by

E

in

Equation

we

get

the

following

neat

closed

form

for

the

average

number

of

duplicates

D

ffE?T

-LRB-

-RRB-

We

have

thus

a

deceptively

arithmetic

equation

that

brings

the

four

main

parameters

of

our

index

together

These

are

the

duplication

ratio

D

the

speed

ratio

ff

the

partition

size

E

and

the

index

regeneration

period

T

It

also

provides

us

with

a

few

hints

on

the

mechanics

of

our

method

Given

a

fixed

ff

the

higher

E

the

higher

the

number

of

duplicates

we

will

have

This

is

intuitive

since

a

high

E

means

a

fine

partitioning

of

the

attribute

space

that

causes

every

trajectory

to

cross

a

larger

number

of

intervals

in

a

session

-LRB-

though

still

the

same

distance

-RRB-

D

also

increases

when

we

increase

T

a

hint

that

gives

us

the

factor

that

will

deprive

us

from

enjoying

a

long

T

This

is

also

intuitive

since

given

more

time

an

object

travels

more

distance

hence

more

intervals

Related

to

this

observation

is

an

interesting

special

case

of

Equation

the

case

when

the

product

ffE

equals

This

yields

the

elementary

equality

D

T

-LRB-

-RRB-

It

says

that

we

can

enjoy

as

many

time

units

between

index

reconstructions

as

we

can

afford

duplicates

of

our

objects

indeed

a

pattern

that

we

did

not

expect

We

have

to

say

first

that

this

special

case

is

not

contrived

or

theoretical

given

that

ff

is

a

fixed

application

parameter

one

simply

chooses

E

and

checks

if

it

makes

a

reasonable

D

In

the

next

section

we

present

a

practical

case

where

it

holds

Furthermore

the

product

ffE

is

not

a

meaningless

mathematical

product

Since

ff

is

the

fraction

of

distance

traveled

in

a

single

time

unit

ffE

is

just

the

average

number

of

attribute

intervals

crossed

in

a

single

time

fact

this

is

one

of

the

simplest

possible

four-variable

equations

CHAPTER

THE

FP-INDEX

unit

Equation

is

very

important

and

dominates

the

rest

of

this

chapter

all

subsequent

analysis

estimations

and

comparisons

are

dependent

on

it

in

one

way

or

another

Before

proceeding

to

work

out

its

consequences

we

introduce

two

quantities

that

are

characteristic

to

the

method

The

first

quantity

is

the

number

of

index

points

PE

that

we

expect

to

have

in

a

single

attribute

interval

when

our

attribute

space

is

partitioned

into

E

intervals

It

is

readily

computed

as

PE

-LRB-

N

D

-RRB-

E

where

the

product

N

D

gives

us

the

total

number

of

index

points

generated

The

second

quantity

is

presented

through

the

following

definition

Definition

An

Interval

Weight

w

is

the

number

of

data

pages

needed

to

store

the

index

elements

that

belong

to

that

attribute

interval

w

N

D

E

B

ss

where

E

is

the

partition

size

N

is

the

system

size

D

is

the

average

number

of

duplicates

per

object

in

the

system

and

B

is

the

page

size

-LRB-

in

records

-RRB-

The

value

of

B

in

our

application

is

This

is

obtained

by

dividing

page

size

-LRB-

bytes

-RRB-

by

record

size

which

requires

Bytes

in

our

case

Note

that

w

dPEB

e

We

also

use

E

as

a

fixed

value

in

all

that

follows

We

think

it

is

a

reasonable

choice

between

the

two

extremes

of

high

and

low

values

An

unnecessarily

big

E

yields

an

excessive

number

of

copies

which

is

the

problem

we

set

out

to

avoid

in

the

first

place

A

small

E

is

bad

for

query

processing

because

the

query

answer

becomes

only

a

small

subset

of

what

we

have

to

retrieve

to

compute

it

We

will

also

see

that

in

practice

it

brings

about

reasonable

values

with

the

remaining

three

parameters

-LRB-

see

the

next

section

-RRB-

It

remains

to

experiment

with

values

of

ff

and

T

and

see

what

the

resulting

performance

parameters

look

like

We

will

do

this

in

the

framework

of

a

hypothetical

application

domain

that

justifies

our

selection

of

particular

values

for

E

ff

and

T

we

hope

this

application

is

typical

Since

this

gets

us

nearer

to

real

applications

we

first

have

to

understand

better

what

ff

and

time

units

stand

for

in

practice

We

see

this

in

the

next

section

CHAPTER

THE

FP-INDEX

The

Nature

of

ff

and

Time

Units

We

have

all

along

been

using

ff

and

T

in

an

abstract

way

We

want

to

know

how

large

or

small

ff

is

in

a

real

application

Since

ff

is

the

fraction

of

distance

traveled

in

a

single

time

unit

we

first

have

to

know

how

long

is

a

single

time

unit

Is

TU

equal

to

an

hour

a

minute

or

a

second

-LRB-

or

less

-RRB-

We

can

examine

the

effect

of

each

possibility

in

the

context

of

an

application

We

consider

a

stretch

of

distance

that

is

Km

long

and

vehicles

moving

along

it

in

both

directions

-LRB-

directions

correspond

to

negative

and

positive

slopes

-RRB-

with

an

average

speed

v

Km/hour

We

check

the

three

cases

one

by

one

If

TU

hour

then

objects

move

a

distance

of

Km

out

of

Km

in

a

single

time

unit

this

yields

ff

and

ffE

-LRB-

remember

E

is

fixed

at

-RRB-

Then

Equation

reduces

to

D

T

and

it

is

up

to

us

now

to

choose

T

thereby

monitoring

the

resulting

D

If

we

let

T

TU

then

we

regenerate

the

index

once

in

an

hour

and

accept

to

have

copies

of

each

object

-LRB-

i.e.

each

object

crosses

intervals

of

length

in

an

hour

-RRB-

Using

the

same

calculations

if

TU

minute

then

ff

ffE

and

we

have

the

interesting

special

case

mentioned

earlier

where

D

T

Again

it

is

up

to

us

to

choose

T

and

this

time

we

choose

T

TUs

which

gives

D

We

obtain

the

same

number

of

copies

per

object

to

store

but

we

also

get

the

same

regeneration

period

-LRB-

minutes

hour

-RRB-

we

continue

with

the

last

case

If

TU

second

then

ff

and

ffE

so

that

Equation

evaluates

to

D

T

This

time

we

choose

T

TUs

which

again

gives

D

and

the

same

period

of

one

hour

-LRB-

seconds

-RRB-

between

index

regenerations

What

does

all

this

mean

First

the

selection

of

the

length

of

a

single

time

unit

is

immaterial

it

worked

neither

for

nor

against

us

due

to

the

following

reason

The

shorter

is

a

single

time

unit

the

smaller

is

the

resulting

ff

-LRB-

since

objects

travel

less

distance

when

time

is

shorter

-RRB-

But

then

we

counter

this

by

assigning

T

a

proportionately

larger

number

that

keeps

the

real

period

length

the

same

and

yields

the

same

D.

Second

the

fact

that

ff

fluctuated

from

to

without

affecting

the

nature

of

our

indexing

problem

suggests

that

we

can

always

play

with

values

-LRB-

mainly

T

-RRB-

to

get

a

tolerable

duplication

ratio

D

or

at

least

find

a

compromise

between

T

and

D

The

reader

might

object

that

our

choice

of

v

-LRB-

Km/hr

-RRB-

and

A

-LRB-

CHAPTER

THE

FP-INDEX

Km

-RRB-

already

determined

everything

and

the

rest

was

a

change

of

units

this

might

be

true

In

general

we

feel

that

a

highly

turbulent

and

dynamic

system

-LRB-

i.e.

a

big

ff

-RRB-

or

a

very

sluggish

one

probably

need

to

be

treated

as

special

cases

and

pose

a

different

indexing

problem

to

be

solved

Whatever

the

case

we

will

continue

with

the

above

context

and

in

subsequent

sections

we

will

use

the

second

alternative

for

the

length

of

a

single

time

unit

that

is

minute

We

chose

this

because

it

gives

our

special

case

D

T

and

also

relieves

the

reader

from

making

any

calculations

to

derive

D

from

T

or

vice

versa

in

the

examples

that

follow

For

this

we

ask

the

reader

to

keep

in

mind

that

D

means

both

that

we

incur

copies

per

object

and

that

we

generate

the

index

every

minutes

In

our

attempt

to

understand

the

performance

of

the

FP

index

we

use

the

values

and

for

D

The

latter

value

means

that

we

may

even

afford

a

single

copy

per

object

in

the

whole

index

if

we

are

able

to

regenerate

it

in

a

relatively

short

time

every

minute

We

will

also

test

four

values

of

N

which

are

and

We

start

by

looking

at

regeneration

or

build

cost

Build

Cost

We

build

the

FP-index

in

the

same

way

as

we

did

with

the

quadtree

method

We

allocate

an

array

in

memory

of

E

elements

and

then

go

through

the

trajectories

one

by

one

inserting

an

index

element

with

associated

information

tenters

and

tleaves

in

every

interval

crossed

by

the

trajectory

in

the

next

T

time

units

Since

in

this

method

we

select

T

and

D

beforehand

we

know

there

will

be

about

N

D

operations

of

this

kind

After

finishing

this

we

go

through

the

array

entries

and

pack

every

B

index

elements

together

allocate

a

disk

page

for

them

and

write

them

to

the

disk

We

also

update

our

index

array

A

to

record

information

about

the

first

and

last

disk

pages

storing

data

of

the

current

attribute

interval

being

processed

Here

again

we

view

build

cost

as

the

sum

of

an

in-memory

processing

phase

cost

and

the

cost

of

the

phase

where

pages

are

flushed

to

disk

The

cost

of

the

latter

phase

is

computed

by

multiplying

the

number

of

disk

pages

needed

by

the

index

by

the

disk

access

time

The

total

number

of

disk

accesses

needed

is

just

E

times

the

number

of

CHAPTER

THE

FP-INDEX

N

Disk

Access

Time

seconds

minutes

minutes

hr

min

Table

Time

to

reconstruct

the

quadtree

disk

pages

per

interval

that

is

interval

weight

w.

Thus

we

have

Disk

Access

Cost

wE

-LRB-

-RRB-

We

will

use

the

value

of

milliseconds

as

an

estimation

of

the

time

it

takes

to

access

a

disk

page

In

our

study

of

quadtrees

we

used

a

minimal

value

of

msecs

and

a

maximal

value

of

msecs

here

we

are

using

their

average

To

have

a

fair

comparison

we

will

also

repeat

estimations

for

the

quadtree

regeneration

time

using

the

value

of

msecs

as

a

disk

access

time

Furthermore

we

note

here

that

in

an

earlier

table

on

build

cost

estimations

for

quadtrees

we

used

the

formula

i

-LRB-

N

B

-RRB-

c

to

compute

the

order

of

a

quadtree

with

N

elements

This

formula

gives

an

order

i

that

is

one

less

than

the

real

order

in

practice

due

to

the

assumption

of

minimal

split

waves

and

a

perfect

pattern

of

plateaus

and

split

In

this

chapter

we

will

use

the

real

order

for

which

is

as

follows

for

N

for

N

for

N

and

for

N

We

remind

the

reader

that

is

the

side

length

of

the

partitioned

space

after

inserting

the

N

objects

and

the

resulting

quadtree

requires

pages

of

secondary

memory

The

resulting

disk

access

time

for

the

four

studied

values

of

N

are

given

in

Table

We

have

earlier

said

that

for

N

the

quadtree

becomes

impractical

We

did

not

include

the

CPU

portion

of

build

cost

as

it

is

overshadowed

by

the

high

disk

access

cost

Before

we

present

the

tables

for

the

FP-index

we

digress

briefly

on

an

aspect

of

build

cost

not

mentioned

before

It

was

implicitly

assumed

and

accepted

throughout

the

study

that

the

time

spent

rebuilding

the

index

is

an

idle

time

during

which

no

requests

of

any

kind

already

suggested

that

in

practice

we

may

add

one

to

the

computed

order

to

allow

for

earlier

splits

CHAPTER

THE

FP-INDEX

N

D

D

D

D

Table

CPU

cost

of

reconstructing

the

FP-index

-LRB-

in

seconds

-RRB-

will

be

We

are

then

required

to

reduce

build

cost

as

much

as

we

can

to

bring

system

idleness

to

acceptable

levels

A

measure

of

the

goodness

of

a

build

time

is

how

long

it

is

compared

to

T

Let

Trebuild

denote

the

time

it

takes

to

rebuild

the

index

We

then

formalize

the

notion

of

system

idleness

through

a

parameter

we

call

percentage

idleness

defined

by

the

formula

Percentage

Idleness

Trebuild

Trebuild

T

-LRB-

-RRB-

In

practice

we

would

tolerate

different

percentage

idleness

values

according

to

the

nature

of

the

application

which

involves

such

parameters

as

heaviness

of

workload

or

desired

response

time

-LRB-

for

queries

-RRB-

In

Tables

and

we

provide

the

estimations

of

CPU

time

and

disk

access

time

in

the

rebuild

cost

of

the

FP-index

we

also

give

percentage

The

first

thing

we

notice

when

comparing

to

quadtree

values

is

that

there

is

a

remarkable

improvement

and

that

disk

access

cost

for

the

FP-index

is

substantially

lower

than

its

quadtree

counterpart

The

biggest

value

we

tried

for

N

-LRB-

objects

-RRB-

which

with

a

quadtree-based

index

required

one

hour

and

a

half

now

takes

only

minutes

at

D

and

minutes

at

D

For

N

we

have

minute

at

D

while

it

required

minutes

with

quadtrees

The

CPU

cost

of

reconstruction

is

almost

negligible

for

most

combinations

of

N

and

D

as

evidenced

in

Table

In

both

component

costs

of

reconstruction

not

only

does

the

FP-index

beat

the

quadtree

in

its

feasible

range

of

N

-LRB-

up

to

-RRB-

but

it

also

produces

practical

costs

for

higher

values

of

N

which

are

infeasible

with

quadtrees

For

our

dream

value

of

N

we

may

in

fact

consider

D

to

be

a

feasible

solution

where

the

FP-index

index

could

be

reconstructed

in

parallel

but

this

would

require

twice

as

much

memory

we

rule

out

this

consideration

anyway

ignored

CPU

time

in

computing

percentage

idleness

as

it

is

negligible

CHAPTER

THE

FP-INDEX

N

D

D

D

D

Access

Percent

Access

Percent

Access

Percent

Access

Percent

Time

Idleness

Time

Idleness

Time

Idleness

Time

Idleness

sec

sec

sec

sec

min

sec

sec

sec

min

min

sec

sec

min

min

min

sec

Table

Disk

access

cost

of

reconstructing

the

FP-index

is

regenerated

every

minutes

and

takes

minutes

to

construct

yielding

a

percentage

idleness

equal

to

Now

what

is

the

effect

of

D

It

is

directly

related

to

the

storage

requirements

of

the

index

Halving

D

-LRB-

roughly

-RRB-

halves

the

number

of

disk

pages

consumed

which

in

turn

halves

build

cost

Besides

percentage

idleness

provides

us

with

a

heuristic

for

choosing

a

suitable

D

that

does

not

unnecessarily

tax

our

memory

When

we

have

approximately

the

same

percentage

idleness

for

two

different

values

of

D

then

we

select

the

smaller

D

to

save

space

Another

pattern

we

see

in

Table

is

that

percentage

idleness

increases

as

D

decreases

This

reveals

that

although

decreasing

D

causes

build

cost

and

T

to

decrease

by

a

similar

factor

they

apparently

do

not

decrease

proportionately

enough

to

keep

the

ratio

Trebuild

-LRB-

Trebuild

T

-RRB-

constant

An

extreme

case

is

at

D

when

we

are

busy

one

third

of

the

time

reconstructing

-LRB-

seconds

for

every

minute

-RRB-

This

is

due

to

the

fact

that

the

index

has

reached

a

number

of

disk

pages

-LRB-

-RRB-

below

which

it

can

not

drop

which

corresponds

to

the

limit

of

w

even

if

the

actual

number

of

index

points

requires

much

less

memory

In

fact

the

case

D

is

peculiar

in

many

aspects

In

a

sense

it

is

a

cherished

possibility

which

we

would

like

-LRB-

ideally

-RRB-

to

be

able

to

reach

in

every

application

But

as

it

is

associated

with

positive

implications

it

also

has

disadvantages

we

shall

return

to

this

in

more

depth

later

CHAPTER

THE

FP-INDEX

Storage

Requirements

and

Utilization

Intuitively

since

we

are

incurring

a

minimum

number

of

disk

accesses

in

the

index

reconstruction

algorithm

for

both

the

quadtree

and

FP-index

the

drop

in

build

cost

must

have

come

from

a

drop

in

the

number

of

disk

pages

consumed

by

the

index

In

fact

this

is

what

motivated

the

method

in

the

first

place

The

FP-index

requires

wE

disk

pages

Besides

this

we

will

also

compute

utilization

ratio

One

way

to

do

this

is

to

divide

the

number

of

index

points

that

belong

to

an

interval

which

is

NDE

by

the

capacity

of

the

pages

allocated

to

an

interval

which

is

wB

Then

letting

U

denote

utilization

we

have

U

ND

wEB

-LRB-

-RRB-

Since

w

dND

EBe

we

obtain

the

more

expressive

form

U

ND

EB

dND

EBe

-LRB-

-RRB-

It

is

then

the

relation

of

a

quantity

to

its

ceiling

Table

presents

the

computed

storage

consumption

-LRB-

in

Mbytes

-RRB-

and

utilization

of

our

FP-index

for

various

combinations

of

N

and

D

The

corresponding

storage

consumption

values

for

the

quadtree

are

Mbytes

at

N

Mbytes

at

N

Mbytes

at

N

and

gigabyte

-LRB-

-RRB-

at

N

In

the

FP-index

the

highest

value

is

at

N

and

D

where

only

Mbytes

are

needed

-LRB-

as

opposed

to

gigabyte

-RRB-

As

an

example

of

improvements

we

take

N

at

D

which

consumes

Mbytes

compared

to

the

quadtree

's

Mbytes

We

then

can

safely

conclude

that

we

succeeded

in

devising

an

index

that

has

practical

and

reasonable

space

requirements

Furthermore

unlike

execution

time

estimations

our

count

of

the

number

of

disk

pages

required

is

fairly

accurate

and

a

real

application

may

only

exhibit

negligible

deviations

Does

it

beat

the

quadtree

on

utilization

Not

really

We

have

seen

that

in

practice

the

quadtree

oscillates

between

utilizations

of

and

and

has

an

average

utilization

of

in

theory

For

the

FP-index

utilization

is

high

at

high

values

of

N

and

D

and

low

at

low

values

of

N

and

D.

However

a

poor

storage

utilization

is

associated

mainly

with

low

storage

consumption

so

that

is

our

favorite

value

for

D

it

seems

to

be

a

good

compromise

CHAPTER

THE

FP-INDEX

N

D

D

D

D

Requi

Util

Requi

Util

Requi

Util

Requi

Util

Table

Storage

requirements

-LRB-

in

Mbytes

-RRB-

and

utilization

of

the

FP-index

N

D

D

D

Table

Actual

memory

utilization

of

the

FP-index

-LRB-

in

Mbytes

-RRB-

the

index

is

not

big

anyway

This

is

an

important

and

positive

observation

though

The

fact

that

when

we

have

very

low

space

requirements

we

also

have

a

very

small

fraction

of

that

space

being

actually

used

suggests

that

the

real

amount

of

memory

consumed

by

the

index

points

alone

is

deceptively

low

So

low

in

fact

that

we

can

venture

to

put

it

in

main

memory

To

see

how

far

this

was

possible

we

computed

the

actual

memory

requirements

of

the

FP-index

for

D

D

and

D

The

results

are

shown

in

Table

Note

that

when

the

index

moves

to

memory

we

are

no

longer

constrained

by

disk

page

size

B

and

could

simply

store

the

index

points

corresponding

to

each

attribute

interval

in

an

array

of

fixed

size

The

reader

may

judge

from

the

table

which

values

of

N

we

could

realistically

tolerate

in

main

memory

However

it

seems

reasonable

to

us

that

values

of

N

around

yield

an

acceptable

in-memory

index

In

fact

if

the

application

at

hand

does

not

have

many

attributes

to

index

we

may

consider

N

feasible

which

at

D

requires

It

is

not

difficult

to

see

the

consequences

of

memory

residence

of

the

FP-index

on

query

processing

performance

and

especially

insertion

which

becomes

O

-LRB-

m

-RRB-

where

m

is

the

mean

number

of

intervals

is

only

a

subjective

guess

CHAPTER

THE

FP-INDEX

crossed

by

a

trajectory

-LRB-

in

a

session

-RRB-

mentioned

at

the

beginning

of

this

chapter

Query

processing

reduces

to

simple

array

access

and

filtering

Let

us

note

before

moving

to

another

topic

that

we

consider

this

to

be

one

of

the

major

of

the

FP-index

System

sizes

which

proved

unmanageable

with

the

cross

points

method

and

which

the

quadtree

managed

with

difficulty

and

strain

on

memory

and

computational

resources

are

now

tolerable

even

in

main

memory

As

stated

earlier

this

was

one

of

the

major

motivations

that

guided

inception

of

the

FP-index

A

second

motivation

was

to

economize

on

query

cost

and

a

third

was

to

reduce

insertion

deletion

and

update

costs

Before

moving

on

to

discussing

how

far

the

FP-index

succeeds

in

realizing

these

goals

we

digress

briefly

on

the

topic

of

comparing

its

primary

memory

requirements

with

those

of

the

quadtree

Primary

Memory

Consumption

In

this

section

we

calculate

how

much

memory

the

nodes

of

a

quadtree

require

and

compare

it

with

the

FP-index

Remember

that

the

disk

pages

contain

raw

data

while

the

indexing

nodes

which

we

store

in

main

memory

provide

just

information

for

navigation

and

search

and

pointers

to

disk

pages

at

the

leaf

level

We

have

earlier

refrained

from

treating

this

subject

as

the

main

memory

requirements

of

index

nodes

were

overshadowed

by

the

secondary

memory

consumption

of

the

data

pages

Since

we

are

here

in

the

context

of

comparing

quadtrees

performance

with

that

of

our

FP-index

over

several

parameters

this

brief

discussion

is

in

place

A

single

record

of

the

quadnode

contains

fields

each

requires

bytes

yielding

a

total

of

bytes

per

node

It

then

remains

to

compute

the

number

of

such

nodes

We

will

compute

this

number

for

regular

quadtrees

those

whose

corresponding

space

is

partitioned

into

a

grid

for

some

If

s

is

the

side

length

of

the

grid

then

we

denote

by

Ls

the

number

of

nodes

-LRB-

leaf

and

internal

-RRB-

of

the

quadtree

indexing

an

s

s

partitioned

space

-LRB-

remember

that

the

partition

is

caused

by

insertions

and

splits

and

not

vice

versa

-RRB-

In

this

has

yet

to

be

validated

through

experimental

studies

though

order

i

of

a

quadtree

as

defined

in

Chapter

coincides

with

its

height

CHAPTER

THE

FP-INDEX

N

s

Ls

Memory

Consumption

Kbytes

Mbyte

Mbytes

512 349525

Mbytes

Table

Primary

memory

consumption

of

quadtree

nodes

quadtree

there

are

data

pages

pointed

to

by

leaf

nodes

Then

we

have

Ls

-LRB-

iX

l

-RRB-

-LRB-

-RRB-

The

fraction

i

becomes

negligible

very

quickly

-LRB-

e.g.

it

equals

at

i

-RRB-

Neglecting

this

fraction

yields

the

simpler

approximative

formula

Ls

ss

-LRB-

-RRB-

We

use

Equation

to

compute

the

actual

memory

consumption

for

the

four

values

of

N

we

have

been

using

in

the

study

The

result

is

given

in

Table

Notice

how

consumption

quickly

becomes

in

megabytes

As

opposed

to

these

values

the

primary

memory

consumption

of

the

FP-index

is

hardly

noticeable

It

is

an

array

of

E

records

each

consuming

bytes

at

E

it

requires

less

than

Kbytes

Furthermore

its

requirements

of

primary

memory

depends

only

on

E

and

is

totally

independent

from

N

In

summary

compared

to

the

quadtree

index

the

FP-index

's

primary

memory

consumption

is

negligible

We

continue

with

other

aspects

of

performance

Insertion

Cost

One

of

the

dramatic

improvements

we

have

achieved

is

in

reducing

insertion

cost

In

all

circumstances

it

requires

one

disk

access

for

each

interval

crossed

by

the

new

trajectory

during

the

time

that

remains

until

the

end

of

the

session

CHAPTER

THE

FP-INDEX

We

can

do

this

because

for

each

interval

we

have

a

pointer

in

our

index

A

to

the

last

page

that

contains

data

of

that

interval

This

makes

the

number

of

disk

accesses

per

insertion

bounded

by

m

the

mean

number

of

intervals

crossed

in

T

time

Besides

the

resulting

lower

cost

of

insertion

which

we

analyze

below

there

is

also

the

advantage

of

independence

from

N

the

system

size

The

average

cost

of

insertion

which

we

denote

by

Cinsert

is

then

the

same

for

an

application

with

objects

as

for

one

with

objects

It

only

depends

on

E

and

the

average

speed

v.

On

the

other

hand

Cinsert

doubles

between

one

plateau

and

the

next

in

the

quadtree

as

was

explained

in

Chapter

and

is

thus

badly

affected

by

an

increase

in

N

For

the

FP-index

a

more

accurate

estimate

of

the

average

number

of

disk

accesses

would

be

m

This

is

because

objects

come

at

different

times

of

the

session

and

according

to

the

position

in

time

at

which

they

appear

they

will

have

time

to

cross

between

and

m

attribute

intervals

till

the

end

of

the

session

As

a

first

optimization

measure

we

could

refrain

from

inserting

objects

which

come

too

late

in

the

session

when

there

remains

little

time

before

reconstructing

the

index

Inserting

such

objects

will

hardly

have

any

function

other

than

burdening

us

with

extra

disk

accesses

if

the

remaining

time

is

not

enough

to

answer

queries

that

involve

them

or

if

the

resulting

inaccuracy

is

negligible

On

the

other

hand

we

can

still

do

better

if

we

use

a

simple

technique

which

we

call

delayed

insert

The

idea

of

this

technique

is

to

gather

in

memory

a

few

insertion

requests

for

every

attribute

interval

and

then

flush

their

corresponding

objects

to

disk

together

hence

incurring

a

single

disk

access

for

them

We

implement

this

as

follows

We

use

a

vector

T

whose

length

is

the

partition

size

E.

Whenever

a

new

object

comes

we

compute

as

usual

which

attribute

intervals

it

will

cross

in

the

remaining

time

assume

it

crosses

m

intervals

Then

instead

of

seeking

our

index

A

and

retrieving

the

m

relevant

page

numbers

to

finish

the

insertion

we

simply

insert

those

m

points

in

array

T

in

their

correct

positions

-LRB-

T

-LSB-

i

-RSB-

will

receive

the

index

point

which

falls

in

the

ith

attribute

interval

-RRB-

If

during

this

insertion

some

array

element

T

-LSB-

i

-RSB-

reaches

some

threshold

number

of

points

q

then

we

flush

its

contents

to

the

disk

We

call

q

the

queue

size

Vector

T

can

then

be

implemented

as

an

E

q

two-dimensional

array

We

can

immediately

see

that

delayed

insert

with

queue

size

q

divides

the

average

insertion

cost

per

object

by

q.

Ideally

if

q

m

we

CHAPTER

THE

FP-INDEX

reach

the

cost

of

one

single

disk

access

per

insertion

as

opposed

to

a

single

disk

access

per

interval

crossed

Unfortunately

there

is

an

important

limitation

of

delayed

insert

that

may

deprive

us

from

such

a

luxury

Delaying

insertion

results

in

the

following

two

kinds

of

misinformation

At

the

system

scale

There

is

a

fraction

of

objects

which

have

effectively

entered

the

system

but

which

do

not

figure

in

our

index

A

range

query

submitted

at

any

time

will

then

be

missing

a

few

objects

namely

those

which

are

still

in

the

queue

Depending

on

the

criticality

of

such

information

we

may

tolerate

different

error

rates

At

the

object

scale

Since

insertion

proceeds

by

interval

and

no

longer

by

object

we

may

have

part

of

an

object

's

points

flushed

to

the

index

and

the

other

part

still

pending

in

the

queue

That

is

because

an

object

's

associated

m

intervals

will

usually

not

fill

up

at

the

same

time

This

might

be

less

harmful

to

the

accuracy

of

the

answers

computed

for

range

queries

This

is

because

it

suffices

that

one

index

point

associated

with

the

new

object

-LRB-

there

are

m

of

them

-RRB-

be

already

flushed

to

disk

for

a

range

covering

its

interval

to

include

it

in

the

answer

We

expect

that

at

low

values

of

q

the

error

rate

might

be

negligible

and

we

may

tolerate

a

small

amount

of

inconsistency

with

reality

We

have

in

mind

values

of

q

below

In

fact

even

using

q

is

better

than

ignoring

the

technique

altogether

as

it

will

cut

in

half

the

overall

cost

of

insertions

which

is

a

significant

gain

in

the

long

run

The

simplicity

and

ease

of

implementation

of

delayed

insert

policy

is

another

point

in

favor

Finally

we

note

that

the

cost

of

a

deletion

is

w?m

This

is

because

once

we

know

an

object

belongs

to

some

attribute

interval

A

-LSB-

i

-RSB-

-LRB-

i

E

-RRB-

we

have

to

retrieve

all

the

w

associated

data

pages

to

search

for

it

while

for

insertion

we

just

needed

to

access

the

last

page

of

the

chain

The

cost

of

an

update

is

the

sum

of

insertion

and

deletion

costs

CHAPTER

THE

FP-INDEX

Range

Query

Performance

The

case

of

range

queries

is

slightly

different

from

that

of

insertions

although

the

improvement

achieved

in

disk

access

cost

is

also

substantial

when

compared

with

quadtree

performance

Here

when

a

range

covers

any

attribute

interval

all

the

chain

of

disk

pages

associated

with

that

interval

-LRB-

which

is

the

interval

weight

w

-RRB-

have

to

be

retrieved

to

answer

the

query

The

cost

is

then

no

longer

independent

of

N

as

was

the

case

with

insertion

Fortunately

the

system

size

affects

query

cost

in

a

much

less

severe

way

in

the

FP-index

than

it

does

with

quadtrees

where

each

split

wave

doubles

the

cost

We

provide

a

direct

comparison

of

continuous

query

costs

in

the

FP-index

and

the

quadtree

index

We

shall

talk

later

about

instantaneous

queries

For

the

comparison

to

be

fair

we

use

a

standard

hypothetical

continuous

query

that

covers

of

the

indexed

space

When

E

this

coincides

with

attribute

intervals

of

the

FP-index

However

this

does

not

correspond

to

a

rounded

integer

multiple

of

attribute

intervals

in

the

quadtree

index

-LRB-

intervals

do

not

have

the

same

length

in

both

indices

-RRB-

To

remedy

this

we

add

an

extra

interval

in

the

quadtree

case

which

mathematically

means

taking

the

ceiling

When

we

feel

this

was

unfair

to

the

quadtree

method

we

also

add

one

or

two

intervals

to

the

range

length

of

the

FP-index

so

as

to

make

comparison

as

accurate

as

possible

The

number

of

intervals

into

which

the

space

gets

partitioned

in

the

case

of

the

quadtree

is

not

fixed

but

equal

to

where

i

is

the

quadtree

order

In

Table

we

give

the

disk

access

cost

of

the

continuous

query

mentioned

above

Table

shows

this

cost

in

the

FP-index

for

the

four

values

of

D

we

used

earlier

It

also

contains

an

extra

column

for

the

percentage

drop

in

cost

achieved

when

comparing

with

the

corresponding

quadtree

value

With

the

exception

of

one

entry

all

other

percentages

indicate

that

the

number

of

disk

accesses

required

drops

by

at

least

two

thirds

In

fact

the

cost

drops

to

one

tenth

its

original

value

in

most

cases

Again

this

was

possible

thanks

to

our

success

in

eliminating

redundancy

and

reducing

substantially

the

required

number

of

copies

in

the

design

of

the

FP-index

This

dramatic

percentage

improvement

translates

into

a

tolerable

number

of

disk

accesses

per

query

as

the

values

in

Table

suggest

For

example

the

values

at

D

D

and

D

average

to

disk

accesses

which

with

an

average

access

time

of

msecs

CHAPTER

THE

FP-INDEX

N

D

Disk

Accesses

Table

Disk

access

cost

of

continuous

queries

in

the

quadtree

method

N

D

D

D

D

Disk

Percent

Disk

Percent

Disk

Percent

Disk

Percent

Access

Drop

Access

Drop

Access

Drop

Access

Drop

Table

Disk

access

cost

amd

improvement

achieved

for

continuous

queries

in

the

FP-index

will

take

seconds

Access

time

is

even

more

reasonable

at

lower

N

For

example

at

N

and

D

it

is

seconds

As

to

the

performance

of

instantaneous

queries

given

the

absence

of

any

indexing

information

related

to

the

time

dimension

from

our

index

they

will

require

the

same

number

of

disk

accesses

as

a

continuous

query

that

covers

the

same

attribute

range

This

is

the

main

drawback

of

our

FP-index

and

in

this

respect

the

quadtree

remains

always

superior

with

its

cost

of

a

single

disk

access

per

interval

covered

by

the

query

However

we

believe

that

this

is

not

serious

enough

to

compromise

the

applicability

of

the

method

in

practice

especially

for

the

lower

values

of

N

given

the

big

improvement

achieved

in

continuous

-LRB-

hence

instantaneous

-RRB-

query

performance

Another

relief

is

that

if

we

find

a

way

to

batch

the

processing

of

continuous

queries

and

do

it

in

an

efficient

way

at

the

beginning

of

sessions

then

we

will

have

more

time

for

answering

instantaneous

queries

and

thus

improve

overall

response

time

The

next

section

explores

this

new

topic

in

depth

CHAPTER

THE

FP-INDEX

An

Optimization

Algorithm

for

Continu

ous

Queries

In

this

section

we

present

the

algorithm

which

minimizes

the

disk

access

cost

of

continuous

query

processing

Section

introduces

the

necessary

concepts

In

Section

we

present

the

algorithm

and

in

Section

we

analyze

its

performance

Introductory

Notions

We

have

earlier

said

that

a

continuous

query

coming

at

time

tnow

will

be

evaluated

over

the

time

starting

from

tnow

and

till

the

end

of

the

session

during

which

it

was

submitted

From

then

on

it

will

be

reevaluated

every

T

time

units

after

every

reconstruction

of

the

index

until

it

is

explicitly

deleted

We

then

have

a

set

of

queries

with

their

associated

upper

and

lower

limits

to

be

evaluated

at

the

beginning

of

each

session

An

important

observation

intrinsic

to

the

nature

of

range

queries

is

that

ranges

may

overlap

Furthermore

the

higher

the

number

of

such

queries

and

the

wider

their

ranges

the

more

the

amount

of

overlap

increases

The

heart

of

our

optimization

algorithm

is

the

exploitation

of

overlap

to

reduce

to

a

minimum

the

total

number

of

disk

accesses

required

to

answer

the

set

of

continuous

queries

Since

overlap

is

a

central

notion

in

our

exposition

we

shall

seek

to

quantify

it

more

concretely

in

a

way

that

emphasizes

our

goals

For

this

we

first

need

the

following

definition

Definition

Given

a

session

s

an

attribute

space

partitioned

into

E

equalsized

intervals

and

a

set

of

continuous

range

queries

over

this

space

the

popularity

pi

of

the

ith

attribute

interval

-LRB-

i

E

-RRB-

is

the

number

of

queries

whose

range

contains

or

partially

overlaps

with

it

An

interval

that

is

not

covered

by

any

query

has

a

popularity

of

We

then

express

overlap

in

terms

of

pi

We

could

simply

choose

the

sum

PEi

pi

as

an

indicator

of

overlap

or

the

ratio

-LRB-

PEi

pi

-RRB-

E

which

actually

means

average

popularity

However

we

choose

the

following

expression

which

though

looking

CHAPTER

THE

FP-INDEX

less

natural

agrees

more

with

intuition

Definition

We

characterize

overlap

of

range

queries

over

an

attribute

space

partitioned

into

E

equal-sized

intervals

by

the

Overlap

Index

which

we

denote

by

OI

and

express

using

the

OI

EX

i

-LRB-

pi

-RRB-

-LSB-

pi

-RSB-

We

subtract

one

from

each

non-zero

popularity

and

take

the

sum

over

the

E

intervals

The

boolean

expression

-LSB-

pi

-RSB-

is

used

because

an

interval

of

popularity

does

not

contribute

to

overlap

Similarly

an

interval

of

popularity

one

being

covered

by

a

single

query

range

should

not

contribute

to

overlap

hence

the

justification

of

pi

Hereafter

we

say

that

a

query

references

an

attribute

interval

or

that

attribute

interval

is

referenced

by

a

query

if

the

range

of

the

query

contains

or

partially

overlaps

with

that

query

Let

us

turn

to

our

algorithm

The

Algorithm

The

main

idea

is

that

if

an

attribute

interval

is

covered

by

many

queries

we

should

still

bring

its

associated

data

pages

to

the

buffer

only

once

While

its

data

pages

are

in

the

buffer

we

use

them

to

compute

answers

for

the

referencing

queries

What

we

will

do

is

then

the

following

We

will

go

through

the

attribute

intervals

one

by

one

and

bring

into

the

buffer

the

data

pages

of

all

intervals

of

non-zero

popularity

Once

all

referenced

intervals

data

pages

are

in

the

buffer

they

can

be

used

to

compute

the

answers

of

all

the

queries

For

this

we

will

temporarily

assume

that

the

buffer

is

large

enough

to

hold

the

disk

pages

associated

with

all

the

referenced

intervals

We

use

this

assumption

mainly

to

ease

our

presentation

later

we

suggest

remedies

to

this

problem

that

will

allow

us

get

rid

of

it

To

be

able

to

describe

the

algorithm

we

need

some

terminology

and

notation

related

to

attribute

intervals

and

queries

This

is

given

below

square

braces

are

what

D.

E.

Knuth

called

Iversonian

notation

after

its

originator

Kenneth

Iverson

In

-LSB-

-RSB-

he

says

the

idea

is

simply

to

enclose

a

true-or-false

statement

in

brackets

and

to

say

that

the

result

is

if

the

statement

is

true

if

the

statement

is

false

CHAPTER

THE

FP-INDEX

ffl

di

Number

of

data

pages

associated

with

the

ith

attribute

interval

ffl

pi

Popularity

of

the

ith

attribute

interval

ffl

Aimin

Starting

point

of

the

range

of

the

ith

range

query

ffl

Aimax

Ending

point

of

the

range

of

the

ith

range

query

ffl

NQ

Total

number

of

range

queries

to

be

processed

in

the

current

session

ffl

QIDi

j

Identity

number

of

the

jth

range

query

that

references

the

ith

attribute

interval

ffl

Ci

Total

number

of

data

pages

containing

data

required

to

answer

the

ith

range

query

Next

we

present

our

data

structures

We

will

make

use

of

five

arrays

let

us

justify

each

of

them

The

first

is

our

prominent

FP-index

which

we

called

array

A

It

is

needed

to

retrieve

from

disk

the

data

pages

associated

with

intervals

of

non-zero

popularity

The

second

is

the

array

which

contains

the

continuous

queries

to

be

processed

which

we

call

QL

-LRB-

for

Queries

List

-RRB-

The

third

is

an

array

which

stores

the

popularities

of

each

of

the

E

intervals

we

call

it

array

P

For

the

time

being

popularities

are

needed

to

distinguish

zero

popularity

intervals

from

non-zero

popularity

ones

and

determine

accordingly

which

data

pages

will

be

needed

and

which

will

not

The

fourth

is

an

array

that

stores

for

each

interval

the

IDs

of

the

queries

referencing

it

We

call

it

the

interval

references

array

and

denote

it

by

R.

Obviously

array

R

's

contents

will

have

to

be

computed

by

our

algorithm

The

fifth

and

final

array

is

one

that

records

for

every

query

which

buffer

pages

contain

the

data

pages

needed

for

answering

it

we

call

it

array

B

This

array

is

the

one

that

will

be

used

for

query

processing

and

it

may

be

seen

as

the

output

of

our

optimization

algorithm

The

array

R

of

interval

references

is

needed

only

as

an

intermediate

data

structure

that

allows

us

to

compute

the

contents

of

array

B.

Below

we

give

a

summary

of

these

arrays

in

more

formal

notation

ffl

A

The

FP-index

A

-LSB-

i

-RSB-

F

irstP

agei

LastPagei

-LRB-

i

E

-RRB-

ffl

QL

The

queries

array

QL

-LSB-

i

-RSB-

QIDi

Aimin

Aimax

-LRB-

i

NQ

-RRB-

CHAPTER

THE

FP-INDEX

for

i

to

NQ

do

bi

First

attribute

interval

covered

by

QL

-LSB-

i

-RSB-

's

range

ei

Last

attribute

interval

covered

by

QL

-LSB-

i

-RSB-

's

range

update

interval

references

and

popularity

array

for

j

bi

to

ei

do

P

-LSB-

j

-RSB-

P

-LSB-

j

-RSB-

R

-LSB-

j

-RSB-

R

-LSB-

j

-RSB-

-LSB-

fQIDig

endfor

endfor

compute

the

contents

of

the

B

array

for

i

to

E

do

if

P

-LSB-

i

-RSB-

then

Transfer

the

chain

of

pages

starting

at

A

-LSB-

i

-RSB-

F

irstP

age

to

buffer

positions

biCi

for

j

to

pi

do

QIDi

j

R

-LSB-

i

j

-RSB-

for

k

to

Ci

do

B

-LSB-

QIDi

j

-RSB-

B

-LSB-

QIDi

j

-RSB-

-LSB-

fbi

kg

endfor

endfor

endif

endfor

Figure

The

optimization

algorithm

for

continuous

query

processing

ffl

P

The

popularities

array

P

-LSB-

i

-RSB-

pi

-LRB-

i

E

-RRB-

ffl

R

The

interval

references

array

R

-LSB-

i

j

-RSB-

QIDi

j

-LRB-

i

E

and

j

pi

-RRB-

ffl

B

Array

of

query

references

to

buffer

pages

B

-LSB-

i

-RSB-

biCig

-LRB-

i

NQ

-RRB-

The

algorithm

is

given

in

Figure

It

has

two

separate

phases

driven

by

the

two

independent

loops

The

first

phase

computes

popularities

of

attribute

intervals

-LRB-

i.e.

the

pi

's

-RRB-

and

fills

the

interval

references

array

R

appropriately

It

does

this

by

going

through

the

list

of

queries

ranges

and

computing

for

every

query

the

intervals

it

references

Each

such

reference

is

then

recorded

in

array

R

and

the

associated

popularity

is

incremented

The

second

phase

is

CHAPTER

THE

FP-INDEX

dedicated

to

computing

the

contents

of

array

B

which

as

mentioned

before

is

the

algorithm

's

output

and

may

also

be

seen

as

containing

a

map

of

the

buffer

upon

which

depends

the

batch

execution

of

the

set

of

continuous

queries

The

job

of

the

outer

loop

is

to

go

through

the

list

of

intervals

one

by

one

and

bring

from

disk

to

the

buffer

all

the

data

pages

associated

with

intervals

of

nonzero

popularity

We

let

the

pages

of

the

ith

interval

reside

in

buffer

positions

biCi

It

now

remains

to

record

these

positions

for

each

query

whose

range

covers

the

ith

interval

this

is

the

task

of

last

two

nested

loops

This

way

each

query

will

know

later

where

on

the

buffer

its

associated

data

resides

Once

our

optimization

algorithm

finishes

its

job

we

are

ready

to

process

queries

To

process

the

ith

query

we

read

all

buffer

pages

mentioned

in

B

-LSB-

i

-RSB-

and

merge

them

We

then

filter

out

duplicates

and

get

the

answer

Let

us

analyze

the

performance

of

the

algorithm

Performance

Analysis

In

this

section

we

analyze

the

performance

gain

achieved

by

the

algorithm

described

above

and

suggest

ways

to

remove

the

assumption

of

a

large

buffer

Let

I

denote

the

total

number

of

intervals

referenced

by

the

set

of

continuous

queries

in

a

session

Then

I

may

be

expressed

as

follows

I

EX

i

-LSB-

pi

-RSB-

-LRB-

-RRB-

First

notice

that

I

E

no

matter

how

large

is

the

set

of

queries

to

be

processed

Second

wI

is

the

resulting

optimal

number

of

disk

accesses

If

E

the

partition

size

is

given

and

fixed

then

there

is

no

way

to

avoid

accessing

a

disk

page

that

was

referenced

by

one

or

more

queries

we

simply

can

not

compute

a

correct

query

answer

without

it

We

forward

this

observation

in

the

form

of

a

proposition

Proposition

Given

a

fixed

partition

size

E

of

the

attribute

space

the

above

algorithm

processes

any

set

of

continuous

queries

using

an

optimal

number

wI

of

disk

accesses

where

w

is

the

interval

weight

and

I

is

given

by

I

EX

i

-LSB-

pi

-RSB-

CHAPTER

THE

FP-INDEX

How

many

disk

accesses

does

this

algorithm

save

us

compared

to

the

previous

approach

For

each

referenced

ith

interval

-LRB-

pi

-RRB-

the

previous

approach

incurred

wpi

disk

accesses

while

our

new

optimal

algorithm

incurs

only

w

disk

accesses

The

gain

is

then

w

-LRB-

pi

-RRB-

when

pi

Thus

the

total

gain

is

given

by

the

sum

PEi

w

-LRB-

pi

-RRB-

-LSB-

pi

-RSB-

This

is

the

product

of

interval

weight

and

overlap

index

hence

we

get

Disk

Cost

Gain

w

OI

w

-LRB-

EX

i

-LRB-

pi

-RRB-

-LSB-

pi

-RSB-

-RRB-

-LRB-

-RRB-

This

means

that

for

a

fixed

I

the

higher

the

number

of

queries

the

more

gain

we

achieve

and

the

lower

the

average

cost

of

a

single

query

The

latter

cost

may

even

drop

below

a

single

disk

access

if

there

are

enough

queries

When

does

this

happen

If

the

set

of

NQ

queries

span

I

attribute

intervals

then

exactly

wI

disk

accesses

are

incurred

It

thus

suffices

to

have

NQ

wI

for

this

to

happen

We

have

therefore

managed

through

the

use

of

batch

processing

and

exploitation

of

query

overlap

to

devise

a

query

processing

algorithm

that

incurs

less

than

a

single

disk

access

per

-LRB-

continuous

-RRB-

query

Now

let

us

return

to

our

initial

assumption

on

buffer

size

and

see

how

we

can

avoid

it

We

assumed

the

buffer

big

enough

to

hold

all

of

the

wI

referenced

pages

which

is

expressed

by

the

constraint

BF

wI

Since

I

is

always

bounded

from

above

by

E

and

we

can

not

guarantee

any

bound

lower

than

that

our

real

constraint

is

in

fact

BF

wE

This

is

very

unrealistic

as

it

plainly

requires

the

buffer

to

hold

the

whole

data

in

the

worst

case

In

order

to

circumvent

this

we

need

to

find

a

method

that

allow

incremental

query

processing

or

a

way

to

decompose

I

In

fact

we

will

do

both

In

our

context

incremental

query

processing

is

the

ability

to

compute

the

answer

of

a

query

without

the

restriction

that

all

its

referenced

pages

reside

in

the

buffer

at

the

same

time

Unless

we

impose

an

upper

bound

on

the

maximum

length

of

attribute

space

that

could

be

queried

this

ability

is

necessary

For

the

second

goal

of

decomposing

I

-LRB-

or

reducing

it

somehow

-RRB-

we

introduce

the

following

term

Definition

An

Interval

Cluster

-LRB-

or

simply

cluster

-RRB-

is

a

set

of

adjacent

attribute

intervals

IVk

IVk

IVk

l

of

non-zero

popularity

surrounded

from

the

left

and

right

by

intervals

of

popularity

zero

i.e.

popularities

satisfy

CHAPTER

THE

FP-INDEX

pk

k

i

k

l

pi

and

pk

l

We

say

l

is

the

cluster

length

and

w

l

the

cluster

size

The

condition

BF

wI

must

be

satisfied

only

if

all

of

the

I

referenced

pages

are

contiguous

If

there

are

any

gaps

then

we

have

our

I

references

partitioned

into

a

set

of

clusters

C

C

g

where

is

the

number

of

such

clusters

Our

algorithm

needs

a

very

simple

change

to

recognize

gaps

We

just

need

to

make

pi

a

stopping

condition

for

bringing

further

pages

into

the

buffer

We

then

process

all

the

queries

that

caused

or

formed

the

current

cluster

-LRB-

with

their

interval

references

-RRB-

Having

done

this

we

could

move

on

to

the

next

cluster

bring

its

pages

to

the

buffer

and

compute

the

associated

queries

answers

in

a

totally

independent

manner

A

useful

and

important

observation

is

that

the

set

of

queries

causing

cluster

Ci

which

we

call

Si

is

disjoint

from

the

set

of

queries

that

cause

cluster

Cj

-LRB-

i

j

-RRB-

formally

Si

Sj

OE

This

requires

the

assumption

that

if

a

query

conjunctively

references

two

disjoint

segments

of

the

attribute

space

it

will

be

decomposed

into

two

separate

subqueries

with

different

QIDs

Its

desired

consequence

is

that

the

pages

of

a

given

cluster

could

take

the

places

in

the

buffer

of

the

pages

of

the

previous

cluster

without

causing

problems

It

also

reduces

the

amount

of

main

memory

needed

for

query

since

it

allows

us

to

divide

the

set

of

queries

into

mutually

disjoint

subsets

each

corresponding

to

the

cluster

it

caused

and

evaluate

each

subset

in

series

Let

lmax

denote

the

maximum

cluster

length

we

have

the

lighter

constraint

on

buffer

size

BF

w

lmax

-LRB-

-RRB-

Let

us

then

see

how

to

process

incrementally

a

query

that

involves

more

data

pages

than

that

our

buffer

can

handle

For

such

queries

we

just

bring

as

many

pages

as

we

can

afford

run

through

their

data

filtering

out

duplicates

and

append

the

result

to

the

query

answer

We

then

do

the

same

with

the

remaining

sets

of

pages

until

we

exhaust

all

of

them

Finally

we

make

a

last

pass

over

the

answer

removing

duplicates

that

were

not

recognized

due

to

independent

processing

of

chunks

of

pages

This

algorithm

could

easily

be

extended

to

handle

multiple

queries

that

reference

adjacent

intervals

In

this

way

we

have

solved

the

problem

of

cluster

sizes

that

are

bigger

than

BF

involves

gathering

relevant

index

points

and

filtering

duplicates

CHAPTER

THE

FP-INDEX

We

propose

then

to

go

through

the

array

P

of

popularities

and

derive

from

it

the

set

of

clusters

and

their

sizes

We

then

process

clusters

which

fit

in

the

buffer

in

batch

mode

and

process

the

rest

using

the

incrementality

technique

explained

above

The

gain

in

the

number

of

disk

accesses

remains

the

same

Summary

In

this

chapter

we

proposed

a

new

indexing

method

for

dynamic

attributes

that

was

inspired

by

the

causes

of

space

and

time

inefficiency

in

the

quadtree

approach

This

method

uses

only

the

attribute

dimension

in

indexing

and

boils

down

to

a

very

simple

unidimensional

array

Although

we

have

not

yet

done

any

experimental

performance

studies

the

simple

analysis

provided

here

shows

that

it

is

promising

and

that

it

beats

the

quadtree

method

in

the

following

aspects

The

cost

of

reconstructing

the

index

every

T

time

units

The

primary

memory

requirements

of

the

index

The

disk

storage

requirements

of

the

associated

data

The

average

number

of

duplicates

needed

per

object

The

disk

access

cost

of

the

insertion

operation

The

disk

access

cost

of

continuous

query

processing

The

overall

simplicity

of

the

method

and

ease

of

implementation

Furthermore

we

contributed

an

optimal

algorithm

for

continuous

queries

that

relies

on

batch

processing

at

the

beginning

of

sessions

and

the

exploitation

of

query

range

overlap

It

reduces

the

overall

cost

of

the

set

of

continuous

queries

to

a

small

and

tolerable

number

of

disk

accesses

that

is

bounded

from

above

independent

of

the

query

load

and

proved

optimal

Given

that

most

improvements

found

by

analysis

are

substantial

in

terms

of

percentage

we

hope

that

experimental

evaluation

will

only

confirm

our

CHAPTER

THE

FP-INDEX

expectations

and

that

discrepancies

are

unlikely

to

reverse

our

conclusions

on

the

virtues

of

the

method

Our

FP-index

is

thus

worth

studying

Chapter

CONCLUSION

We

have

thus

reached

the

end

of

this

work

We

would

like

to

recapitulate

upon

what

we

have

done

and

project

into

future

work

This

thesis

was

started

with

a

proposal

to

study

and

compare

the

quadtree

method

and

the

cross

points

method

We

believe

that

we

succeeded

in

providing

a

detailed

performance

study

of

both

of

the

methods

so

that

very

little

-LRB-

not

to

say

nothing

-RRB-

remains

to

be

said

about

their

behavior

in

the

chosen

context

and

supported

query

types

Moreover

where

any

of

the

two

methods

fell

short

of

being

practical

or

of

exhibiting

reasonable

performance

we

contributed

-LRB-

whenever

possible

-RRB-

our

own

algorithms

and

suggested

modest

techniques

of

improvement

When

we

failed

to

do

so

as

was

the

case

with

the

cross

points

method

we

tried

to

explain

why

the

problem

was

inherently

difficult

Finally

we

distilled

the

experience

gained

through

the

study

of

both

methods

into

a

novel

solution

a

new

indexing

technique

we

called

the

FP-index

which

is

promising

The

experimental

performance

study

of

both

the

quadtree

and

the

cross

points

method

counts

as

a

contribution

in

its

own

right

Although

it

was

overshadowed

by

many

of

our

additions

we

think

it

was

not

trivial

anyway

It

consisted

of

the

development

of

a

simulation

model

with

associated

parameters

This

in

turn

required

us

to

gather

a

thorough

understanding

and

a

holistic

view

of

what

is

at

stake

in

designing

and

assessing

the

worth

of

any

new

access

method

As

an

example

minor

contribution

we

distilled

our

understanding

into

a

list

of

fourteen

parameters

that

sum

up

the

desirable

properties

in

any

access

CHAPTER

CONCLUSION

method

regardless

of

the

nature

of

data

it

is

meant

for

-LRB-

the

list

is

in

Chapter

-RRB-

We

then

implemented

the

model

to

be

able

to

conduct

the

simulation

experiments

and

this

involved

implementing

the

quadtree

with

its

associated

operations

as

well

as

the

implementation

of

a

buffer

manager

Overall

the

performance

study

constituted

more

than

half

of

our

work

In

the

quadtree

method

we

contributed

an

optimal

algorithm

for

reconstructing

the

index

It

has

optimal

complexity

in

the

sense

that

it

requires

exactly

one

computation

to

place

an

index

point

in

its

right

place

and

so

no

redundant

computations

are

involved

and

overall

CPU

time

is

minimal

It

also

requires

an

optimal

number

of

disk

accesses

as

it

relies

on

computing

the

contents

of

the

index

's

data

pages

in

memory

and

then

transferring

them

together

to

the

disk

We

derived

an

analytical

formula

which

allows

us

to

predict

the

final

shape

of

the

resulting

index

given

the

system

size

N

In

fact

the

optimal

quadtree

reconstruction

algorithm

is

based

on

it

and

would

not

have

existed

without

it

We

also

provided

a

mathematical

analysis

of

the

average

storage

utilization

of

the

quadtree

which

gave

us

the

value

of

This

at

least

served

to

improve

our

understanding

of

the

mechanics

of

the

method

In

the

cross

points

method

we

concluded

that

the

method

is

impractical

for

values

of

N

above

due

to

the

quadratic

complexity

of

the

cross

points

algorithm

and

the

resulting

impractical

execution

time

of

the

cross

points

computation

function

in

a

real

sample

run

We

then

contributed

an

informal

criticism

of

the

method

in

which

we

conclude

that

the

quadratic

complexity

of

the

cross

points

computation

algorithm

is

intrinsic

to

the

problem

and

thus

insurmountable

As

such

we

could

not

go

any

further

beyond

the

naive

algorithm

We

enriched

the

critique

by

presenting

a

few

trails

of

thought

and

speculations

about

ways

to

improve

upon

the

naive

algorithm

which

we

hope

added

more

credibility

to

our

arguments

and

improved

the

general

understanding

of

how

the

method

works

We

did

not

provide

any

comparative

study

between

the

quadtree

and

the

cross

points

method

Since

the

early

stages

of

our

work

we

sensed

that

if

the

cross

points

method

is

to

make

use

of

an

in-memory

data

structure

there

would

later

be

little

common

ground

for

comparing

the

two

methods

Our

attempts

to

seek

points

of

commonality

did

not

culminate

in

success

In

reality

we

do

CHAPTER

CONCLUSION

feel

that

the

methods

are

fundamentally

different

Nevertheless

it

was

clear

to

us

right

from

the

beginning

that

if

the

auxiliary

overhead

associated

with

the

cross

points

method

is

acceptable

and

tolerable

then

it

will

indeed

beat

the

quadtree

approach

over

most

parameters

-LRB-

if

not

all

-RRB-

This

is

because

all

the

operations

and

query

processing

have

complexity

O

-LRB-

log

N

-RRB-

and

no

disk

access

costs

are

involved

As

we

could

not

circumvent

the

high

cost

of

cross

points

management

the

quadtree

method

is

the

declared

winner

Finally

we

mention

the

contribution

most

valuable

to

us

this

is

the

FP

index

method

First

we

have

to

say

that

although

it

was

inspired

by

some

of

the

disadvantages

observed

in

the

behavior

of

the

quadtree

index

it

is

not

a

mere

extension

nor

a

refinement

of

it

Rather

it

is

a

radically

different

approach

based

on

partitioning

the

attribute

space

in

a

fixed

manner

and

indexing

only

on

the

attribute

dimension

We

have

worked

out

all

the

important

details

of

the

method

Furthermore

through

arguments

and

simple

mathematical

analysis

we

argued

for

the

superiority

of

its

performance

relative

to

the

quadtree

across

the

majority

of

performance

criteria

considered

In

the

area

of

query

processing

we

started

from

the

observation

that

the

ranges

of

queries

may

overlap

and

devised

an

intelligent

and

optimal

continuous

query

processing

algorithm

that

exploits

overlap

It

potentially

reduces

the

cost

of

a

single

continuous

query

to

less

than

a

single

disk

access

We

strove

to

make

our

presentation

of

the

FP

index

as

complete

as

possible

missing

only

a

few

simulation

experiments

to

substantiate

our

claims

based

largely

on

simple

analysis

and

common

sense

We

strongly

believe

however

that

the

arguments

we

presented

are

enough

proof

of

the

superiority

of

the

FP

index

and

that

even

sizable

error

will

not

reverse

judgment

over

most

performance

parameters

Add

to

this

the

fact

that

some

conclusions

are

not

dependent

upon

any

estimations

and

are

thus

not

prone

to

change

in

real

experiments

As

such

the

experimental

study

of

the

FP

index

is

left

for

future

work

For

additional

future

work

we

would

like

to

explore

the

possibility

of

an

access

method

that

does

not

need

to

be

reconstructed

periodically

We

have

been

uneasy

about

the

prospects

of

remaining

idle

more

than

of

the

time

just

to

destroy

the

current

index

and

reconstruct

the

next

one

We

also

consider

this

to

be

a

disadvantage

to

the

three

methods

presented

in

this

thesis

It

would

CHAPTER

CONCLUSION

be

nice

to

find

a

technique

whereby

the

access

method

moves

in

a

more

smooth

and

graceful

way

along

the

time

dimension

rather

than

have

itself

destroyed

and

regenerated

Ideally

we

would

like

it

to

emulate

the

animal

populations

evolution

through

time

An

access

method

with

such

a

property

will

also

be

more

suitable

for

handling

persistent

queries

which

require

referral

to

all

past

states

up

to

a

certain

time

point

in

the

past

-LRB-

see

Chapter

-RRB-

Adapting

current

access

methods

to

handle

persistent

queries

is

also

a

future

research

problem

Bibliography

-LSB-

-RSB-

R.

Alonso

and

H.

F.

Korth

Database

System

Issues

in

Nomadic

Computing

In

ACM

SIGMOD

International

Conference

on

the

Management

of

Data

pages

-LCB-

Washington

DC

May

-LSB-

BGO

-RSB-

B.

Becker

S.

Geschwind

T.

Ohler

B.

Seeger

and

P.

Widmayer

On

Optimal

Multiversion

Access

Structures

In

Workshop

on

Advances

in

Spatial

Databases

pages

-LCB-

Singapore

June

-LSB-

-RSB-

S.

Berchtold

D.

Keim

and

H.

Kriegel

The

X-Tree

An

Index

Structure

for

High-Dimensional

Data

In

Very

Large

Data

Bases

Conference

pages

-LCB-

Bombay

India

September

-LSB-

-RSB-

T.

Brinkhoff

H.

Kriegel

and

B.

Seeger

Parallel

Processing

of

Spatial

Joins

Using

R-Trees

In

International

Conference

on

Data

Engineering

pages

-LCB-

New

Orleans

Louisiana

February

-LSB-

-RSB-

N.

Beckmann

H.

Kriegel

R.

Schneider

and

B.

Seeger

The

R

Tree

An

Efficient

and

Robust

Access

Method

for

Points

and

Rectangles

In

ACM

SIGMOD

International

Conference

on

the

Management

of

Data

pages

-LCB-

Atlantic

City

New

Jersey

May

-LSB-

-RSB-

D.

Comer

The

Ubiquitous

B-Tree

ACM

Computing

Surveys

-LRB-

-RRB-

-LCB-

-LSB-

-RSB-

M.

Dunham

and

A.

Helal

Mobile

Computing

and

Databases

Anything

New

SIGMOD

Record

-LRB-

-RRB-

-LCB-

December

BIBLIOGRAPHY

-LSB-

-RSB-

M.

J.

Egenhofer

What

's

Special

About

Spatial

Database

Requirements

for

Vehicle

Navigation

in

Geographic

Space

In

ACM

SIGMOD

International

Conference

on

the

Management

of

Data

pages

-LCB-

Washington

DC

May

-LSB-

-RSB-

R.

Elmasri

G.

Wuu

and

Y.

Kim

The

Time

Index

An

Access

Structure

for

Temporal

Data

In

International

Very

Large

Data

Bases

Conference

pages

-LCB-

Brisbane

Australia

August

-LSB-

-RSB-

O.

G?unther

and

A.

Buchmann

Research

Issues

in

Spatial

Databases

ACM

SIGMOD

Record

-LRB-

-RRB-

-LCB-

December

-LSB-

-RSB-

O.

G?unther

and

J.

Bilmes

Tree-Based

Access

Methods

for

Spatial

Databases

Implementation

and

Performance

Evaluation

IEEE

Transactions

on

Knowledge

and

Data

Engineering

-LRB-

-RRB-

-LCB-

September

-LSB-

-RSB-

R.

Graham

D.

E.

Knuth

and

O.

Patashnik

Concrete

Mathematics

Addison-Wesley

Reading

Massachusetts

-LSB-

-RSB-

D.

Greene

An

Implementation

and

Performance

Analysis

of

Spatial

Data

Access

Methods

In

International

Conference

on

Data

Engineering

pages

-LCB-

Los

Angeles

California

February

-LSB-

-RSB-

A.

Guttman

R-Trees

A

Dynamic

Index

Structure

for

Spatial

Searching

In

Proceedings

of

the

ACM

SIGMOD

International

Conference

on

the

Management

of

Data

pages

-LCB-

Boston

Massachusetts

June

-LSB-

-RSB-

A.

Henrich

Improving

the

Performance

of

Multi-dimensional

Access

Structures

Based

on

k-d

Trees

In

International

Conference

on

Data

Engineering

pages

-LCB-

New

Orleans

Louisiana

February

-LSB-

-RSB-

T.

Imielinski

and

B.

R.

Badrinath

Replication

and

Mobility

In

Second

IEEE

Workshop

on

Management

of

Replicated

Data

-LSB-

-RSB-

T.

Imielinski

and

B.

R.

Badrinath

Data

Management

for

Mobile

Computing

ACM

SIGMOD

Record

-LRB-

-RRB-

BIBLIOGRAPHY

-LSB-

-RSB-

T.

Imielinski

and

B.

R.

Badrinath

Mobile

Wireless

Computing

Solutions

and

Challenges

in

Data

Management

Technical

Report

Department

of

Computer

Science

Rutgers

University

New

Brunswick

New

Jersey

-LSB-

-RSB-

T.

Imielinski

and

B.

R.

Badrinath

Mobile

Wireless

Computing

Challenges

in

Data

Management

Communications

of

the

ACM

-LRB-

-RRB-

-LCB-

October

-LSB-

-RSB-

H.

Kriegel

M.

Schiewitz

R.

Schneider

and

B.

Seeger

Performance

Comparison

of

Point

and

Spatial

Access

Methods

In

Symposium

on

Design

and

Implementation

of

Large

Spatial

Databases

pages

-LCB-

California

July

-LSB-

-RSB-

S.

Lanka

and

E.

Mays

Fully

Persistent

B

trees

In

ACM

SIGMOD

International

Conference

on

the

Management

of

Data

pages

-LCB-

Denver

Colorado

May

-LSB-

-RSB-

D.

B.

Lomet

Partial

Expansions

for

File

Organizations

with

an

Index

ACM

Transactions

on

Database

Systems

-LRB-

-RRB-

-LCB-

March

-LSB-

-RSB-

D.

B.

Lomet

A

Simple

Bounded

Disorder

File

Organization

with

Good

Performance

ACM

Transactions

on

Database

Systems

-LRB-

-RRB-

-LCB-

December

-LSB-

-RSB-

D.

B.

Lomet

Grow

and

Post

Index

Trees

Role

Techniques

and

Future

Potential

In

Symposium

on

Advances

in

Spatial

Databases

pages

-LCB-

Zurich

Switzerland

August

-LSB-

-RSB-

D.

Lomet

and

B.

Salzberg

Access

Methods

for

Multiversion

Data

In

ACM

SIGMOD

International

Conference

on

the

Management

of

Data

pages

-LCB-

Portland

Oregon

June

-LSB-

-RSB-

D.

Lomet

and

B.

Salzberg

The

hB-Tree

A

Multiattribute

Indexing

Method

with

Good

Guaranteed

Performance

ACM

Transactions

on

Database

Systems

-LRB-

-RRB-

-LCB-

December

BIBLIOGRAPHY

-LSB-

-RSB-

D.

Lomet

and

B.

Salzberg

The

Performance

of

a

Multiversion

Access

Method

In

ACM

SIGMOD

International

Conference

on

the

Management

of

Data

pages

-LCB-

Atlantic

City

New

Jersey

May

-LSB-

-RSB-

K.

Mulmuley

Computational

Geometry

An

Introduction

Through

Randomized

Algorithms

Prentice

Hall

Englewood

Cliffs

New

Jersey

-LSB-

-RSB-

Ozg?ur

Ulusoy

Real-Time

Data

Management

for

Mobile

Computing

Submitted

for

publication

-LSB-

-RSB-

F.

P.

Preparata

and

M.

I.

Shamos

Computational

Geometry

An

Introduction

Springer-Verlag

New

York

-LSB-

-RSB-

B.

Salzberg

File

Structures

An

Analytic

Approach

Prentice-Hall

Englewood

Cliffs

NJ

-LSB-

-RSB-

B.

Salzberg

On

Indexing

Spatial

and

Temporal

Data

Technical

report

College

of

Computer

Science

Northeastern

University

Boston

Massachusetts

May

-LSB-

-RSB-

H.

Samet

The

Quadtree

and

Related

Hierarchical

Data

Structures

ACM

Computing

Surveys

-LRB-

-RRB-

-LCB-

June

-LSB-

-RSB-

H.

Samet

The

Design

and

Analysis

of

Spatial

Data

Structures

Addison-Wesley

Reading

Massachusetts

-LSB-

-RSB-

M.

Satyanarayanan

Fundamental

Challenges

in

Mobile

Computing

Technical

report

School

of

Computer

Science

Carnegie

Mellon

University

Pittsburgh

New

Jersey

-LSB-

-RSB-

J.

Srinivasan

and

M.

J.

Carey

Performance

of

B-tree

Concurrency

Control

Algorithms

In

Proceedings

of

the

ACM

SIGMOD

International

Conference

on

the

Management

of

Data

pages

-LCB-

Denver

Colorado

May

-LSB-

-RSB-

K.

Sevcik

and

N.

Koudas

Filter

Trees

for

Managing

Spatial

Data

Over

a

Range

of

Granularities

In

Very

Large

Data

Bases

Conference

pages

-LCB-

Bombay

India

September

BIBLIOGRAPHY

-LSB-

-RSB-

B.

Seeger

and

P.

Larson

Multi-Disk

B-Trees

In

Proceedings

of

the

ACM

SIGMOD

International

Conference

on

the

Management

of

Data

pages

-LCB-

Denver

Colorado

May

-LSB-

-RSB-

T.

Sellis

N.

Roussopoulos

and

C.

Faloutsos

The

R

Tree

A

Dynamic

Index

for

Multidimensional

Objects

In

Very

Large

Data

Bases

Conference

pages

-LCB-

Brighton

England

September

-LSB-

-RSB-

A.

P.

Sistla

and

O.

Wolfson

Temporal

Triggers

in

Active

Databases

IEEE

Transactions

on

Knowledge

and

Data

Engineering

-LRB-

-RRB-

-LCB-

June

-LSB-

-RSB-

A.

P.

Sistla

O.

Wolfson

S.

Chamberlain

and

S.

Dao

Modeling

and

Querying

Moving

Objects

In

International

Conference

on

Data

Engineering

pages

-LCB-

Birmingham

UK

April

-LSB-

-RSB-

S.

Shekhar

and

T.

A.

Yang

Motion

in

a

Geographical

System

In

Symposium

on

Advances

in

Spatial

Databases

pages

-LCB-

Zurich

Switzerland

August

-LSB-

-RSB-

R.

Tamassia

Strategic

Directions

in

Computational

Geometry

ACM

Computing

Surveys

-LRB-

-RRB-

-LCB-

December

-LSB-

WCD

-RSB-

O.

Wolfson

S.

Chamberlain

S.

Dao

L.

Jiang

and

G.

Mendez

Cost

and

Imprecision

in

modeling

the

Position

of

Moving

Vehicles

Submitted

for

publication

-LSB-

-RSB-

D.

White

and

R.

Jain

Similarity

Indexing

with

the

SS-Tree

In

International

Conference

on

Data

Engineering

pages

-LCB-

New

Orleans

Louisiana

March

-LSB-

-RSB-

O.

Wolfson

Data

Allocation

in

Mobile

Computing

A

Project

Description

In

IEEE

Workshop

on

Advances

in

Parallel

and

Distributed

Systems

pages

-LCB-

October

-LSB-

-RSB-

O.

Wolfson

Personal

Communication

August

BIBLIOGRAPHY

-LSB-

-RSB-

J.

Zobel

A.

Moffat

and

K.

Ramamohanarao

Guidelines

for

Presentation

and

Comparison

of

Indexing

Techniques

ACM

SIGMOD

Record

-LRB-

-RRB-

September

dynamic attributes
mobile data management
spatial indexing