Think about your diary on the appointment / journal - it will run from January 1 to December 31. Now we can request a diary for meetings / journal entries any day. This ordering is called valid time . However, appointments / notes are usually not inserted in order.
Suppose I would like to know what meetings / entries were in my diary on April 4th. That is, all the entries that were recorded in my diary on April 4. This is the transaction time .
Given that appointments / notes can be created and deleted, etc. A typical entry has a start and end valid time that covers the recording period and the start and end time of the transaction, which indicates the period during which the entry appeared in the diary.
This scheme is necessary if the diary may undergo a historical revision . Suppose that on April 5th I understand that the appointment that I had on February 14th really happened on February 12th, i.e. I found an error in my diary - I can correct the error to correct the correct temporary image, but now my request for what was in the diary on April 4 would be incorrect IF the transaction time for appointments / records is also saved. In this case, if I request my diary as of April 4, he will show the appointment that existed on February 14, but if I ask as of April 6, he will schedule an appointment on February 12.
This temporary function of the temporary database allows you to record information about how errors are fixed in the database. This is necessary for reliable verification of the data that is recorded when changes are made, and allows you to request queries regarding how the data was reviewed time.
Most of the business information should be stored in this bitporal scheme in order to provide a reliable audit record and maximize business intelligence - hence the need for support in a relational database. Note that each data element occupies a (possibly unlimited) square in a two-dimensional time model, so people often use the GIST index to implement bit-time-indexing. The problem here is that the GIST index is really for geographic data, and the requirements for temporary data are slightly different.
PostgreSQL 9.0 exception restrictions should provide new ways to organize temporary data, for example. transaction and actual time. PERIODS must not overlap for the same tuple.
Jon Guiton Jul 10 '10 at 10:57 2010-07-10 10:57
source share