Extending POSTGRES with ADT's

Description

Consider a database application wherein we want to maintain a historical events database (e.g. the database may contain facts such as, ``J.F. Kennedy was president from 1961 to 1963,'' ``WWI took place from 1914 to 1918," etc). In addition, we want to maintain a person database. For each person we want to keep track of the life-span of that person, along with the person's name, place of birth and place of death (e.g. the database may contain the following fact "J.F. Kennedy lived from 1917 to 1963, his was born in Brookline, Mass, and he died in Dallas, Texas.").

We subsequently like to solve problems such as:

To solve these problems it is useful to have an ADT time-interval.

Formally, we assume that we have the ordered domain of the reals. A time interval T is represented by a pair of reals (m,n) such that m <= n. We will use the following notation: T- denotes the lesser interval point of T (i.e, the point m), and T+ denotes the higher interval point of T (i.e., the point n). The semantics of a time interval T can be thought of as all the real points between T- and T+.

We also have the following methods associated with the ADT Time-Interval (TI for short).

(For further information about TI consult the article ``Maintaining Knowledge about Temporal Intervals'' by James F. Allen, _Communications of the ACM_, November 1983.

Tasks