Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Valid time
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{More citations needed|date=November 2008}} In [[temporal database]]s, '''valid-time''' is the time period when an event happened or something was true in the real world, or more formally when a [[Fact (data warehouse)|fact]] was valid in the [[data modeling|modeled]] reality. The valid-time period is an interval based on event times, which are referred to as '''event [[Timestamp|datetime]]''' in [[data vault modeling|data vault]].<ref name=":0"/><ref>{{cite web |access-date=2024-02-10 |title=The Events API basics {{!}} Akeneo APIs |url=https://api.akeneo.com/events-documentation/subscription.html |work=api.akeneo.com}}<!-- auto-translated from Danish by Module:CS1 translator --></ref> Other names are '''application-time period'''<ref name=":0">{{cite web |title=A not-so-gentle follow-up on bitemporal data challenges - Roelant Vos |url=https://roelantvos.com/blog/a-not-so-gentle-follow-up-on-bitemporal-data-challenges/}}<!-- auto-translated from Danish by Module:CS1 translator --></ref> or '''real-world timeline'''.<ref name=":0" /> [[SQL:2011]] supports valid time through so-called '''application time-period tables'''.<ref>{{cite web |access-date=2024-06-18 |title=Illuminated Computing {{!}} Survey of SQL:2011 Temporal Features |url=https://illuminatedcomputing.com/posts/2019/08/sql2011-survey/ |work=illuminatedcomputing.com}}<!-- auto-translated from Danish by Module:CS1 translator --></ref><ref>{{cite web |access-date=2024-06-18 |language=en-us |title=Application-period temporal tables |url=https://www.ibm.com/docs/en/ias?topic=tables-application-period-temporal |work=www.ibm.com}}<!-- auto-translated from Danish by Module:CS1 translator --></ref><ref>{{cite web |access-date=2024-06-18 |title=Application-Time Periods |url=https://mariadb.com/kb/en/application-time-periods/ |work=MariaDB KnowledgeBase}}<!-- auto-translated from Danish by Module:CS1 translator --></ref><ref>{{cite web |access-date=2024-06-18 |title=SAP Help Portal |url=https://help.sap.com/docs/SAP_HANA_PLATFORM/3823b0f33420468ba5f1cf7f59bd6bd9/73c7b80318ba4405a8769e6ceb41ec64.html?version=2.0.05 |work=help.sap.com}}<!-- auto-translated from Danish by Module:CS1 translator --></ref> In a database table, valid-time is often represented by two extra table-columns, such as <code>start_validtime</code> and <code>end_validtime</code>. The time interval is [[Closed set|closed]] at its [[lower bound]] (denoted by <code>[</code>) and [[Open set|open]] at its [[upper bound]] (denoted by <code>)</code>). In integration layers (for example a [[data warehouse]]), the valid time is controlled by the [[System of record|source system]] which delivers data to the data warehouse.<ref name=":1">{{cite web |title=A gentle introduction to bitemporal data challenges - Roelant Vos |url=https://roelantvos.com/blog/a-gentle-introduction-to-bitemporal-data-challenges/}}<!-- auto-translated from Danish by Module:CS1 translator --></ref> For many reasons, the valid timeline is different from the [[transaction time|transaction timeline]] (which is when data arrives in the warehouse), and it is important that the data warehouse is capable of unambiguously reporting what actually happened in the past by combining these two timelines.<ref name=":1" /> In [[Bitemporal modeling|bitemporal]] data models, valid time and transaction time can be represented two-dimensionally in a [[Cartesian coordinate system]]. When data are delivered from the integration layer and is to be represented in a presentation layer (often in a [[Dimensional modeling|dimensional model]] or [[Wide and narrow data|wide table]]) it is often desirable to have the data on only one timeline. == History == The term ''valid time'' was coined by [[Richard T. Snodgrass]] and his doctoral student Ilsoo Ahn (1986).<ref>Richard T. Snodgrass and Ilsoo Ahn, "Temporal Databases," IEEE Computer 19(9), September, 1986, pp. 35-42.</ref> As of December 2011, ISO/IEC 9075, Database Language [[SQL:2011]] Part 2: SQL/Foundation included clauses in table definitions to define "application-time period tables" (that is, valid-time tables). == Example == {{Fix|text=Needs an additional row: "John's death registered".}} {| class="wikitable" |- ! Date !! What happened in the real world !! Database action !! What the database shows |- | {{nowrap|1975-04-03}} || John is born || Nothing|| There is no person called John Doe |- | {{nowrap|1975-04-04}} || John's father officially reports John's birth || Inserted:Person(John Doe, Smallville) || John Doe lives in Smallville |- | {{nowrap|1994-08-26}} || After graduation, John moves to Bigtown, but forgets to register his new address || Nothing || John Doe lives in Smallville |- | {{nowrap|1994-12-26}} || Nothing || Nothing || John Doe lives in Smallville |- | {{nowrap|1994-12-27}} || John registers his new address || Updated:Person(John Doe, Bigtown) || John Doe lives in Bigtown |- | {{nowrap|2001-04-01}} || John dies || Deleted:Person(John Doe) || There is no person called John Doe |} Valid time is the time for which a fact is true in the real world. In the example above, the Person table gets two extra fields, <code>valid_from</code> and <code>valid_to</code>, specifying when a person's address was valid in the real world. On 1975-04-04, John's father proudly registered his son's birth. An official will then insert a new entry to the database stating that John lives in Smallville from April, 3rd. Notice that although the data was inserted on the 4th, the database states that the information is valid since the 3rd. The official does not yet know if or when John will ever move to another place so in the database the <code>valid_to</code> is filled with infinity (β) or a very late date (like for example 2300-01-01). Resulting in this entry in the database: {| class="wikitable" |- |Person(John Doe, Smallville, {{nowrap|1975-04-03}}, β) |} On 1994-12-27 John reports his new address in Bigtown where he has been living since 1994-08-26. The Bigtown official does not change the address of the current entry of John Doe in the database. He adds a new one: {| class="wikitable" |- |Person (John Doe, Big Town, {{nowrap|1994-08-26}}, β) |} The original entry Person (John Doe, Smallville, 1975-04-03, β) is then updated (not removed!). Since it is now known that John stopped living in Smallville on 1994-08-26, the <code>valid_to</code> entry can be filled in. The database now contains two entries for John Doe {| class="wikitable" |- |Person(John Doe, Smallville, {{nowrap|1975-04-03}}, {{nowrap|1994-08-26}}) |} {| class="wikitable" |- |Person(John Doe, Bigtown, {{nowrap|1994-08-26}}, β) |} When John dies the database is once more updated. The current entry will be updated stating the date of death as the last <code>valid_to</code> for Bigtown, as John does not live in Bigtown any longer. No new entry is being added. The database now looks like this: {| class="wikitable" |- |Person(John Doe, Smallville, {{nowrap|1975-04-03-, {{nowrap|1994-08-26}}) |} {| class="wikitable" |- |Person(John Doe, Bigtown, {{nowrap|1994-08-26}}, {{nowrap|2001-04-01}}) |} ==See also== * [[Transaction time]], when data was loaded into a database * [[Decision time]], when a decision was made about interpretation of history in a database * [[Slowly changing dimension]] ==References== {{Reflist}} {{Database models}} {{DEFAULTSORT:Valid Time}} [[Category:Database management systems]] {{Compu-prog-stub}}
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:Cite web
(
edit
)
Template:Compu-prog-stub
(
edit
)
Template:Database models
(
edit
)
Template:Fix
(
edit
)
Template:More citations needed
(
edit
)
Template:Nowrap
(
edit
)
Template:Reflist
(
edit
)