top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration

How can I enable temporal database capability in MySql Database?

+2 votes
68 views

Is there any library or a plug-in to enable the temporal upward compatibility? I want to keep the past records whenever a current record changes.

posted May 15, 2014 by Kapil Kapoor

Share this question
Facebook Share Button Twitter Share Button Google+ Share Button LinkedIn Share Button Multiple Social Share Button

1 Answer

0 votes

A temporal database is a database with built-in time aspects, for example a temporal data model and a temporal version of Structured Query Language.

More specifically the temporal aspects usually include valid-time and transaction-time. These attributes go together to form bitemporal data.

  1. Valid time denotes the time period during which a fact is true with respect to the real world.

  2. Transaction time is the time period during which a fact is stored in the database.

  3. Bi-temporal data combines both Valid and Transaction Time.

UPDATE

Firstly i am removing that part which i have added previously as MySQL5.1 and its above versions of MySQL does not support BDB.have a look at This Link.But in My Opinion what the BDB was doing the InnoDB is capable of Doing all. *As BDB is not supported anymore By MySQL.But the InnoDB is able to do all which the BDB was doing.*

For More Information About temporal database have a look at This.

With MySQL, The unavailability of CHECK CONSTRAINT,DEFERRED CONSTRAINT, and some limits on triggers, make it harder to build temporal relational database architecture in MySQL.

CHECK CONSTRAINT

A CHECK CONSTRAINT is often of the form CHECK( [NOT] EXISTS( select_expression ))

MySQL implements foreign key constraints in INNODB tables, but does not yet implement CHECK CONSTRAINT. Until it does, such constraints must be enforced by other means. That has onerous consequences for time-valid tables. Some time-valid constraints can be enforced in triggers, but most of the temporal constraints we will consider cannot. Until MySQL implements CHECK CONSTRAINT, they must be enforced in application code. That is a heavy penalty.

Deferred constraints

MySQL does not yet implement deferred constraints, either. Furthermore, constraints are applied row-wise rather than at COMMIT time. This raises a problem for many complex constraints, even for some simple ones. For example to delete a MySQL row which refers to itself via a foreign key, you must temporarily SET foreign_key_checks = 0. A transaction fulfilling a complex constraint must leave the database in a consistent state.But there is nothing in relational database theory to suggest that a database should be in a consistent state after each statement within a transaction.

Triggers

MySQL 5 triggers cannot issue UPDATE statements on the trigger table, and cannot raise errors. These limitations create difficulties for implementing transaction validity in MySQL, but the difficulties can be overcome.

answer May 16, 2014 by Sandeep Otari
Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...