2. Temporal Databases & Data Warehousing
• Temporal databases and data warehousing are two separate areas
which are strongly related:
• data warehouses are the commercial products that require
temporal database technology.
• Naturally, most other database products are amenable to temporal
database technology, too.
• Regarding the market perspectives, however, one has to assume
that it will be mainly data warehouses that adopt the techniques
that have been and that will be developed by temporal database
researchers.
3. Temporal Data Warehouse
• A temporal data warehouse is a repository of historical
information, originating from multiple, autonomous, (sometimes)
heterogeneous and non-temporal sources.
• It is available for queries and analysis (such as data mining) not
only to users interested in current information but also to those
interested in researching past information to identify relevant
trends.
• A collection of integrated, subject-oriented databases designed to
support the DSS function, where each unit of data is relevant to
some moment in time. The data warehouse contains atomic data
and lightly summarized data.
4. Applications of Temporal Data Warehouse
• Temporal data has important applications in many domains
(Jensen 1999; Jestes 2012).
• Most of those domains applications can benefit from a temporal
data warehouse (Thomas and Datta 2001; and Yang and Widom
1998) such as banking, retail sales, financial services, medical
records, inventory management, telecommunications, and
reservation systems.
• In the case of a bank account, an account holder’s balance will
change after each transaction.
• The amount or descriptions of a financial document will change
for business purposes.
• Such data is often valuable to different stakeholders and should
be stored in both current state and all previously current states.
5. Temporal Databases
• A temporal database is a database with built-in support for
handling data involving time, being related to Slowly changing
dimension concept, for example a temporal data model and a
temporal version of Structured Query Language (SQL).
• More specifically the temporal aspects usually include valid time
and transaction time. These attributes can be combined to form
bitemporal data.
6. Definitions and Meanings
Valid Time is the time period during which a fact is true with respect to
the real world.
Transaction time is the time period during which a fact stored in the
database is considered to be true.
Bitemporal Data combines both Valid and Transaction Time.
• It is possible to have timelines other than Valid Time and Transaction
Time, such as Decision Time, in the database. In that case the database
is called a multitemporal database as opposed to a bitemporal database.
• However, this approach introduces additional complexities such as
dealing with the validity of (foreign) keys.
• Temporal databases are in contrast to current databases, which store
only facts which are believed to be true at the current time.
7. Synchronization and relationships
• Temporal relations define temporal dependencies between the objects.
• For e.g, the temporal relations are the relation between a video and audio
object that are recorded during a concert. if these objects are presented,
the temporal relation during the presentations of the two media objects
must correspond to the temporal relation at the recording moment. These
time relations one must understand as synchronization in systems.
• Synchronization relationships specify how two temporal extents relate to
each other.
• They are essential in temporal applications, since they allow one to
determine, whether two events occur simultaneously or whether one
precedes the other.
8. Synchronization and Relationships
• The synchronization relationships for the temporal data correspond to the
topological relationships for the spatial data. They are defined in a similar
way, on the basis of the concepts of:
1. Boundary: The boundary is defined for the different temporal data types as
follows. An instant has many empty boundaries. The boundary of an interval
consists of its start and end instants. For e.g, The boundary of
CompileTime Value is defined by union of boundaries of its components that
do not intersect with other components.
2. Interior: The interior of temporal Value is composed of all its instants that
do not belong to the boundary.
3. Exterior: The exterior of a temporal value is composed of all the instants of
the underlying time frame that do not belong to the temporal value.
9. Icons for Synchronization Relationships
• The commonly used synchronization relationships are shown in the table:
1. Meets: Two temporal values meet if they intersect in an instant but their
interior do not. Note that two temporal values may intersect in an instant but
do not meet.
2. Overlaps: Two temporal values if their interiors intersect and their intersection
is not equal to either of them.
3. Contains/Inside: These are the symmetric predicates- a contains b if and only if
b inside a. A temporal value contains another one if the interior of the former
contains all instants of the second.
4. Covers/Converted By: These are the symmetric predicates –a covers b if and
only if b covered By a. A temporal value covers another one if the former
includes all instants of the latter.
10. Icons for Synchronization Relationships
• Disjoint/Intersects: These are inverse temporal predicates –when one applies, the
other does not. Two temporal values are disjoint if they do not share any instant.
• Equals: Two temporal values are equal if every instant of the first value belongs
also to the second and conversely.
• Starts/Finishes: A temporal value starts another if the first instants of the two
values are equal. Similarly, a temporal value finishes another if the last instants of
the two values are equal.
• Precedes/Succeeds: A temporal value precedes another if the last instant of the
former is before the first instant of the second. Similarly, a temporal value
succeeds another if the first instant of the former is later than the instant of the
second.
12. Temporality Data Types
• Use temporal data types to store date, time, and time-interval
information. Although you can store this data in character strings,
it is better to use temporal types for consistency and validation.
• Temporality Data Types.docx
14. Temporality Types
Two different temporality types are usually considered:
Valid Time (VT),Transaction time (TT) that allow representing, respectively, when the data is true in the modeled
reality and when it is current in the database. If both temporality types are used, they define bitemporal time
(BT). In addition, the LifeSpan (LS) is used to record changes in time for an object as a whole.
These temporality types are used for representing either events, i.e., something that happens at a particular time
point, or states, i.e., something that has extent over time. For the former an instant is used, i.e., a timepoint on
an underlying time axis; the specific value of an instant is called timestamp. An instant may have assigned a
particular value now indicating current time. An instant is defined according to a non-decomposable time unit
called granule, and its size is called granularity. States are represented by an interval or period.
15. Temporal Support for Levels
• Changes in a level can occur either for a member as a whole(for example,
inserting or deleting a product in the catalog of company) or for attribute values(
for example, changing the size of a product).
• Representing these changes in a temporal data warehouse is important for analysis
purposes to discover how the exclusion of some products or changes to the size of
a product influence sales.
• In a MultiDim model, a level may have temporal support independently of the fact
that it has temporal attributes.
16. Temporal Support for Levels
LS Product
Product number
Name
Description
Size
Distributor
LS Product
VT
Product number
Name
Description
Size
Distributor
Product
VT
Product number
Name
Description
Size
Distributor
(a) Temporal Level (b) Temporal Level
with Temporal
attributes
(c) Non Temporal
level with temporal
attributes
17. Temporal Support Levels
• There are two types of temporality Support:
1) Lifespan Support is the used to keep changes of the levels members ; this is
represented by putting the LS symbol next to the level’s name. Lifespan can be
combined with the transaction time and loading times which indicate,
respectively, when the level member is current in a source system and in a
temporal data warehouse.
2) Temporal Support to attributes allows keeping changes in their values and time
when they have occurred. This is represented by including the symbol of
corresponding temporality type next to the attribute name in Figure a.
Figure b shows an example of a product level that includes temporal attributes size
and distributor.
18. Temporal Hierarchies
Hierarchies in MultiDim model contain several related levels. For two related levels in hierarchy, the levels, the
relationship between them or both may have temporal support.