70
The Telic\Atelic Distinction in Temporal Databases Paolo Terenziani Institute of Computer Science, DISIT, Univ. Piemonte Orientale “A. Avogadro”, Viale Teresa Michel 11, Alessandria, Italy [email protected] Acknowledgements: - R.T. Snodgrass - A. Bottrighi, V. Khatri, G. Molino, S. Ram, M.Torchio - L. Lesmo, P. Torasso Tucson, November 8 th , 2012

The Telic\Atelic Distinction in Temporal Databases

  • Upload
    fordon

  • View
    38

  • Download
    0

Embed Size (px)

DESCRIPTION

The Telic\Atelic Distinction in Temporal Databases. Paolo Terenziani Institute of Computer Science, DISIT, Univ. Piemonte Orientale “A. Avogadro”, Viale Teresa Michel 11, Alessandria, Italy [email protected]. Acknowledgements: R.T. Snodgrass - PowerPoint PPT Presentation

Citation preview

Page 1: The Telic\Atelic Distinction  in Temporal Databases

The Telic\Atelic Distinction in Temporal Databases

Paolo Terenziani Institute of Computer Science,

DISIT, Univ. Piemonte Orientale “A. Avogadro”, Viale Teresa Michel 11, Alessandria, Italy

[email protected]

Acknowledgements:- R.T. Snodgrass- A. Bottrighi, V. Khatri, G. Molino, S. Ram, M.Torchio- L. Lesmo, P. Torasso

Tucson, November 8th, 2012

Page 2: The Telic\Atelic Distinction  in Temporal Databases

The Telic\Atelic Distinction in Temporal Databases

Summary:

- Telic\atelic dichotomy (Linguistics)- (Data) semantics of relational temporal databases- The impact of the dichotomy on TDBs- New data model (semantics)- New query language (semantics: relational algebra)

- Extensions to SQL & implementations- Conceptual modeling- Conclusions & open issues

Page 3: The Telic\Atelic Distinction  in Temporal Databases

The Telic\Atelic Distinction

Aristotle’s “Categories” Telic facts: facts with a goal or culmination

(e.g., John build a house)Atelic facts: facts without goal\culmination

(e.g., John slept)(in Greek, “telos”=“goal”, “a” as a prefix indicates negation)

Studied\used in- Philosophy- Linguistics- Cognitive Science…- Logics, Artificial Intelligence

Page 4: The Telic\Atelic Distinction  in Temporal Databases

The Telic\Atelic Distinction

Deeply rooted in the Western culture

E.g., from Cognitive studies:

the aktionsart distinctions (and, in particular, the telic/atelic distinction) play a fundamental role in the acquisition of verbal paradigms by children:

- [Bloom et al. 1980]: English, - [Bronckart & Sinclair, 1973]: French, - [Aksu, 1978]: Turkish.

Page 5: The Telic\Atelic Distinction  in Temporal Databases

The Telic\Atelic Distinction

Moens and Steedman: “Effective exchange of information

between people and machines is easier

if the data structures that are used to organize the information in the machine

correspond in a natural way to the conceptual structures people use to organize the same

information”

WHY SHOULD WE CARE?

… BUT ALSO “MORE PRACTICAL” REASONS(current TDBs cannot cope correctly with telic facts!!)

Page 6: The Telic\Atelic Distinction  in Temporal Databases

The Telic\Atelic Distinction in Linguistics

Linguistic sentences can be classified into different aktionsart classes according to their linguistic behavior and to their semantic properties

E.g., [Vendler, 1967]Activities (e.g., “John slept”)Accomplishments (e.g., “John built a house”)Achievements (e.g., “John reached the top of the mountain”)States (e.g., “John had fever”)

Page 7: The Telic\Atelic Distinction  in Temporal Databases

The Telic\Atelic Distinction in Linguistics

Different linguistic behavior

E.g., progressive formActivities (e.g., “John was sleeping”)Accomplishments (e.g., “John was building a house”)Achievements (e.g., “John was reaching the top”)States (e.g., “John was having fever”)

Page 8: The Telic\Atelic Distinction  in Temporal Databases

The Telic\Atelic Distinction in Linguistics

Semantic properties

E.g., [Dowty, 1986] states vs. accomplishments:

(1) A sentence is stative if it follows from the truth of at an interval I that is true at all subintervals of I (e.g., if John was asleep from 1:00 to 2:00 PM, then he was asleep at all subintervals of this interval: be asleep is a stative).

(2) A sentence is an accomplishment/achievement (or kinesis) if it follows from the truth of at an interval I that is false at all subintervals of I (e.g., if John built a house in exactly the interval from September 1 until June 1, then it is false that he built a house in any subinterval of this interval: building a house is an accomplishment/achievement)

Page 9: The Telic\Atelic Distinction  in Temporal Databases

The Telic\Atelic Distinction in Linguistics

Semantic properties

Property 1 of states (and activities): downward inheritance.

Property 2 of states (and activities): upward inheritance.

E.g., if John was asleep from1:00 to 2:00 and from 2:00 to 3:00, then he was asleep from 1:00 to 3:00

NOTICE: neither Property 1 nor Property 2 holds for TELIC sentences (accomplishments)

Page 10: The Telic\Atelic Distinction  in Temporal Databases

The Telic\Atelic Distinction in Linguistics

Language is FLEXIBLE

“Basic” sentences can be classified as activities, accomplishments, achievements, and states

Languages provides linguistic tools to switch from one class to the other [Verkuyl], [Moens & Steedman]

e.g., when applied to an accomplishment, the progressive form converts it into an activity, since it strips out its culmination

(i) “John built a house” is TELIC(ii) “John was building a house” is ATELIC (indeed, the culmination is not implied by (ii))

Page 11: The Telic\Atelic Distinction  in Temporal Databases

The Telic\Atelic Distinction IMPACT ON TEMPORAL RELATIONAL DBs

Definition (Telic\Atelic facts).

Atelic facts (data) are facts (data) for which both downward and upward inheritance hold;

Telic facts are facts for which neither downward nor upward inheritance hold.

Page 12: The Telic\Atelic Distinction  in Temporal Databases

The Telic\Atelic Distinction IMPACT ON TEMPORAL RELATIONAL DBs

three distinctions:

(1)Representation versus semantics of the language (concrete vs. abstract databases [Chomicki, 1994])

(2)Data language versus query language.

(3)Data semantics versus query semantics

Page 13: The Telic\Atelic Distinction  in Temporal Databases

DATA SEMANTICSBCDM

(Bitemporal Conceptual Data Model [Jensen & Snodgrass, 96])

Temporal Domains

- Time is linear and totally ordered- Chronons are the basic time unit- Time domains are isomorphic to subsets of the domain

of Natural numbers

DVT = {t1,t2, …, tk} (valid time) DTT = {t’1,t’2, …, t’h} {UC} (transaction time)DTT DVT (bitemporal chronons)

Page 14: The Telic\Atelic Distinction  in Temporal Databases

BCDM

Data

Attribute names: DA={A1, A2, …, An}Attribute domains DD={D1, D2, …, Dn}

Schema of a bitemporal relation:R = Ai1, Ai2, …, Aij T

Domain of a bitemporal relation:Di1 Di2 … Dij DTT DVT

Tuple of a relation r(R):x = (a1, a2, …, aj | tB)

Page 15: The Telic\Atelic Distinction  in Temporal Databases

BCDM

Example.Relation Employee with Schema: (name,salary,T)

“Andrea was earning 60K at valid times 10, 11, 12”Such a tuple has been inserted into Employee at time 12, and is current now (say now=13)”

(Andrea, 60k | {(12,10), (12,11), (12,12),(13,10), (13,11), (13,12), ……})

VT

TT

10

12

12 13

11

Page 16: The Telic\Atelic Distinction  in Temporal Databases

BCDM

Example.Relation Employee with Schema: (name,salary,T)

“Andrea was earning 60K at valid times 10, 11, 12Such a tuple has been inserted into Employee at time 12, and is current now (say now=13)”

(Andrea, 60k | {(12,10), (12,11), (12,12),(13,10), (13,11), (13,12), (UC,10), (UC,11), (UC,12)})

VT

TT

10

12

12 13

11

UC

Page 17: The Telic\Atelic Distinction  in Temporal Databases

BCDM

Bitemporal relation: set of bitemporal tuples. Constraint: Value equivalent tuples are not allowed.

(Bitemporal) DB: set of (bitemporal) relations

Page 18: The Telic\Atelic Distinction  in Temporal Databases

BCDM

Data Semantics (another viewpoint)

Name Salary TAndrea 60K {(12,10), (12,11), (12,12),(13,10), (13,11),

(13,12), (UC,10), (UC,11), (UC,12)}

John 50K {(12,12),(12, 13)}

(12,10) {<Andrea,60K>}(12,11) {<Andrea, 60K>}(12,12) {<Andrea, 60K>, <John,50K>}(12,13) {<John,50K>}(13,10) {<Andrea,60K>}(13,11) {<Andrea, 60K>}……..(UC,12) {<Andrea, 60K>}

Page 19: The Telic\Atelic Distinction  in Temporal Databases

BCDM

HENCEFORTH: focus on VALID TIME

Name Salary TAndrea 60K {10,11,12}

John 50K {12,13}

10 {<Andrea,60K>}11 {<Andrea,60K>}12 {<Andrea,60K>, <John, 50K>}13 {<John, 50K>}

Page 20: The Telic\Atelic Distinction  in Temporal Databases

BCDM

PROPERTIES

Consistent extension (of “classical” SQL DB)A temporal DB is a set of “classical” DBs, one for each bitemporal chronon

Page 21: The Telic\Atelic Distinction  in Temporal Databases

BCDM & al.

POINT-BASED Data Semantics

A temporal database is a function from time points to a standard (non-temporal) database

“SNAPSHOT semantics”

Page 22: The Telic\Atelic Distinction  in Temporal Databases

BCDMQUERY semantics

r1 B r2 = {z | (∃xr1 ∃yr2 x[A]=y[A]=z[A] ∧ z[T]=x[T] y[T])

(∃xr1 x[A]=z[A] ∧ (∃yr2 y[A]=z[A]) ∧ z[T]=x[T])

(∃yr2 y[A]=z[A] ∧ (∃xr1 x[A]=z[A]) ∧ z[T]=y[T])}

Algebraic Operators(E.g. Union)

- Coalescing!

Page 23: The Telic\Atelic Distinction  in Temporal Databases

BCDM

Reducibility

rT ρtT (rT)

ρtT

opT (rT)

opTop

op(ρtT (rT))

ρtT

ρtT(opT (rT))

=

Page 24: The Telic\Atelic Distinction  in Temporal Databases

An example of implementation: TSQL2(Snodgrass et al., 1995)

Temporal attribute T four temporal attributes (TTS, TTE, VTS, VTE)

Attribute value: a timestamp or UC

Bitemporal tuple: A1,….An| TTS, TTE, VTS, VTE

Bitemporal relation: set of bitemporal tuples

Page 25: The Telic\Atelic Distinction  in Temporal Databases

An example of implementation: TSQL2(Snodgrass et al., 1995)

Name Salary TAndrea 60K {10,11,12}

John 50K {12}

Name Salary VTS VTE

Andrea 60K 10 12

John 50K 12 13

SEMANTICS

BCDM

TSQL2

10 {<Andrea,60K>}11 {<Andrea,60K>}12 {<Andrea,60K>, <John, 50K>}13 {<John, 50K>}

Page 26: The Telic\Atelic Distinction  in Temporal Databases

BCDM (TSQL2 & al.) vs. TELIC\ATELIC

Name Salary VTS VTE

Andrea 60K 10 12

SEMANTICS

TSQL2

10 {<Andrea,60K>}11 {<Andrea,60K>}12 {<Andrea,60K>}

Downward inheritance: ([10,12]) (10) (11) (12)

Page 27: The Telic\Atelic Distinction  in Temporal Databases

BCDM (TSQL2 & al.) vs. TELIC\ATELIC

SEMANTICS

TSQL2

10 {<Andrea,60K>}11 {<Andrea, 60K>}12 {<Andrea, 60K>}13 {<Andrea, 60K>}

Upward inheritance: ([10,11]) ([12,13]) ([10,11] [12,13])

Name Salary VTS VTE

Andrea 60K 10 11

Andrea 60K 12 13

Page 28: The Telic\Atelic Distinction  in Temporal Databases

BCDM (TSQL2 & al.) vs. TELIC\ATELIC

Current temporal databases adopt BCDM semantics

Naturally support Upward and Downward inheritance

Naturally support ATELIC facts (data)

WHAT ABOUT TELIC FACTS (DATA)

?

Page 29: The Telic\Atelic Distinction  in Temporal Databases

TELIC FACTS & BCDM (point-based) semantics

E.g. Sue had an administration of 500 mg of cyclophosphamide (a cancer drug) starting at 1 and ending at 3 (inclusive)

1 {<Sue, cyclophosphamide, 500>}2 {<Sue, cyclophosphamide, 500>}3 {<Sue, cyclophosphamide, 500>}

Downward inheritance is (erroneously) enforced!

How many administrations? What is their duration? How many mg. administered?

Page 30: The Telic\Atelic Distinction  in Temporal Databases

TELIC FACTS & BCDM (point-based) semantics

E.g. Sue had - an administration of 500 mg of cyclophosphamide starting at 1 and ending at 3 (inclusive), and - an administration of 500 mg of cyclophosphamide at 4

1 {<Sue, cyclophosphamide, 500>}2 {<Sue, cyclophosphamide, 500>}3 {<Sue, cyclophosphamide, 500>}4 {<Sue, cyclophosphamide, 500>}

Upward inheritance is (erroneously) enforced!

How many administrations? What is their duration? How many mg. administered?

Page 31: The Telic\Atelic Distinction  in Temporal Databases

TELIC FACTS & BCDM (point-based) semantics

As well known in Linguistics (and Artificial Intelligence, Logics)

1 {<Sue, cyclophosphamide, 500>}2 {<Sue, cyclophosphamide, 500>}3 {<Sue, cyclophosphamide, 500>}4 {<Sue, cyclophosphamide, 500>}

POINT-BASED SEMANTICS IS NOT EXPRESSIVE ENOUGH TO COPE WITH TELIC FACTS (DATA)

Page 32: The Telic\Atelic Distinction  in Temporal Databases

SYNTAX vs. SEMANTICS of data

<Sue, cyclophosphamide, 500 || {1,2,3,4}> ADM

<Sue, cyclophosphamide, 500 || {[1–3],[4–4]}> ADM

<Sue, cyclophosphamide, 500 || [1–3]> ADM and<Sue, cyclophosphamide, 500 || [4–4]> ADM

For instance, TSQL2 uses time intervals in the representation

NOTICE: this discussion is INDEPENDENT OF THE IMPLEMENTATION (representation syntax)

Name Drug Quantity VTS VTE

Sue cyclophosphamide 500 1 3

Sue cyclophosphamide 500 4 4

Page 33: The Telic\Atelic Distinction  in Temporal Databases

SYNTAX vs. SEMANTICS of data

1 {<Sue, cyclophosphamide, 500>}2 {<Sue, cyclophosphamide, 500>}3 {<Sue, cyclophosphamide, 500>}4 {<Sue, cyclophosphamide, 500>}

But they are merely a compact representation for a set of point, since the semantics is

Page 34: The Telic\Atelic Distinction  in Temporal Databases

SYNTAX vs. SEMANTICS of data

1 {<Sue, cyclophosphamide, 500>}2 {<Sue, cyclophosphamide, 500>}3 {<Sue, cyclophosphamide, 500>}4 {<Sue, cyclophosphamide, 500>}

Needless to remember that …

Answers to query must be provided on the basis of the SEMANTICS of data

(independently of the representation syntax)

How many administrations? What is their duration? How many mg. administered?

Page 35: The Telic\Atelic Distinction  in Temporal Databases

TELIC FACTS & BCDM (point-based) semantics

As predicted, e.g., by the Linguistic literature

POINT-BASED (snapshot, BCDM, …) SEMANTICS IS NOT ADEQUATE (expressive enough) TO COPE WITH TELIC FACTS

INTERVAL-BASED SEMANTICS IS NEEDED !!

Page 36: The Telic\Atelic Distinction  in Temporal Databases

SEMANTICS for TELIC FACTS

E.g. Sue had - an administration of 500 mg of cyclophosphamide starting at 1 and ending at 3 (inclusive), and - an administration of 500 mg of cyclophosphamide at 4

[1,3] {<Sue, cyclophosphamide, 500>}[4,4] {<Sue, cyclophosphamide, 500>}

INTERVAL-BASED SEMANTICS: function from INTERVALS to facts

Page 37: The Telic\Atelic Distinction  in Temporal Databases

SEMANTICS for TELIC FACTS:INTERVAL-BASED SEMANTICS

INTERVALS ARE PRIMITIVE AND ATOMIC NOTIONS (i.e., NOT A NOTATION FOR A SET OF TIME POINTS !!!)

Page 38: The Telic\Atelic Distinction  in Temporal Databases

SEMANTICS for TELIC FACTS:INTERVAL-BASED SEMANTICS

DiSIT has- A 50K contract with IBM from 1 to 12- A 50K contract with IBM from 7 to 18

[1,12] {<DiSIT,IBM,50K>}[7,18] {<DiSIT,IBM,50K>}

Page 39: The Telic\Atelic Distinction  in Temporal Databases

INTERVAL-BASED SEMANTICS vs. TELIC\ATELIC

NO downward inheritance:

([1,3]) ↛ (1) ([1,3]) ↛ (2) ([1,3]) ↛ (3)

[1,3] {<Sue, cyclophosphamide, 500>}[4,4] {<Sue, cyclophosphamide, 500>}

Does not imply (mean) that Sue had a (complete) cyclophosphamide administration, e.g., at 2

The administration was exactly from 1 to 3 (and nowhere else)

Page 40: The Telic\Atelic Distinction  in Temporal Databases

INTERVAL-BASED SEMANTICS vs. TELIC\ATELIC

NO upward inheritance:

([1,3]) ([4,4]) ↛ ([1,4])

[1,3] {<Sue, cyclophosphamide, 500>}[4,4] {<Sue, cyclophosphamide, 500>}

Does not imply (mean) that Sue had a (complete) cyclophosphamide administration from 1 to 4

She had two distinct administrations!

Page 41: The Telic\Atelic Distinction  in Temporal Databases

(DATA) SEMANTICS FOR TEMPORAL DATABASES

Both ATELIC and TELIC facts EXIST in (our way of looking at) REALITY [Aristotle] …

POINT-BASED semantics is needed for ATELIC factsINTERVAL-BASED semantics is needed for TELIC facts

Two-sorted data model, where- Atelic relations have a POINT-BASED semantics- Telic relations have an INTERVAL-BASED semantics

(independently of the chosen implementation\representation)

P. Terenziani, Proc. TIME’00, pp. 191-199, 2000.P. Terenziani, R.T. Snodgrass, IEEE TKDE 16(5), pp. 540-551, 2004.

Page 42: The Telic\Atelic Distinction  in Temporal Databases

POSSIBLE CRITICISM: TOO COMPLEX FOR USERS !?

Additional complexity (if any) is due to ADDITIONAL EXPRESSIVENESS

Such an additional expressiveness is needed to cope with the human way of looking at the world

“Effective exchange of information between people and machines

is easier if the data structures that are used to organize the

information in the machine correspond in a natural way

to the conceptual structures people use to organize the same information”

Page 43: The Telic\Atelic Distinction  in Temporal Databases

POSSIBLE CRITICISM: TOO COMPLEX FOR USERS !?

Criteria to distinguish between atelic and telic relations

Do I want upward and downward inheritance for (facts in) this relation?

YES NO

ATELIC TELIC

Page 44: The Telic\Atelic Distinction  in Temporal Databases

QUERY SEMANTICS(ALGEBRA)

Queries must operate on:- Atelic relations- Telic relations- Telic and Atelic relations together

From Natural Language:- Flexibility is needed (conversion from\to telic\atelic)

Page 45: The Telic\Atelic Distinction  in Temporal Databases

ATELIC ALGEBRA

r1 A r2 = {z | (∃xr1 ∃yr2 x[A]=y[A]=z[A] ∧ z[T]=x[T] y[T])

(∃xr1 x[A]=z[A] ∧ (∃yr2 y[A]=z[A]) ∧ z[T]=x[T])

(∃yr2 y[A]=z[A] ∧ (∃xr1 x[A]=z[A]) ∧ z[T]=y[T])}

e.g., BCDM

Union between atelic relations

Standard union between two sets of time points

Page 46: The Telic\Atelic Distinction  in Temporal Databases

ATELIC ALGEBRA

10 {<Andrea,60K>}11 {<Andrea, 60K>}12 {<Andrea, 60K>}13 {<Andrea, 60K>}

Name Salary T

Andrea 60K {10,11}

UNION supports upward inheritance (COALESCING)

Name Salary T

Andrea 60K {12,13}

Name Salary T

Andrea 60K {10,11,12,13}

12 {<Andrea, 60K>}13 {<Andrea, 60K>}

10 {<Andrea,60K>}11 {<Andrea, 60K>}

A

Page 47: The Telic\Atelic Distinction  in Temporal Databases

TELIC ALGEBRA

r1 T r2 = {z | (∃xr1 ∃yr2 x[A]=y[A]=z[A] ∧ z[T]=x[T] y[T])

(∃xr1 x[A]=z[A] ∧ (∃yr2 y[A]=z[A]) ∧ z[T]=x[T])

(∃yr2 y[A]=z[A] ∧ (∃xr1 x[A]=z[A]) ∧ z[T]=y[T])}

Terenziani & Snodgrass, TKDE 2004

Union between telic relations

Standard union between two sets of time intervals

E.g., {[10,15], [20,25]} {[5,30], [20,40]} = {[5,30],[10,15], [20,25], [20,40]}

Page 48: The Telic\Atelic Distinction  in Temporal Databases

TELIC ALGEBRATELIC UNION does not support upward inheritance

T

Name Drug Quant. T

Sue Cycloph. 500 [1,3]

[1,3] {<Sue, cycloph, 500>}[4,4] {<Sue, cycloph, 500>}

Name Drug Quant. T

Sue Cycloph. 500 [1,3]

Sue Cycloph. 500 [4,4]

Name Drug Quant. T

Sue Cycloph. 500 [4,4]

[4,4] {<Sue, cycloph, 500>}[1,3] {<Sue, cycloph, 500>}

Page 49: The Telic\Atelic Distinction  in Temporal Databases

TELIC ALGEBRA

In principle: a polymorphic adaptation of a “consensus” atelic algebra (e.g., BCDM algebra)

where set operators on temporal elements operate on sets of time intervals instead that on sets of time points

However, both commonsense and semantic restrictions might\should be considered in the definition of both atelic and telic

operators

Page 50: The Telic\Atelic Distinction  in Temporal Databases

ATELIC\TELIC ALGEBRA

Ex.1 TELIC CARTESIAN PRODUCT

Atelic Cartesian Product involves the INTERSECTION of temporal elements (i.e., of sets of time points - semantic level)

Its polymorphic TELIC adaptation would involve the INTERSECTION of sets of time intervals, giving in output only common time intervals

e.g., {[10,15], [20,30]} {[10,15], [18, 40]} = {[10,15]}

Is such an operation useful \ commonsense \ meaningless for users?

Page 51: The Telic\Atelic Distinction  in Temporal Databases

ATELIC\TELIC ALGEBRA

Ex.2 TEMPORAL SELECTION (e.g., duration)

All existing temporal algebrae are atelic. Indeed, most of them provide temporal selection (e.g., query about duration)

But is duration something that can be evaluated “point-by-point” (snapshot-by-snapshot, i.e., in an atelic context) ?

Indeed, duration regards the duration of minimal intervals covering convex sets of points!

Thus, duration is about TIME INTERVALS, and thus regards the TELIC context.

Page 52: The Telic\Atelic Distinction  in Temporal Databases

ATELIC\TELIC ALGEBRA

In a two-sorted domain with both atelic and telic relation, we need- A way of asking telic queries (e.g., queries about duration) on

atelic data (and viceversa)- A way of querying both telic and atelic data in the same query

NOTICE: the flexibility of moving from an atelic to a telic view of data, and viceversa, is provided in all natural languages!

SOLUTION (Terenziani & Snodgrass, TKDE 2004):CONVERSION OPERATORS

Page 53: The Telic\Atelic Distinction  in Temporal Databases

ATELIC\TELIC ALGEBRACONVERSION OPERATORS

OPERATORS BETWEEN TIMEs:to-interval({1,2,3,4,7,8,9,11}) {[1,4],[7,9],[11,11]}to-point({[1,3],[4,4],[7,10]}) {1,2,3,4,7,8,9,10}

NOTICE: to-interval(to-point({[1,3],[4,4],[7,10]})) {[1,3],[4,4],[7,10]}

There is a loss of information when moving from intervals to points!

Page 54: The Telic\Atelic Distinction  in Temporal Databases

ATELIC\TELIC ALGEBRACONVERSION OPERATORS

OPERATORS BETWEEN RELATIONSs:

to-telic. Converts an atelic relation into a telic one, by leaving the non-temporal parts unchanged, and by applying the “to-interval” conversion to the temporal component of tuples

to-atelic.Converts a telic relation into an atelic one, by leaving the non-temporal parts unchanged, and by applying the “to-point” conversion to the temporal component of tuples

Page 55: The Telic\Atelic Distinction  in Temporal Databases

ATELIC\TELIC ALGEBRAExamples

Ex.1 “Who had a salary greater than 40K for at least 3 consecutive years, and what was her salary?”

Name Salary TAndrea 60K {10,11,12}

John 50K {12,13}

10 {<Andrea,60K>}11 {<Andrea,60K>}12 {<Andrea,60K>, <John, 50K>}13 {<John, 50K>}

Tduration 3 (to-telic(A

Salary>40(EMPA)))

Page 56: The Telic\Atelic Distinction  in Temporal Databases

ATELIC\TELIC ALGEBRAExamples

10 {<Andrea,60K>}11 {<Andrea,60K>}12 {<Andrea,60K>, <John, 50K>}13 {<John, 50K>}

r’=(ASalary>40(EMPA)

r”=(to-telic(r’))[10 ,12] {<Andrea,60K>}[12,13] {<John, 50K>}

Tduration 3 (r”)

[10 ,12] {<Andrea,60K>}

Page 57: The Telic\Atelic Distinction  in Temporal Databases

ATELIC\TELIC ALGEBRAExamples

Ex.2 “Who had a (complete) drug administration before the time when Andrea earned 50K?”

TName(ADMINT BEFORE (to-telic(

Name=Andrea, Salary=50K (EMPA)))

Page 58: The Telic\Atelic Distinction  in Temporal Databases

ATELIC\TELIC ALGEBRAExamples: Phone calls (PH)

“Who made a (complete) phone call while John was calling Mary?”

[10,12] {<John,Mary>}[12,14] {<Sue,Ann>}[13,15] {<John,Mary>}[14,16] {<Eric,Paul>}[15,16] {<Sue,Ann>}

telic atelic

telic

TCaller(PHONET DURING

(to-telic(to-atelic( Caller=John, Called=Mary (PHONET)))))

Page 59: The Telic\Atelic Distinction  in Temporal Databases

[10,12] {<John,Mary>}[12,14] {<Sue,Ann>}[13,15] {<John,Mary>}[14,16] {<Eric,Paul>}[15,16] {<Sue,Ann>}

[10,12] {<John,Mary>}[12,14] {<Sue,Ann>}[13,15] {<John,Mary>}[14,16] {<Eric,Paul>}[15,16] {<Sue,Ann>}

r= Caller=John, Called=Mary (PHT)

PHT PHT

[10,12] {<John,Mary>}[13,15] {<John,Mary>}

r’= to-atelic(r)

r”= to-telic(r)

10 {<John,Mary>} 11 {<John,Mary>} 12 {<John,Mary>} 13 {<John,Mary>} 14 {<John,Mary>} 15 {<John,Mary>}

[10,15] {<John,Mary>}DURING

[10,12] {<John,Mary>}[12,14] {<Sue,Ann>}[13,15] {<John,Mary>}

Page 60: The Telic\Atelic Distinction  in Temporal Databases

POSSIBLE CRITICISM: TOO COMPLEX FOR USERS !?

Additional complexity (if any) is due to ADDITIONAL EXPRESSIVENESS

Such an expressiveness is present in ALL NATURAL LANGUAGES

“Effective exchange of information between people and machines

is easier if the data structures that are used to organize the

information in the machine correspond in a natural way

to the conceptual structures people use to organize the same information”

Page 61: The Telic\Atelic Distinction  in Temporal Databases

Telic\Atelic extensions to SQL (e.g., TSQL2)

Terenziani, Snodgrass et al., Artificial Intelligence in Medicine 39(2)113-126, 2007.

- if no explicit indication is provided, temporal data are atelic. - definition of telic tables: “AS TELIC” clause in the TSQL2

CREATE TABLE statement.

-by default, the result of queries is an atelic relation; - telic queries: prepend the keyword “TELIC” (i.e., “TELIC SELECT”).

- Conversions functions

Page 62: The Telic\Atelic Distinction  in Temporal Databases

Implementation (Hint)

- NOTICE 1: current temporal databases support the ATELIC view

- NOTICE 2: current non-temporal databases (and current treatment of non-temporal data in temporal databases)support the TELIC view, in that neither upward nor downward inheritance are supported

Page 63: The Telic\Atelic Distinction  in Temporal Databases

Implementation (Hint)

Starting from a temporal database, we have

- The atelic treatment for free

- The telic treatment by managing telic temporal tables as non-temporal ones

- Conversions functions must be added

Page 64: The Telic\Atelic Distinction  in Temporal Databases

Conceptual Temporal Models

Khatri, Ram, Snodgrass, Terenziani. IEEE TKDE. ISSN:1041-4347. 2012.

Annotation-based temporal model

1) capturing “what” semantics using a conventional conceptual model;

2) annotations to differentiate between telic and atelic data semantics

3) (non-sequenced) temporal constraints as metadata

Page 65: The Telic\Atelic Distinction  in Temporal Databases

Conceptual Temporal Models

Syntax of the annotations.

annotation ::= є | temporal annotation  temporal annotation ::= є | valid time / transaction time valid time ::= state (g) | event (g) | - state ::= telic state | atelic statetransaction time ::= T | Transaction | -telic state ::= Acc | Accomplishmentatelic state ::= S | State | Atelic Stateevent ::= E | Event

Page 66: The Telic\Atelic Distinction  in Temporal Databases

Conceptual Temporal ModelsSemantics of the annotations

VT_EVENT VT_STATE VT_ACCOMPLISHMENT

VT_EVENTUALITY TT_EVENTUALITY

S

ID ID

SS

S

maximal_period

begin end

time_point TT_STATEtelic_period

begin end

time_period

begin end

TEMPORAL GRANULARITY

1:1

anchor-gran

groups-into

courser-than

finer-than

0:M

0:M

ishas

0:1 0:M

name

VT_has TT_has

1:1

0:M 0:M

anchor

extent

min

max

ENTITY CLASS

attribute

relationship

multi-valued attribute

LEGEND

SSuperclass/

Subclass relationship

Page 67: The Telic\Atelic Distinction  in Temporal Databases

Conceptual Temporal ModelsSemantics of the annotations

Axiom 1: maximal_period and telic_period

Telic periods (i.e., the valid times of VT_ACCOMPLISHMENTs) are well-formed.e S(VT_ACCOMPLISHMENT), p VT_ACCOMPLISHMENT(e, telic_period), begin(e, p) < end(e, p)

Maximal temporal periods (i.e., the valid time of VT_STATEs) are well-formed.e S(VT_STATE), p VT_STATE(e, maximal_ period), begin(e, p) < end (e, p)

Maximal temporal periods (i.e., the valid time of VT_STATEs) cannot overlap in time. Such a constraint does not hold for telic periods.e S(VT_STATE), p1, p2 VT_STATE(e, maximal_ period),

begin(e, p1) < begin(e, p2) end (e, p1) < begin (e, p2)

Page 68: The Telic\Atelic Distinction  in Temporal Databases

Conceptual Temporal ModelsSemantics of the annotations

Downward and upward inheritance (apply to VT_STATE)

VT_Down e, p1, p2, VT_STATE(e) VT_STATE.hold(e, p1) p2 p1 VT_STATE.hold(e, p2)  VT_Upe, p1, p2, VT_STATE(e) VT_STATE.hold(e, p1) VT_STATE.hold(e, p2) (MEETS(p1, p2) MEETS-1(p1, p2) OVERLAPS(p1, p2) OVERLAPS-1(p1, p2)

FINISHED(p1, p2) FINISHED-1(p1, p2) DURING(p1, p2) DURING-1(p1, p2) STARTS(p1, p2) STARTS-1(p1, p2) EQUALS(p1, p2) )

VT_STATE.hold(e, p1 p2)

Page 69: The Telic\Atelic Distinction  in Temporal Databases

Conceptual Temporal ModelsSemantics of composition

No Type of attribute/relationship (A/R)

Type of entity class (EC)

Coercion to atelic

Semantics

1 є or non-temporal є or non-temporal – Conventional

2 є or non-temporal S or VT_STATE – Infer A/R is temporal

3 є or non-temporal Acc or VT_ACCOMPLISHMENT

EC Infer A/R is temporal

4 є or non-temporal E or VT_EVENT – Infer A/R is temporal

5 S or VT_STATE S or VT_STATE –

6 S or VT_STATE Acc or VT_ACCOMPLISHMENT

EC

7 S or VT_STATE є or non-temporal – Infer EC is temporal

8 S or VT_STATE E or VT_EVENT –

9 Acc or VT_ACCOMPLISHMENT

S or VT_STATE A/R

10 Acc or VT_ACCOMPLISHMENT

Acc or VT_ACCOMPLISHMENT

EC, A/R

11 Acc or VT_ACCOMPLISHMENT

є or non-temporal A/R Infer EC is temporal

12 Acc or VT_ACCOMPLISHMENT

E or VT_EVENT A/R

13 E or VT_EVENT S or VT_STATE –

14 E or VT_EVENT Acc or VT_ACCOMPLISHMENT

EC

15 E or VT_EVENT є or non-temporal – Infer EC is temporal

16 E or VT_EVENT E or VT_EVENT –Interaction of temporal/non-temporal attribute/relationship

with temporal/non-temporal entity class

Page 70: The Telic\Atelic Distinction  in Temporal Databases

ConclusionsThe telic\atelic dichotomy seems to be an intrinsic part of human way of dealing with reality (speaking, modeling, …)

Not coping with such a dichotomy leads to modeling errors in temporal databases

New approach to cope with the telic\atelic dichotomy- In the data model- In the relational algebra- In a SQL-like query language- In conceptual modeling

Future work (open challenges):- temporal indeterminacy- aggregation- data warehousing- spatial data