Dbms Presentation
Dbms Presentation
Temporal Database
Temporal database stores data relating to time instances. It offers temporal data types and stores information relating to past, present and future time.
Requests RDBMS
Results
The relational data model as proposed by Codd [Cod70] does not address the temporal dimension of data.
Identification of an appropriate data type for time. Provide query algebra to deal with temporal data. Compatiable with old database without temporal data.
It's easy to deal with temporal data Record the data changed with time is more convenient Having relation model to describe temporal data Having query algebra to deal with temporal data
It works that to handle static data (without time dimension) in temporal database. The tranditional database algebra still work in temporal database. The new query algebra to control time dimemsion is similar to tranditional database algebra.
Add Valid Time ( Valid Time or Historical DB) Add Transaction Time ( Transaction Time or RollBack DB) Add Both of above ( Bitemporal DB)
Financial Applications e.g. history of stock markets; share prices. Reservation Systems e.g. when was a flight booked. Medical Systems e.g. patient records. Computer Applications e.g. history of file back ups.
Temporal Dimension
A temporal database is a database system that provides special support for handling data with a temporal component, namely time. The important issue that needs to be addressed for creating a temporal database is the representation or modelling of time.
Time Views
Views of time can be considered to be either
1) Continuous Time.(Very Problematic to represent) 2) Discrete Time.( Implemented in terms of 'Chronon')
Valid Time
The valid time of a database object is the time when the object is effective or holds (is true) in reality . The time when the event occurred, took place in reality.
Example:- in a football competition, when did the clubs win the competition i.e. the times when Arsenal won the F.A Cup competition.
Transaction Time
The transaction time of an object is the time when the object is stored in the database, the time that it is present in the database.
Example:- In a company situation, an employee receives a pay rise but it comes into effect when the payroll clerk enters this salary rise into the database.
Sample Table
Consider the following table Person
Date
April 3, 1975 April 4, 1975 August 26, 1994 What Happened in the Real World John is born
John's father officially reports John's birth After graduation, John moves to Bigtown, but forgets to register his new address
What the database shows There is no person called John Doe John Doe lives in Smallville John Doe lives in Smallville John Doe lives in Smallville John Doe lives in Bigtown There is no person called John Doe
Nothing
Nothing
Updated:Person(John Doe, Bigtown) Deleted:Person(John Doe)
Transaction time is the time a transaction was made. Enables queries that show the state of the database at a given time. Transaction-From and Transaction-To fields will be added to the Person table. Transaction-From is the time a transaction was made. Transaction-To is the time that the transaction was superseded (or infinity if it has not yet been superseded).
Answer:
Upon discovery of the fact, the officials go back and update the database
Person(John Doe, Smallville, 3-Apr-1975, , Person(John Doe, Bigtown, 26-Aug-1994, , Person(John Doe, Beachy, 1-Jun-1995,
Person(John Doe, Smallville, 3-Apr-1975, 26-Aug-1994, 27-Dec-1994, Person(John Doe, Bigtown, 26-Aug-1994, 1-Jun-1995, 2-Feb-2001, 3-Sep-2000, 2-Feb-2001, Person(John Doe, Bigtown, 3-Sep-2000, ,
2-Feb-2001, 1-Apr-2001 ).