Skip to content
Home » TEMPORAL RELATIONSHIPS

TEMPORAL RELATIONSHIPS


TEMPORAL RELATIONSHIPS (Detailed Explanation)

In Temporal Databases, data is associated with time, and relationships between data items also change over time.
A temporal relationship describes how two or more time-dependent events, states, or facts relate to each other based on time intervals.

Temporal relationships help in understanding:

✔ How events follow each other
✔ When two events occur together
✔ Whether one event overlaps another
✔ Whether one event depends on the timing of another

These relationships are essential for temporal queries, temporal integrity, and time-based reasoning in database systems.


1. WHAT IS A TEMPORAL RELATIONSHIP?

A temporal relationship describes the connection between data items based on the time period during which they are valid.

Each tuple in a temporal database has:

  • A validity interval → (Valid_From, Valid_To)
  • Or transaction time → (Start_TT, End_TT)

Temporal relationships compare these intervals.


2. TYPES OF TEMPORAL RELATIONSHIPS

The classification of temporal relationships is based on Allen’s Interval Algebra, commonly used in temporal databases.

Allen defines 13 basic temporal relationships between two time intervals A and B.

Let:

  • A = (A_start, A_end)
  • B = (B_start, B_end)

A. SAME-TIME RELATIONSHIPS

✔ 1. Equal

Both intervals have same start and end time.

Example:
A person’s temporary address is the same during two records.


B. BEFORE/AFTER RELATIONSHIPS

✔ 2. Before

A ends before B starts.
A_end < B_start

Example:
Employee salary period A (2020) before period B (2021).


✔ 3. After

A starts after B ends.
A_start > B_end


C. MEET / FOLLOW RELATIONSHIPS

✔ 4. Meets

A ends exactly when B starts.
A_end = B_start

Example:
Salary from Jan–Jun meets salary from Jul–Dec.


✔ 5. Met-by

Reverse of meets.


D. OVERLAP RELATIONSHIPS

✔ 6. Overlaps

A starts before B and ends during B.
Example:
A sale offer overlapping with a promotional period.


✔ 7. Overlapped-by

Reverse of overlaps.


E. START RELATIONSHIPS

✔ 8. Starts

A starts at the same time as B but ends before B.

Example:
Employee training starting with a project but ending earlier.


✔ 9. Started-by

Reverse of starts.


F. END RELATIONSHIPS

✔ 10. Finishes

A ends at same time as B but starts later.

Example:
Two tasks ending together, but one started later.


✔ 11. Finished-by

Reverse of finishes.


G. DURING RELATIONSHIPS

✔ 12. During

A happens entirely inside B.

Example:
Internship period during fiscal year period.


✔ 13. Contains

Reverse of during.


Summary Table of Temporal Relationships

RelationshipMeaning
EqualsSame timeline
Before / AfterOne interval earlier/later
Meets / Met-byOne ends when another begins
Overlaps / Overlapped-byPartial overlap
Starts / Started-bySame start time
Finishes / Finished-bySame end time
During / ContainsOne inside another

3. IMPORTANCE OF TEMPORAL RELATIONSHIPS IN TEMPORAL DATABASES

Temporal relationships are essential for:


A. Temporal Query Processing

Queries such as:

  • “Which employees worked together during 2022?”
  • “Find promotions overlapping with training periods.”
  • “Show medical appointments that meet or overlap.”

Temporal relationships make these queries possible.


B. Maintaining Temporal Integrity

Ensures:

✔ Valid time intervals do not conflict
✔ Overlapping records handled correctly
✔ No contradictory history data

Example: A customer cannot be assigned to two agents during the same interval (unless allowed).


C. Time-Based Reasoning

Used in:

  • AI
  • Knowledge systems
  • Bi-temporal analysis
  • Event monitoring

Temporal relationships help in understanding cause-effect and sequence of events.


D. Historical and Forecast Analysis

  • Trend identification
  • Comparing periods
  • Analyzing historical patterns
  • Predictive analytics

4. REAL-WORLD EXAMPLES

✔ HR Systems

Relationship between job roles and salary periods.

✔ Healthcare

Overlapping medication periods or treatment phases.

✔ Banking

Account closing meets new account opening.

✔ Insurance

Policy validity overlapping with claim timelines.

✔ Project Management

Task dependencies based on temporal ordering.


Perfect 5–6 Mark Short Answer

Temporal relationships explain how two time intervals relate to each other in temporal databases. Based on Allen’s interval algebra, the 13 temporal relationships include before, after, meets, overlaps, starts, finishes, during, and equals. These relationships help in time-based queries, temporal reasoning, maintaining historical integrity, scheduling, and analyzing events over time. Temporal relationships are essential for systems that manage time-dependent data such as HR, healthcare, finance, and project management.