Database Systems · UGC NET: Enhanced Data Models
Temporal and Multimedia Databases
Overview
Temporal databases manage facts that change with time and store the history of those changes instead of only the current state.
Multimedia databases manage large, unstructured data such as images, audio, video and graphics, where retrieval often depends on content similarity rather than exact keyword matching.
This lesson sits in the Enhanced Data Models area of DBMS Extras and expects you to know the standard terminology used by Elmasri and Navathe.
Before studying it, revise the relational model, primary keys, intervals, basic indexing and distance measures.
The exam usually tests definitions, time-dimension distinctions, interval logic, temporal query types, CBIR features and similarity measures.
Key concepts
- A temporal database stores time-varying data and supports queries about past, present and future states.
- Valid time (VT) is the time when a fact is true in the modelled reality. It is user-supplied, may lie in the past or future, and is independent of when the database stored it.
- Transaction time (TT) is the time when a fact is current or believed by the database. It is system-generated, records commit or storage time, and for stored facts it does not lie in the future.
- A bitemporal relation stores both valid time and transaction time.
- A snapshot relation is a normal relation without time support; it stores only the current state.
- A valid-time relation supports only valid time. It is often called a historical relation.
- A transaction-time relation supports only transaction time. It is often called a rollback relation because it can reconstruct earlier database states.
- A bitemporal relation stores facts with both intervals, e.g. “the database believed during TT interval that salary was valid during VT interval”.
- Use the Elmasri–Navathe convention here: time intervals are half-open, written . The start instant is included and the end instant is excluded.
- A chronon is the smallest indivisible time unit used by the database.
- Temporal coalescing merges value-equivalent tuples whose time intervals are adjacent or overlapping, e.g. and with the same key and same value become .
- A timeslice query returns the tuples valid at a specified time instant.
- A rollback query reconstructs a transaction-time relation as it was at an earlier transaction time.
- In a transaction-time relation, updates are append-only: the old tuple’s TT end is closed and a new tuple version is inserted; old versions are not physically overwritten.
- For single-valued facts in a valid-time relation, two tuples with the same key and different values must not have overlapping valid intervals; otherwise the value is ambiguous.
Overlapping same-value versions are redundant and can be coalesced. - A multimedia database stores text, images, audio, video, animation and graphics.
A Multimedia Database Management System (MMDBMS) must handle large objects, continuous media, compression, synchronization and Quality of Service (QoS). - Content-Based Image Retrieval (CBIR) retrieves images by automatically extracted features such as colour, texture and shape, without relying only on manual text annotations.
- A feature vector is a numeric descriptor of content. Similarity is found by comparing a query feature vector with stored feature vectors.
- Low-level features include colour histograms, colour moments, texture descriptors, shape descriptors and spatial layout. The semantic gap is the difference between low-level features and human meaning.
- Common similarity measures are Euclidean distance, Manhattan distance, cosine similarity and histogram intersection.
- Large multimedia objects are often stored as BLOB (Binary Large Object) or CLOB (Character Large Object).
- Multidimensional indexes such as R-trees, k-d trees, quad trees and metric trees help similarity search; very high dimensionality causes the curse of dimensionality.
How it works
- Choose time dimensions. Decide whether the application needs valid time, transaction time or both. A salary history of the real world uses valid time. A financial audit of what the database stored uses transaction time.
Audit plus real-world history uses bitemporal. - Store time with every version. Each tuple carries interval attributes such as
VT_start, VT_endorTT_start, TT_end. For half-open intervals, a time instant belongs to when . - Handle transaction-time updates. A current tuple is closed by setting its
TT_endto the current time; a new tuple withTT_startequal to that time is inserted. A logical deletion closes the tuple without inserting a replacement.
Old rows remain for rollback. - Enforce temporal consistency. For the same key and single-valued attribute, different values cannot have overlapping valid intervals.
Transaction-time versions of the same logical fact must have non-overlapping transaction intervals. - Answer temporal queries. A timeslice query uses the containment condition. A rollback query uses the transaction interval. A bitemporal belief query checks both intervals.
- Coalesce when needed. Sort by key, value and start time.
If two consecutive tuples have the same key and same non-time values, and one ends exactly where the next starts or their intervals overlap, merge them into one interval. - Build the multimedia retrieval pipeline. Store the media, extract features, build an index over feature vectors, submit a query by example or sketch, compute similarity, rank results and evaluate with precision and recall.
Drawing the diagram…
Drawing the diagram…
Formulas
-
Interval containment for half-open : .
-
Interval overlap for half-open intervals: .
-
Interval duration: for .
-
Coalescing condition for half-open intervals: if values are equal and , then and merge to .
-
Bitemporal containment: a tuple is relevant for transaction instant and valid instant when
-
.
-
Euclidean distance: . Smaller distance means greater similarity.
-
Manhattan distance: .
-
Cosine similarity: . Larger value means greater similarity.
-
Histogram intersection for normalized histograms: . Larger value means greater similarity.
-
Precision: .
-
Recall: .
-
F-score: .
Worked examples
Example 1: valid-time timeslice. A relation stores (EmpID, Salary, VT_start, VT_end). Geeta has (Geeta, 50000, 2018-01-01, 2020-01-01) and (Geeta, 60000, 2020-01-01, 2022-01-01). Query: salary on 2020-06-01. Check VT_start <= 2020-06-01 < VT_end. The first interval fails because 2020-06-01 is not before 2020-01-01. The second interval satisfies 2020-01-01 <= 2020-06-01 < 2022-01-01. Answer: 60000.
Example 2: coalescing and counting. For key , tuples are and over integer time instants. The non-time values are equal and , so the intervals are adjacent. Coalescing gives .
This interval contains integer instants , i.e. 6 instants. If the values were different, no coalescing would be allowed.
Example 3: transaction-time deletion. Ankur’s tuple has transaction interval . At it is logically deleted by closing the interval to . Under half-open convention, the tuple is current at and only.
Number of time units = .
It can still be seen by a rollback query before , but not as current after .
Example 4: bitemporal belief query. Ramesh’s salary tuple is (50000, VT [2019-01-01, 2021-01-01), TT [2020-01-01, 2020-07-01)). Query: what did the database believe on transaction date 2020-03-01 about salary valid on 2020-06-01? TT condition: 2020-01-01 <= 2020-03-01 < 2020-07-01 true. VT condition: 2019-01-01 <= 2020-06-01 < 2021-01-01 true. Answer: 50000.
If transaction date were 2020-08-01, the tuple would not answer the query because its TT interval has ended.
Example 5: statement-type. Statement I: CBIR can compare automatically extracted feature vectors such as colour and texture. Statement II: In a transaction-time relation, an update physically overwrites the old tuple.
Statement I is true. Statement II is false because transaction-time relations are append-only; old versions are retained. Answer: only I is correct.
Comparison
| Concept | Valid time | Transaction time | Bitemporal |
|---|---|---|---|
| Meaning | When fact is true in reality | When database stored or believed fact | Both |
| Supplied by | User or application | DBMS | DBMS plus user |
| Future values | Allowed | Not for stored facts | VT may be future, TT is storage time |
| Typical relation | Historical relation | Rollback relation | Bitemporal relation |
| Main query | What was true at time ? | What did database contain at time ? | What did database believe at about valid time ? |
| Relation type | Time support | Key property |
|---|---|---|
| Snapshot relation | None | Current state only |
| Valid-time relation | VT only | Non-overlapping VT per key for single-valued facts |
| Transaction-time relation | TT only | Append-only; old versions retained |
| Bitemporal relation | VT and TT | Multiple TT versions for same VT possible |
| Term | Correct meaning |
|---|---|
| Timeslice query | Returns a snapshot at one time instant |
| Rollback query | Reconstructs transaction-time state at a past instant |
| Coalescing | Merges adjacent or overlapping value-equivalent intervals |
| Temporal join | Joins tuples using time-overlap or containment conditions |
| Keyword retrieval | Content-based retrieval |
|---|---|
| Depends on manual annotations | Uses automatically extracted features |
| Cheap to query but costly to annotate | Scalable but has semantic gap |
| Exact metadata match | Similarity ranking |
| Feature type | Examples |
|---|---|
| Colour | Colour histogram, colour moments |
| Texture | Gabor filters, wavelets, Tamura features |
| Shape | Moment invariants, Fourier descriptors |
| Similarity | Euclidean, Manhattan, cosine, histogram intersection |
Revision summary
- Valid time = true in reality; transaction time = stored or believed by database.
- Bitemporal = valid time plus transaction time.
- Half-open includes , excludes .
- Transaction-time relations are append-only; old rows are kept.
- Rollback relation is a transaction-time relation.
- Snapshot relation has no time support.
- Timeslice query returns a snapshot; rollback query reconstructs past database state.
- Coalescing needs same key, same value and adjacent or overlapping intervals.
- Same key and different values must not have overlapping valid intervals for single-valued facts.
- CBIR uses feature vectors, not only manual text labels.
- Euclidean smaller is better; cosine larger is better.
- Precision = retrieved relevant divided by retrieved; recall = retrieved relevant divided by all relevant.
Previous-year exam insights
- Direct concept questions ask the exact meaning of valid time, transaction time, bitemporal relation, snapshot relation and rollback relation.
Check whether the question says “true in reality” versus “stored in database”. - Statement I/II questions often mix valid-time overlap rules with transaction-time append-only behaviour.
Verify each statement separately. - Match List-I with List-II questions pair terms such as timeslice query, rollback query, coalescing and similarity query with their definitions.
- Assertion–reason questions test whether both time dimensions are needed to answer a belief query; remember that bitemporal stores both VT and TT.
- Numeric questions use half-open intervals, so always exclude the end instant and count carefully.
- Coalescing questions contain a trap: different values cannot be merged even if intervals touch.
- CBIR questions test feature types and similarity direction; Euclidean smallest and cosine largest are frequent traps.
- Multimedia indexing questions expect a multidimensional index such as R-tree over a B+-tree for feature-vector similarity search.
Practice at PARIKSHA
You are ready for the PARIKSHA tests of this sub-topic when you can:
- Define valid time, transaction time, bitemporal relation, snapshot relation and rollback relation in one line each.
- Decide whether a given fact is valid-time, transaction-time or bitemporal.
- Check whether a time instant lies inside a half-open interval and answer a timeslice query.
- Explain why transaction-time updates are append-only and trace the interval changes.
- Apply coalescing to two or more intervals and state whether merging is allowed.
- Compute the number of time instants in a half-open interval correctly.
- Answer a bitemporal belief query by checking both TT and VT conditions.
- Explain CBIR features, feature vectors and the semantic gap.
- Compute Euclidean distance or cosine similarity and state which image is more similar.
- Distinguish precision from recall and identify the correct index type for multidimensional similarity search.
Attempt the sub-topic test first, then the subject test.