You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Similar to the existing flashback query clause (#1079), there is now also support for temporal validity in regular data, without Oracle's flashback feature:
An example taken from the documentation
CREATETABLEmy_emp(
empno NUMBER,
last_name VARCHAR2(30),
start_time TIMESTAMP,
end_time TIMESTAMP,
PERIOD FOR user_valid_time (start_time, end_time));
INSERT INTO my_emp VALUES (100, 'Ames', '01-Jan-10', '30-Jun-11');
INSERT INTO my_emp VALUES (101, 'Burton', '01-Jan-11', '30-Jun-11');
INSERT INTO my_emp VALUES (102, 'Chen', '01-Jan-12', null);
-- Returns only Ames.SELECT*from my_emp
AS OF PERIOD FOR user_valid_time TO_TIMESTAMP('01-Jun-10');
-- Returns Ames and Burton, but not Chen.SELECT*from my_emp
AS OF PERIOD FOR user_valid_time TO_TIMESTAMP('01-Jun-11');
-- VERSIONS PERIOD FOR ... BETWEEN queries:-- Returns only Ames.SELECT*from my_emp
VERSIONS PERIOD FOR user_valid_time
BETWEEN TO_TIMESTAMP('01-Jun-10') AND TO_TIMESTAMP('02-Jun-10');
This presentation called "Towards a temporal PostgeSQL" gives an overview of temporal implementations of other DB vendors at slides 8-13 and afterwards the proposed solution in PostgreSQL http://www.slideshare.net/SFScon/slides-28283464
Thanks a lot @delostilos, those are very interesting articles / presentations! We'll have to be reviewing the SQL:2011 standards as well, as the <period predicate> has been introduced:
<table period definition> ::=
<system or application time period specification>
<left paren> <period begin column name> <comma> <period end column name> <right paren>
<system or application time period specification> ::=
<system time period specification>
| <application time period specification>
<system time period specification> ::=
PERIOD FOR SYSTEM_TIME
<application time period specification> ::=
PERIOD FOR <application time period name>
Similar to the existing flashback query clause (#1079), there is now also support for temporal validity in regular data, without Oracle's flashback feature:
An example taken from the documentation
See the documentation here:
http://docs.oracle.com/cd/E16655_01/appdev.121/e17620/adfns_design.htm#CACHEBFC
The text was updated successfully, but these errors were encountered: