Why do we need temporal database? Discuss valid time, transaction time and bi-temporal relations.
Need for a Temporal DBMS
- It is difficult to identify applications not needing management of temporal data
- These applications would benefit from built-in temporal support in the DBMS
• Potential increase in performance
- Temporal DBMS: Provide mechanisms to store and manipulate time-varying information.
OR,
We need a temporal database because:-
- A temporal database stores data relating to time instances. It offers temporal data types and stores information relating to past, present, and future times.
- A Temporal Database is a database with built-in support for handling time-sensitive data. Usually, databases store information only about the current state, and not about past states. For example in an employee database, if the address or salary of a particular person changes, the database gets updated, and the old value is no longer there.
- However, for many applications, it is important to maintain the past or historical values and the time at which the data was updated. That is, the knowledge of evolution is required. That is where temporal databases are useful. It stores information about the past, present, and future. Any data that is time-dependent is called temporal data and these are stored in temporal databases.
- Temporal Databases store information about states of the real world across time. Temporal Database is a database with built-in support for handling data involving time. It stores information relating to past, present, and future times of all events.
2nd part
Valid time
Valid time is a time period during which a fact is true in the real world. Given a particular event or fact that is associated with a particular time point or time period in the database, the association may be interpreted to mean different things. The most natural interpretation is that the associated time is the time that the event occurred or the period during which the fact was considered to be true in the real world. If this interpretation is used, the associated time is often referred to as the valid time. A temporal database using this interpretation is called a valid time database.
For example, in a company, the Salary of the employees has a valid time and end time
Transaction time
Transaction time is the time period during which a fact stored in the database was known.
However, a different interpretation can be used, where the associated time refers to the time when the information was actually stored in the database; that is, it is the value of the system time clock when the information is valid in the system. In this case, the associated time is called the transaction time. A temporal database using this interpretation is called a transaction time database. Unlike valid time here we can roll back the database. For example, in a company, the Salary of the employees has a valid time and end time.
Bitemporal data
It combines both valid ad transaction times. It stores data with respect to both valid time and transaction time. In some applications, only one of the dimensions is needed and in other cases, both time dimensions are required, in which case the temporal database is called a bitemporal database.
Comments
Post a Comment