SlideShare a Scribd company logo
Adding
Bi-Temporal
Functionality
to RDBMS
©2008-2015 2
References
●Dr. Richard Snodgrass
● Developing Time-Oriented Database
Applications
● Temporal Data Types
● Kinds of Time: Instant, Interval, Period
● Temporal Statements
● Current, Sequenced, Non-sequenced
● Non-temporal
● Temporal: Past, Current, Future
●Tom Johnston
● Time and Again series
©2008-2015 3
Terminology
●Temporal: fancy-schmancy word
for “time”
● “We’re approaching the temporal anomaly,
Captain!”
●Versioning: tracking changes
● Hoarding data, don't throw anything away
● Mono-temporality (valid/effective). When the
fact or state change took effect.
● Example: source control systems (csv, svn,
etc.)
©2008-2015 4
Terminology
●Bi-Temporal
● Effective time: when did/will it happen?
● Transaction time: when did we record it?
●Version/Temporal Normal Form
(vnf/tnf)
● Really... a new normalization pattern?
● Not really. Special case of 2nf.
● Differences and similarities
©2008-2015 5
Terminology
●Temporally Insensitive Data
● Never changes
● Changes are ignored
●Temporally Sensitive Data
● Changes are tracked
● Changes are scheduled
●Temporal Key
● Composite key with at least one date field
● Version key contains effective date.
● Bi-temporal key is version key with addition
of transaction date field.
} static
} versioned
©2008-2015 6
Why Versioning?
●All changes to TS data are tracked
●“Look back” queries
● Valid/Effective time
● Transaction time
●Database “undo” even after commit
●Changes may be “pre-inserted” or
“pre-updated” to automatically
become current when the time
arrives.
©2008-2015 7
Why Versioning?
● No extraordinary means (such as separate
“history” tables).
● Normal referential constraints.
● All queries follow a consistent pattern.
● Extend CVS/SVN to database.
● All this in a transactional database without
maintaining separate snapshot, history
or audit tables, and with only minor
impact on performance.
©2008-2015 8
Characteristics of Versioning
● Logical / physical differences.
● The row is the entity
● The row is one version of the entity.
● Versions cannot overlap. There cannot be two
different “truths” in effect at the same time.
● There cannot be gaps between versions. The
entity does not simply disappear at some
point then reappear later in a different state.
● One and only one relative current version.
Current to the reference or “as of” time.
©2008-2015 9
Versioning State of the Art
● From Wikipedia: Slowly Changing Dimension
(SCD).
● Data Warehouse patterns
● Type 1: Do nothing
● Type 6: One version almost workable
● Two tables: current versions and past versions.
● Two dates: start and end. (Row spanning
dependency)
● Lot of data changing for “undo.”
● Referential integrity: FK to “current” table.
©2008-2015 10
Minimum Requirements
● One and only one date / time value which
signifies when the version took effect
(no row spanning dependencies).
● NO separate field used to indicate the
current version!
● New version involves one record (version
independence).
● Foreign key references same as always.
● Versioning pattern: consistent and
universal.
©2008-2015 11
1. There cannot be more than one version of the
truth at any given time. In its simplest form,
this means that any query that returns more
than one version of the same entity for the
same time is erroneous.
2. We can’t change the past. This means simply
that physical updates to versioned data should
be prohibited.
i. This does not apply to versions set to
become effective in the future. Plans
change all the time!
Versioning Rules
©2008-2015 12
Temporal Normal Form (tnf)
➲ How it is implemented
©2008-2015 13
Building up to VNF
EmpNo (pk) FName LName HireDate PayRate Other Info
1001 Sally Jones 1998-10-10 15.35 …
1002 Sam Spade 1998-11-11 10.56 …
1004 Katherine Great 1998-12-12 9.00 …
Figure1: Original Non-versioned Data
©2008-2015 14
Building up to VNF
EmpNo (pk) FName LName HireDate PayRate Other Info
1001 Sally Jones 1998-10-10 15.35 …
1002 Sam Spade 1998-11-11 10.56 …
1004 Katherine Great 1998-12-12 9.00 …
Figure1: Original Non-versioned Data
EmpNo (pk) FName LName HireDate PayRate Other Info
1001 Sally Smith 1998-10-10 15.35 …
1002 Sam Spade 1998-11-11 10.56 …
1004 Katherine Great 1998-12-12 9.00 …
Figure 2: “Jones” becomes “Smith” ― option 1
©2008-2015 15
Building up to VNF
EmpNo (pk) FName LName HireDate PayRate Other Info
1001 Sally Jones 1998-10-10 15.35 …
1002 Sam Spade 1998-11-11 10.56 …
1004 Katherine Great 1998-12-12 9.00 …
Figure1: Original Non-versioned Data
EmpNo (pk) FName LName HireDate PayRate Other Info
1001 Sally Jones 1998-10-10 15.35 …
1002 Sam Spade 1998-11-11 10.56 …
1004 Katherine Great 1998-12-12 9.00 …
1005 Sally Smith 1998-10-10 15.35 …
Figure 3: “Jones” becomes “Smith” ― option 2
©2008-2015 16
Building up to VNF
EmpNo (pk) FName LName HireDate PayRate Other Info
1001 Sally Jones 1998-10-10 15.35 …
1002 Sam Spade 1998-11-11 10.56 …
1004 Katherine Great 1998-12-12 9.00 …
Figure1: Original Non-versioned Data
EmpNo (pk) Effective(pk) FName LName HireDate PayRate Other Info
1001 2010-06-19 Sally Jones 1998-10-10 15.35 …
1002 2007-01-01 Sam Spade 1998-11-11 10.56 …
1004 2008-02-26 Katherine Great 1998-12-12 9.00 …
1001 2012-01-01 Sally Smith 1998-10-10 15.35 …
Figure 4: Simple Versioned Data
©2008-2015 17
Temporal Normal Forms
● A table is in Temporal Normal Form when
it is in at least second normal form and
the primary key is a Temporal key.
● Version Normal Form (VNF): primary key
is a version key.
● Temporal Normal Form (TNF): primary
key is a bi-temporal key.
TNF can be used as a generic term, short for “VNF or
TNF.” VNF always is effective time only.
©2008-2015 18
Version Normal Form
EmpNo (pk) Created Deleted FName HireDate Other Info
1001 2008-10-01 9999-12-31 Sally 2008-10-10 …
1002 2008-11-01 9999-12-31 Sam 2008-11-11 …
1004 2008-12-01 9999-12-31 Katherine 2008-12-12 …
Employees Entity Table – after VNF
EmpNo (pk) Effective(pk) Created LName PayRate Other Info
1001 2008-10-10 2008-10-01 Jones 15.35 …
1002 2008-11-11 2008-11-01 Spade 10.56 …
1004 2008-12-12 2008-12-01 Great 9.00 …
Temporally Normalized (Versioned) Employee Data
EmpNo (pk) Effective(pk) Created LName PayRate Other Info
1001 2008-10-10 2008-10-01 Jones 15.35 …
1002 2008-11-11 2008-11-01 Spade 10.56 …
1004 2008-12-12 2008-12-01 Great 9.00 …
1001 2012-01-01 2012-02-01 Smith 15.35 …
©2008-2015 19
Version DML
declare @EmpNo int;
-- insert static record
insert into Employees( Created, Deleted, HireDate, FName, ... )
values( SysDate(), '9999-12-31', '2008-10-01', 'Sally', ... );
set @EmpNo = @@Identity;
-- insert first version
insert into EmployeeVersions( EmpNo, Effective, Created, LName, ... )
values( @EmpNo, '2008-10-01', SysDate(), 'Jones', ... );
Creating an entity (insert):
Modifying entity data (update):
-- insert new version
insert into EmployeeVersions( EmpNo, Effective, LName, ... )
values( 1001, '2012-01-01', 'Smith', ... );
©2008-2015 20
Version Normal Form
EmpNo (pk) Created Deleted FName HireDate Other Info
1001 2008-10-01 9999-12-31 Sally 2008-10-10 …
1002 2008-11-01 9999-12-31 Sam 2008-11-11 …
1004 2008-12-01 9999-12-31 Katherine 2008-12-12 …
Employees Entity Table – after VNF
Temporally Normalized (Versioned) Employee Data
EmpNo (pk) Effective(pk) Created LName PayRate Other Info
1001 2008-10-10 2008-10-01 Jones 15.35 …
1002 2008-11-11 2008-11-01 Spade 10.56 …
1004 2008-12-12 2008-12-01 Great 9.00 …
1001 2012-01-01 2012-02-01 Smith 15.35 …
©2008-2015 21
Version Query
EmpNo Effective FName LName PayRate HireDate Other Info
1001 2010-06-19 Sally Jones 15.35 2008-10-10 …
1002 2011-01-01 Sam Spade 10.56 2008-11-11 …
1004 2011-02-26 Katherine Great 9.00 2008-12-12 …
1001 2012-01-01 Sally Smith 15.35 2008-10-10 …
Figure 5: Simple Join Query – All Rows
Select e.EmpNo, ev.Effective, ev.FName,
ev.Lname, e.HireDate, ev.PayRate, ...
from Employees e
join EmployeeVersions ev
on e.EmpNo = ev.EmpNo
where e.Deleted > GetDate()
and ev.Effective = (
select Max( Effective )
from EmployeeVersions ev1
where ev1.EmpNo = e.EmpNo
and ev1.Effective < GetDate() );
©2008-2015 22
EmpNo(pk) Effective(pk) Created LName PayRate Other Info
1001 2008-10-10 2008-10-01 Jones 15.35 …
1002 2008-11-11 2008-11-01 Spade 10.56 …
1004 2008-12-12 2008-12-01 Great 9.00 …
1001 2012-01-01 2012-02-01 Smith 15.35 …
EmpNo(pk) Effective(pk) Created(pk) LName PayRate Other Info
1001 2008-10-10 2008-10-01 Jones 15.35 …
1002 2008-11-11 2008-11-01 Spade 10.56 …
1004 2008-12-12 2008-12-01 Great 9.00 …
1001 2012-01-01 2012-02-01 Smith 15.35 …
(Bi-)Temporal Normal Form
EmpNo(pk) Created Deleted FName HireDate Other Info
1001 2008-10-01 9999-12-31 Sally 2008-10-10 …
1002 2008-11-01 9999-12-31 Sam 2008-11-11 …
1004 2008-12-01 9999-12-31 Katherine 2008-12-12 …
Employees Entity Table – after VNF
Bi-Temporally Normalized Employee Data
EmpNo(pk) Effective(pk) Created(pk) LName PayRate Other Info
1001 2008-10-10 2008-10-01 Jones 15.35 …
1002 2008-11-11 2008-11-01 Spade 10.56 …
1004 2008-12-12 2008-12-01 Great 9.00 …
1001 2012-01-01 2012-02-01 Smith 15.35 …
1001 2012-01-01 2012-11-17 Smythe 15.35 …
©2008-2015 23
Bi-Temporal Query
EmpNo Effective Created FName LName PayRate HireDate Other Info
1002 2011-01-01 2008-11-01 Sam Spade 10.56 2008-11-11 …
1004 2011-02-26 2008-12-01 Katherine Great 9.00 2008-12-12 …
1001 2012-01-01 2012-11-17 Sally Smythe 15.35 2008-10-10 …
Figure 6: Bi-Temporal Join Query
Select e.EmpNo, ev.Effective, ev.Created, ev.FName,
ev.Lname, e.HireDate, ev.PayRate, ...
from Employees e
join EmployeeVersions ev
on e.EmpNo = ev.EmpNo
where e.Deleted > GetDate()
and ev.Effective = (
select Max( Effective )
from EmployeeVersions ev1
where ev1.EmpNo = e.EmpNo
and ev1.Effective < GetDate() )
and ev.Created = (
select Max( Created )
from EmployeeVersions ev2
where ev2.EmpNo = e.EmpNo
and ev2.Effective = ev.Effective
and ev2.Created < GetDate() );
©2008-2015 24
Versioned One-to-many
©2008-2015 25
Versioned One-to-many
OrderID CustID Shipped Created Deleted
12 123 2012-01-02 2011-11-10 9999-12-31
Orders:
OrdersV:
OrderItems:
OrderItemsV:
OrderID Effective Shipped Total Terms
12 2011-11-15 2012-01-08 $1030.00 5net30
OrderID ItemNo Created Deleted
12 1 2011-11-15 9999-12-31
12 2 2011-11-15 9999-12-31
OrderID ItemNo Effective Product Qty Price
12 1 2011-11-15 1705 10 $30
12 2 2011-11-15 309 2 $500
12 2 2011-11-20 309 1 $515
©2008-2015 26
Versioned One-to-many
select *
from Orders o
join OrdersV ov on o.OrderID = ov.OrderID
where ov.OrderID = @OrderID
and o.Deleted > @AsOf
and ov.Effective = (
select Max( Effective )
from OrdersV ov1
where ov1.OrderID = o.OrderID
and ov1.Effective <= @AsOf );
select *
from OrderItems oi
join OrderItemsV oiv on oi.OrderID = oiv.OrderID and
oi.ItemNo = oiv.ItemNo
where oi.OrderID = @OrderID
and oi.Deleted > @AsOf
and oiv.Effective = (
select Max( Effective )
from OrderItemsV oiv1
where oiv1.OrderID = oi.OrderID
and oiv1.ItemNo = oi.ItemNo
and oiv1.Effective <= @AsOf );
©2008-2015 27
Versioned One-to-many
select o.OrderID, o.CustID, o.Shipped, ov.Terms,
oi.ItemNo, oi.Product, oiv.Qty, oi.Price,
oiv.Qty * oi.Price as ItemTotal
from Orders o
join OrdersV ov on o.OrderID = ov.OrderID
left join OrderItems oi on o.OrderID = oi.OrderID
join OrderItemsV oiv on oi.OrderID = oiv.OrderID and
oi.ItemNo = oiv.ItemNo
where o.OrderID = @OrderID
and ov.Effective = (
select Max( Effective )
from OrdersV ov1
where ov1.OrderID = o.OrderID and
ov1.Effective <= @AsOf )
and oiv.Effective = (
select Max( Effective )
from OrderItemsV oiv1
where oiv1.OrderID = oi.OrderID
and oiv1.ItemNo = oi.ItemNo
and oiv1.Effective <= @AsOf );
©2008-2015 28
Version Analysis
Version Slicing
Time
A
VA5VA5
VA4VA4
VA3VA3
VA2VA2
VA1VA1
B
VB5VB5
VB4VB4
VB2VB2
VB1VB1
VB3VB3
C
VC3VC3
VC1VC1
VC2VC2
Current
As of
©2008-2015 29
Version Analysis
Version History
V11
V1
V2
V3
V4
V5
V6
V7
V8
V9
V10
A
VA5VA5
VA4VA4
VA3VA3
VA2VA2
VA1VA1
B
VB5VB5
VB4VB4
VB2VB2
VB1VB1
VB3VB3
C
VC3VC3
VC1VC1
VC2VC2
Time
©2008-2015 30
Version Analysis
Effective Data
02/01/2008 VA1
02/02/2008 VA2
02/05/2008 VA3
02/07/2008 VA4
02/11/2008 VA5
Effective Data
02/01/2008 VB1
02/03/2008 VB2
02/06/2008 VB3
02/08/2008 VB4
02/10/2008 VB5
Effective Data
02/01/2008 VC1
02/04/2008 VC2
02/09/2008 VC3
Table A Table B Table C
©2008-2015 31
Version Analysis
select a.Effective as AEff, a.Data as AData,
b.Effective as BEff, b.Data as BData,
c.Effective as CEff, c.Data as CData
from A_Data a
join B_Data b on a.A_ID = b.B_ID
join C_Data c on a.A_ID = c.C_ID
where b.Effective = (
select Max( Effective )
from B_Data
where Effective <= a.Effective
)
and c.Effective = (
select Max( Effective )
from C_Data
where Effective <= a.Effective
)
union all
...
©2008-2015 32
Version Analysis
select a.Effective as AEff, a.Data as AData,
b.Effective as BEff, b.Data as BData,
c.Effective as CEff, c.Data as CData
from A_Data a
join B_Data b on a.A_ID = b.B_ID
join C_Data c on a.A_ID = c.C_ID
where a.Effective = (
select Max( Effective )
from A_Data
where Effective <= b.Effective
)
and c.Effective = (
select Max( Effective )
from C_Data
where Effective <= b.Effective
)
union all
©2008-2015 33
Version Analysis
...
select a.Effective as AEff, a.Data as AData,
b.Effective as BEff, b.Data as BData,
c.Effective as CEff, c.Data as CData
from A_Data a
join B_Data b on a.A_ID = b.B_ID
join C_Data c on a.A_ID = c.C_ID
where a.Effective = (
select Max( Effective )
from A_Data
where Effective <= c.Effective
)
and b.Effective = (
select Max( Effective )
from B_Data
where Effective <= c.Effective
);
©2008-2015 34
Version Analysis
AEff AData BEff BData CEff CData
02/01/2008 VA1 02/01/2008 VB1 02/01/2008 VC1
02/02/2008 VA2 02/01/2008 VB1 02/01/2008 VC1
02/02/2008 VA2 02/03/2008 VB2 02/01/2008 VC1
02/02/2008 VA2 02/03/2008 VB2 02/04/2008 VC2
02/05/2008 VA3 02/03/2008 VB2 02/04/2008 VC2
02/05/2008 VA3 02/06/2008 VB3 02/04/2008 VC2
02/07/2008 VA4 02/06/2008 VB3 02/04/2008 VC2
02/07/2008 VA4 02/08/2008 VB4 02/04/2008 VC2
02/07/2008 VA4 02/08/2008 VB4 02/09/2008 VC3
02/07/2008 VA4 02/10/2008 VB5 02/09/2008 VC3
02/11/2008 VA5 02/10/2008 VB5 02/09/2008 VC3
©2008-2015 35
Version Analysis
Select
case
when AEff > BEff and AEff > CEff
then AEff
when BEff > AEff and BEff > CEff
then BEff
else CEff
end as Effective,
AData, BData, CData
from (
-- previous query
) as History;
Effective AData BData CData
02/01/2008 VA1 VB1 VC1
02/02/2008 VA2 VB1 VC1
02/03/2008 VA2 VB2 VC1
02/04/2008 VA2 VB2 VC2
02/05/2008 VA3 VB2 VC2
02/06/2008 VA3 VB3 VC2
02/07/2008 VA4 VB3 VC2
02/08/2008 VA4 VB4 VC2
02/09/2008 VA4 VB4 VC3
02/10/2008 VA4 VB5 VC3
02/11/2008 VA5 VB5 VC3
History
©2008-2015 36
Version Views
create view Orders as
select os.OrderID, os.CustID, os.Shipped, ov.Total,
ov.Terms, ov.Created as DateModified
from OrdersS os
join OrdersV ov on ov.OrderID = os.OrderID
where os.Deleted > GetDate() and ov.Effective = (
select Max( ov1.Effective )
from OrdersV ov1
where ov1.OrderID = ov.OrderID and
ov1.Effective <= GetDate() )
Orders View (current)
©2008-2015 37
Version Views
create view OrderItems as
select oiv.OrderID, oiv.ItemID, oiv.Product, oiv.Qty,
oiv.Price, oiv.Effective as DateModified
from OrderItemsS ois
join OrderItemsV oiv on oiv.OrderID = ois.OrderID and
oiv.ItemNo = ois.ItemNo
where oiv.Deleted > GetDate()
and oiv.Effective = (
select Max( Effective )
from OrderItemsV oiv1
where oiv1.OrderID = oiv.OrderID
and oiv1.ItemID = oiv.ItemID
and oiv1.Effective <= GetDate() )
OrderItems View (current)
©2008-2015 38
Version Views
select o.OrderID, o.CustID, o.Shipped, o.Total, o.Terms,
oi.ItemID, oi.Product, oi.Qty, oi.Price
from Orders o
left join OrderItems oi
on o.OrderID = oi.OrderID;
Querying Current Views
©2008-2015 39
Version Views
● Insert
● Separate static from versioned
● Expose 'Effective' so it can be entered or use current
timestamp?
● Update
● Separate static from versioned
● Update static data, insert new version data as needed
● If 'Effective' exposed, ignore or use updated value?
● Delete
● Hard, firm, soft
● Hard: physical delete. Not recommended with temporal data.
● Firm: enforce “once deleted, stays deleted.”
● Soft: Delete/undelete operations are available.
View triggers
©2008-2015 40
● How it is implemented
● When it is implemented
● Data must be tracked through time
● Past data must be reconstructed
● Undo ― even after commit
● Planned changes pre-inserted
● Time-related analysis
Temporal Normal Form (tnf)
©2008-2015 41
● How it is implemented
● When it is implemented
● Check against requirements
● One and only one date/time value (no rsd)
● No separate field to flag “current”
● Version independence
● No FK tricks
● Consistent pattern
Temporal Normal Form (tnf)
©2008-2015 42
● How it is implemented
● When it is implemented
● Check against requirements
● The future
Temporal Normal Form (tnf)
©2008-2015 43
Temporal (TSQL/SQL2/SQL3)
NONSEQUENCED TRANSACTION AND VALID PERIOD
'2005-01-01 - 2006-01-01'
SELECT e1.ename, e1.street AS old_street,
e2.street AS new_street,
BEGIN(TRANSACTION(e2)) AS trans_time
FROM employee AS e1, employee AS e2
WHERE e1.eno = e2.eno AND
TRANSACTION(e1) MEETS TRANSACTION(e2)
AND e1.street <> e2.street;
Find employees who changed address during 2005.
Display both the previous and the new addresses.
©2008-2015 44
Temporal (TNF)
Select e.ename, ev1.street as old_street,
ev2.street as new_street,
ev2.Effective as move_time
From Employees e
Join EmployeeVersions ev1
on ev1.EmpNo = e.EmpNo
and ev1.Effective >= '2005-01-01'
and ev1.Effective < '2006-01-01'
Join EmployeeVersions ev2
on ev2.EmpNo = e.EmpNo
and ev2.Effective =(
Select Max( ev.Effective )
From EmployeeVersions ev
Where ev.Effective > ev1.Effective
And ev.Effecitve < '2006-01-01')
Where e.Deleted > GetDate();
©2008-2015 45
Temporal (Suggested)
Select e1.ename, e1.street as old_street,
e2.street as new_street,
e2.Effective as move_time,
e2.Transaction as trans_time
From Employees e1
Join Employees e2
On e2.EmpNo = e1.EmpNo
And e2.AsOf > e1.AsOf
Where Asof Effective between
'2005-01-01' and '2006-01-01';
Compare to the SQL2/3 query!
“AsOf” is both a keyword signifying a temporal query (in the WHERE clause)
and a pseudo-column for either the effective date field (in an effective look-
back) or the transaction date field (in a transaction look-back). “Effective” and
“Transaction” are also pseudo-columns to allow more precision and are not
dependent on the type of look-back.
©2008-2015 46
Version Normal Form
EmpNo(pk) Created Deleted FName HireDate Other Info
1001 2008-10-01 9999-12-31 Sally 2008-10-10 …
1002 2008-11-01 9999-12-31 Sam 2008-11-11 …
1004 2008-12-01 9999-12-31 Katherine 2008-12-12 …
Static Employees Table
Versioned Employees (Sub)Table
EmpNo (pk) Effective(pk) Created LName PayRate Other Info
1001 2008-10-10 2008-10-01 Jones 15.35 …
1002 2008-11-11 2008-11-01 Spade 10.56 …
1004 2008-12-12 2008-12-01 Great 9.00 …
1001 2012-01-01 2012-02-01 Smith 15.35 …
©2008-2015 47
create temporal index NAME on Employees
( LName, PayRate, ... ) -- PK field(s) not specified
Effective eff_date_field
Transaction trans_date_field;
select EmpNo, Effective, FName,
Lname, HireDate, PayRate, ...
from Employees
where ...
[asof [effective|transaction] [date|all|between d1 and d2]];
-- Defaults to "asof eff current_timestamp"
update Employees
set LName = 'Smith'
where ...
[asof [effective] [date|all|between d1 and d2]];
-- "asof trans" not allowed
insert Employees (...)
values (...)
[asof [effective] date];
-- "asof trans" not allowed
Temporal Index
©2008-2015 48
Proof of Concept
● Open Source DBMS
● Download source
● Take apart
● Reassemble with t-index
● Two/thirds complete
● Remaining to be done...
©2008-2015 49
Temporal Termination
Questions
Google Group
VRDBMS:
https://groups.google.com/forum/?hl=en&fromgroups#!forum/vrdbms
Sources
Wikipedia:
● http://en.wikipedia.org/wiki/Temporal_database
Time and Again series, Randy Weis & Tom Johnson:
● http://www.inbaseinc.com/dm-series.htm
Richard Snodgrass:
● http://www.cs.arizona.edu/people/rts/tdbbook.pdf

More Related Content

What's hot

Models for hierarchical data
Models for hierarchical dataModels for hierarchical data
Models for hierarchical data
Karwin Software Solutions LLC
 
Informatica session
Informatica sessionInformatica session
Informatica session
vinuthanallam
 
ORACLE PL SQL
ORACLE PL SQLORACLE PL SQL
ORACLE PL SQL
Srinath Maharana
 
Etl And Data Test Guidelines For Large Applications
Etl And Data Test Guidelines For Large ApplicationsEtl And Data Test Guidelines For Large Applications
Etl And Data Test Guidelines For Large Applications
Wayne Yaddow
 
Single-Row Functions in orcale Data base
Single-Row Functions in orcale Data baseSingle-Row Functions in orcale Data base
Single-Row Functions in orcale Data base
Salman Memon
 
Sql server
Sql serverSql server
Sql server
Fajar Baskoro
 
Pl sql-ch1
Pl sql-ch1Pl sql-ch1
Pl sql-ch1
Mukesh Tekwani
 
Learn Entity Framework in a day with Code First, Model First and Database First
Learn Entity Framework in a day with Code First, Model First and Database FirstLearn Entity Framework in a day with Code First, Model First and Database First
Learn Entity Framework in a day with Code First, Model First and Database First
Jibran Rasheed Khan
 
Power BI - Power Query
Power BI - Power QueryPower BI - Power Query
Power BI - Power Query
Jerric Lyns John
 
Introduction To Pentaho
Introduction To PentahoIntroduction To Pentaho
Introduction To Pentaho
DataminingTools Inc
 
HFM Extended Analytics
HFM Extended AnalyticsHFM Extended Analytics
HFM Extended Analytics
aa026593
 
SQL Complete Tutorial. All Topics Covered
SQL Complete Tutorial. All Topics CoveredSQL Complete Tutorial. All Topics Covered
SQL Complete Tutorial. All Topics Covered
Danish Mehraj
 
Qlik Sense for Beginners - www.techstuffy.com - QlikView Next Generation
Qlik Sense for Beginners - www.techstuffy.com - QlikView Next GenerationQlik Sense for Beginners - www.techstuffy.com - QlikView Next Generation
Qlik Sense for Beginners - www.techstuffy.com - QlikView Next Generation
Practical QlikView
 
Alteryx Presentation
Alteryx PresentationAlteryx Presentation
Alteryx Presentation
Mohd Abu Taurab
 
Building Lakehouses on Delta Lake with SQL Analytics Primer
Building Lakehouses on Delta Lake with SQL Analytics PrimerBuilding Lakehouses on Delta Lake with SQL Analytics Primer
Building Lakehouses on Delta Lake with SQL Analytics Primer
Databricks
 
Sql query patterns, optimized
Sql query patterns, optimizedSql query patterns, optimized
Sql query patterns, optimized
Karwin Software Solutions LLC
 
Sql database object
Sql database objectSql database object
Sql database object
Harry Potter
 
Drone Data Flowing Through Apache NiFi
Drone Data Flowing Through Apache NiFiDrone Data Flowing Through Apache NiFi
Drone Data Flowing Through Apache NiFi
Timothy Spann
 
Oracle SQL Basics
Oracle SQL BasicsOracle SQL Basics
Oracle SQL Basics
Dhananjay Goel
 
Spring Data JPA from 0-100 in 60 minutes
Spring Data JPA from 0-100 in 60 minutesSpring Data JPA from 0-100 in 60 minutes
Spring Data JPA from 0-100 in 60 minutes
VMware Tanzu
 

What's hot (20)

Models for hierarchical data
Models for hierarchical dataModels for hierarchical data
Models for hierarchical data
 
Informatica session
Informatica sessionInformatica session
Informatica session
 
ORACLE PL SQL
ORACLE PL SQLORACLE PL SQL
ORACLE PL SQL
 
Etl And Data Test Guidelines For Large Applications
Etl And Data Test Guidelines For Large ApplicationsEtl And Data Test Guidelines For Large Applications
Etl And Data Test Guidelines For Large Applications
 
Single-Row Functions in orcale Data base
Single-Row Functions in orcale Data baseSingle-Row Functions in orcale Data base
Single-Row Functions in orcale Data base
 
Sql server
Sql serverSql server
Sql server
 
Pl sql-ch1
Pl sql-ch1Pl sql-ch1
Pl sql-ch1
 
Learn Entity Framework in a day with Code First, Model First and Database First
Learn Entity Framework in a day with Code First, Model First and Database FirstLearn Entity Framework in a day with Code First, Model First and Database First
Learn Entity Framework in a day with Code First, Model First and Database First
 
Power BI - Power Query
Power BI - Power QueryPower BI - Power Query
Power BI - Power Query
 
Introduction To Pentaho
Introduction To PentahoIntroduction To Pentaho
Introduction To Pentaho
 
HFM Extended Analytics
HFM Extended AnalyticsHFM Extended Analytics
HFM Extended Analytics
 
SQL Complete Tutorial. All Topics Covered
SQL Complete Tutorial. All Topics CoveredSQL Complete Tutorial. All Topics Covered
SQL Complete Tutorial. All Topics Covered
 
Qlik Sense for Beginners - www.techstuffy.com - QlikView Next Generation
Qlik Sense for Beginners - www.techstuffy.com - QlikView Next GenerationQlik Sense for Beginners - www.techstuffy.com - QlikView Next Generation
Qlik Sense for Beginners - www.techstuffy.com - QlikView Next Generation
 
Alteryx Presentation
Alteryx PresentationAlteryx Presentation
Alteryx Presentation
 
Building Lakehouses on Delta Lake with SQL Analytics Primer
Building Lakehouses on Delta Lake with SQL Analytics PrimerBuilding Lakehouses on Delta Lake with SQL Analytics Primer
Building Lakehouses on Delta Lake with SQL Analytics Primer
 
Sql query patterns, optimized
Sql query patterns, optimizedSql query patterns, optimized
Sql query patterns, optimized
 
Sql database object
Sql database objectSql database object
Sql database object
 
Drone Data Flowing Through Apache NiFi
Drone Data Flowing Through Apache NiFiDrone Data Flowing Through Apache NiFi
Drone Data Flowing Through Apache NiFi
 
Oracle SQL Basics
Oracle SQL BasicsOracle SQL Basics
Oracle SQL Basics
 
Spring Data JPA from 0-100 in 60 minutes
Spring Data JPA from 0-100 in 60 minutesSpring Data JPA from 0-100 in 60 minutes
Spring Data JPA from 0-100 in 60 minutes
 

Similar to Bi-temporal rdbms 2014

Lsmw by guntupalliharikrishna
Lsmw by guntupalliharikrishnaLsmw by guntupalliharikrishna
Lsmw by guntupalliharikrishna
Hari Krishna
 
Implementing Change Systems in SQL Server 2016
Implementing Change Systems in SQL Server 2016Implementing Change Systems in SQL Server 2016
Implementing Change Systems in SQL Server 2016
Douglas McClurg
 
Interactive real time dashboards on data streams using Kafka, Druid, and Supe...
Interactive real time dashboards on data streams using Kafka, Druid, and Supe...Interactive real time dashboards on data streams using Kafka, Druid, and Supe...
Interactive real time dashboards on data streams using Kafka, Druid, and Supe...
DataWorks Summit
 
Wt11 writing dataweave transformations
Wt11 writing dataweave transformationsWt11 writing dataweave transformations
Wt11 writing dataweave transformations
Akihiro Iwaya
 
Presentation to dm as november 2007 with dynamic provisioning information
Presentation to dm as   november 2007 with dynamic provisioning informationPresentation to dm as   november 2007 with dynamic provisioning information
Presentation to dm as november 2007 with dynamic provisioning information
xKinAnx
 
FME 2015 and Beyond
FME 2015 and BeyondFME 2015 and Beyond
FME 2015 and Beyond
Safe Software
 
Interactive Realtime Dashboards on Data Streams using Kafka, Druid and Superset
Interactive Realtime Dashboards on Data Streams using Kafka, Druid and SupersetInteractive Realtime Dashboards on Data Streams using Kafka, Druid and Superset
Interactive Realtime Dashboards on Data Streams using Kafka, Druid and Superset
Hortonworks
 
Recharge_report_Automation
Recharge_report_AutomationRecharge_report_Automation
Recharge_report_AutomationKIIT
 
transaction management, concept & State
transaction management, concept & Statetransaction management, concept & State
transaction management, concept & State
Surya Swaroop
 
Containerized Stream Engine to Build Modern Delta Lake
Containerized Stream Engine to Build Modern Delta LakeContainerized Stream Engine to Build Modern Delta Lake
Containerized Stream Engine to Build Modern Delta Lake
Databricks
 
Performant Streaming in Production: Preventing Common Pitfalls when Productio...
Performant Streaming in Production: Preventing Common Pitfalls when Productio...Performant Streaming in Production: Preventing Common Pitfalls when Productio...
Performant Streaming in Production: Preventing Common Pitfalls when Productio...
Databricks
 
crystal xcelsius and web services by dashboardcafe.com
crystal xcelsius and web services by dashboardcafe.comcrystal xcelsius and web services by dashboardcafe.com
crystal xcelsius and web services by dashboardcafe.com
Sigit Yunanto
 
Scoping Workshop WrapupTemplate.ppt
Scoping Workshop WrapupTemplate.pptScoping Workshop WrapupTemplate.ppt
Scoping Workshop WrapupTemplate.ppt
shubhtomar5
 
Oracle Goldengate for Big Data - LendingClub Implementation
Oracle Goldengate for Big Data - LendingClub ImplementationOracle Goldengate for Big Data - LendingClub Implementation
Oracle Goldengate for Big Data - LendingClub Implementation
Vengata Guruswamy
 
Autonomous Transaction Processing (ATP): In Heavy Traffic, Why Drive Stick?
Autonomous Transaction Processing (ATP): In Heavy Traffic, Why Drive Stick?Autonomous Transaction Processing (ATP): In Heavy Traffic, Why Drive Stick?
Autonomous Transaction Processing (ATP): In Heavy Traffic, Why Drive Stick?
Jim Czuprynski
 
Performance tuning ColumnStore
Performance tuning ColumnStorePerformance tuning ColumnStore
Performance tuning ColumnStore
MariaDB plc
 
Building a globalized, customer facing e-commerce product, powered by micro-s...
Building a globalized, customer facing e-commerce product, powered by micro-s...Building a globalized, customer facing e-commerce product, powered by micro-s...
Building a globalized, customer facing e-commerce product, powered by micro-s...
Nikos Dimitrakopoulos
 
Transaction Processing
Transaction ProcessingTransaction Processing
Transaction Processing
Amrit Kaur
 

Similar to Bi-temporal rdbms 2014 (20)

Lsmw by guntupalliharikrishna
Lsmw by guntupalliharikrishnaLsmw by guntupalliharikrishna
Lsmw by guntupalliharikrishna
 
Implementing Change Systems in SQL Server 2016
Implementing Change Systems in SQL Server 2016Implementing Change Systems in SQL Server 2016
Implementing Change Systems in SQL Server 2016
 
Interactive real time dashboards on data streams using Kafka, Druid, and Supe...
Interactive real time dashboards on data streams using Kafka, Druid, and Supe...Interactive real time dashboards on data streams using Kafka, Druid, and Supe...
Interactive real time dashboards on data streams using Kafka, Druid, and Supe...
 
Wt11 writing dataweave transformations
Wt11 writing dataweave transformationsWt11 writing dataweave transformations
Wt11 writing dataweave transformations
 
Presentation to dm as november 2007 with dynamic provisioning information
Presentation to dm as   november 2007 with dynamic provisioning informationPresentation to dm as   november 2007 with dynamic provisioning information
Presentation to dm as november 2007 with dynamic provisioning information
 
Wipro
WiproWipro
Wipro
 
Wipro
WiproWipro
Wipro
 
FME 2015 and Beyond
FME 2015 and BeyondFME 2015 and Beyond
FME 2015 and Beyond
 
Interactive Realtime Dashboards on Data Streams using Kafka, Druid and Superset
Interactive Realtime Dashboards on Data Streams using Kafka, Druid and SupersetInteractive Realtime Dashboards on Data Streams using Kafka, Druid and Superset
Interactive Realtime Dashboards on Data Streams using Kafka, Druid and Superset
 
Recharge_report_Automation
Recharge_report_AutomationRecharge_report_Automation
Recharge_report_Automation
 
transaction management, concept & State
transaction management, concept & Statetransaction management, concept & State
transaction management, concept & State
 
Containerized Stream Engine to Build Modern Delta Lake
Containerized Stream Engine to Build Modern Delta LakeContainerized Stream Engine to Build Modern Delta Lake
Containerized Stream Engine to Build Modern Delta Lake
 
Performant Streaming in Production: Preventing Common Pitfalls when Productio...
Performant Streaming in Production: Preventing Common Pitfalls when Productio...Performant Streaming in Production: Preventing Common Pitfalls when Productio...
Performant Streaming in Production: Preventing Common Pitfalls when Productio...
 
crystal xcelsius and web services by dashboardcafe.com
crystal xcelsius and web services by dashboardcafe.comcrystal xcelsius and web services by dashboardcafe.com
crystal xcelsius and web services by dashboardcafe.com
 
Scoping Workshop WrapupTemplate.ppt
Scoping Workshop WrapupTemplate.pptScoping Workshop WrapupTemplate.ppt
Scoping Workshop WrapupTemplate.ppt
 
Oracle Goldengate for Big Data - LendingClub Implementation
Oracle Goldengate for Big Data - LendingClub ImplementationOracle Goldengate for Big Data - LendingClub Implementation
Oracle Goldengate for Big Data - LendingClub Implementation
 
Autonomous Transaction Processing (ATP): In Heavy Traffic, Why Drive Stick?
Autonomous Transaction Processing (ATP): In Heavy Traffic, Why Drive Stick?Autonomous Transaction Processing (ATP): In Heavy Traffic, Why Drive Stick?
Autonomous Transaction Processing (ATP): In Heavy Traffic, Why Drive Stick?
 
Performance tuning ColumnStore
Performance tuning ColumnStorePerformance tuning ColumnStore
Performance tuning ColumnStore
 
Building a globalized, customer facing e-commerce product, powered by micro-s...
Building a globalized, customer facing e-commerce product, powered by micro-s...Building a globalized, customer facing e-commerce product, powered by micro-s...
Building a globalized, customer facing e-commerce product, powered by micro-s...
 
Transaction Processing
Transaction ProcessingTransaction Processing
Transaction Processing
 

Recently uploaded

Sample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdf
Sample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdfSample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdf
Sample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdf
Linda486226
 
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
oz8q3jxlp
 
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
slg6lamcq
 
一比一原版(QU毕业证)皇后大学毕业证成绩单
一比一原版(QU毕业证)皇后大学毕业证成绩单一比一原版(QU毕业证)皇后大学毕业证成绩单
一比一原版(QU毕业证)皇后大学毕业证成绩单
enxupq
 
一比一原版(BU毕业证)波士顿大学毕业证成绩单
一比一原版(BU毕业证)波士顿大学毕业证成绩单一比一原版(BU毕业证)波士顿大学毕业证成绩单
一比一原版(BU毕业证)波士顿大学毕业证成绩单
ewymefz
 
一比一原版(BCU毕业证书)伯明翰城市大学毕业证如何办理
一比一原版(BCU毕业证书)伯明翰城市大学毕业证如何办理一比一原版(BCU毕业证书)伯明翰城市大学毕业证如何办理
一比一原版(BCU毕业证书)伯明翰城市大学毕业证如何办理
dwreak4tg
 
Empowering Data Analytics Ecosystem.pptx
Empowering Data Analytics Ecosystem.pptxEmpowering Data Analytics Ecosystem.pptx
Empowering Data Analytics Ecosystem.pptx
benishzehra469
 
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
pchutichetpong
 
Q1’2024 Update: MYCI’s Leap Year Rebound
Q1’2024 Update: MYCI’s Leap Year ReboundQ1’2024 Update: MYCI’s Leap Year Rebound
Q1’2024 Update: MYCI’s Leap Year Rebound
Oppotus
 
一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理
一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理
一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理
g4dpvqap0
 
The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...
jerlynmaetalle
 
Predicting Product Ad Campaign Performance: A Data Analysis Project Presentation
Predicting Product Ad Campaign Performance: A Data Analysis Project PresentationPredicting Product Ad Campaign Performance: A Data Analysis Project Presentation
Predicting Product Ad Campaign Performance: A Data Analysis Project Presentation
Boston Institute of Analytics
 
Influence of Marketing Strategy and Market Competition on Business Plan
Influence of Marketing Strategy and Market Competition on Business PlanInfluence of Marketing Strategy and Market Competition on Business Plan
Influence of Marketing Strategy and Market Competition on Business Plan
jerlynmaetalle
 
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
axoqas
 
FP Growth Algorithm and its Applications
FP Growth Algorithm and its ApplicationsFP Growth Algorithm and its Applications
FP Growth Algorithm and its Applications
MaleehaSheikh2
 
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
Timothy Spann
 
standardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghhstandardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghh
ArpitMalhotra16
 
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
ahzuo
 
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
Timothy Spann
 
一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理
一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理
一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理
mbawufebxi
 

Recently uploaded (20)

Sample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdf
Sample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdfSample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdf
Sample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdf
 
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
 
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
 
一比一原版(QU毕业证)皇后大学毕业证成绩单
一比一原版(QU毕业证)皇后大学毕业证成绩单一比一原版(QU毕业证)皇后大学毕业证成绩单
一比一原版(QU毕业证)皇后大学毕业证成绩单
 
一比一原版(BU毕业证)波士顿大学毕业证成绩单
一比一原版(BU毕业证)波士顿大学毕业证成绩单一比一原版(BU毕业证)波士顿大学毕业证成绩单
一比一原版(BU毕业证)波士顿大学毕业证成绩单
 
一比一原版(BCU毕业证书)伯明翰城市大学毕业证如何办理
一比一原版(BCU毕业证书)伯明翰城市大学毕业证如何办理一比一原版(BCU毕业证书)伯明翰城市大学毕业证如何办理
一比一原版(BCU毕业证书)伯明翰城市大学毕业证如何办理
 
Empowering Data Analytics Ecosystem.pptx
Empowering Data Analytics Ecosystem.pptxEmpowering Data Analytics Ecosystem.pptx
Empowering Data Analytics Ecosystem.pptx
 
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
 
Q1’2024 Update: MYCI’s Leap Year Rebound
Q1’2024 Update: MYCI’s Leap Year ReboundQ1’2024 Update: MYCI’s Leap Year Rebound
Q1’2024 Update: MYCI’s Leap Year Rebound
 
一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理
一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理
一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理
 
The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...
 
Predicting Product Ad Campaign Performance: A Data Analysis Project Presentation
Predicting Product Ad Campaign Performance: A Data Analysis Project PresentationPredicting Product Ad Campaign Performance: A Data Analysis Project Presentation
Predicting Product Ad Campaign Performance: A Data Analysis Project Presentation
 
Influence of Marketing Strategy and Market Competition on Business Plan
Influence of Marketing Strategy and Market Competition on Business PlanInfluence of Marketing Strategy and Market Competition on Business Plan
Influence of Marketing Strategy and Market Competition on Business Plan
 
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
 
FP Growth Algorithm and its Applications
FP Growth Algorithm and its ApplicationsFP Growth Algorithm and its Applications
FP Growth Algorithm and its Applications
 
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
 
standardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghhstandardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghh
 
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
 
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
 
一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理
一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理
一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理
 

Bi-temporal rdbms 2014

  • 2. ©2008-2015 2 References ●Dr. Richard Snodgrass ● Developing Time-Oriented Database Applications ● Temporal Data Types ● Kinds of Time: Instant, Interval, Period ● Temporal Statements ● Current, Sequenced, Non-sequenced ● Non-temporal ● Temporal: Past, Current, Future ●Tom Johnston ● Time and Again series
  • 3. ©2008-2015 3 Terminology ●Temporal: fancy-schmancy word for “time” ● “We’re approaching the temporal anomaly, Captain!” ●Versioning: tracking changes ● Hoarding data, don't throw anything away ● Mono-temporality (valid/effective). When the fact or state change took effect. ● Example: source control systems (csv, svn, etc.)
  • 4. ©2008-2015 4 Terminology ●Bi-Temporal ● Effective time: when did/will it happen? ● Transaction time: when did we record it? ●Version/Temporal Normal Form (vnf/tnf) ● Really... a new normalization pattern? ● Not really. Special case of 2nf. ● Differences and similarities
  • 5. ©2008-2015 5 Terminology ●Temporally Insensitive Data ● Never changes ● Changes are ignored ●Temporally Sensitive Data ● Changes are tracked ● Changes are scheduled ●Temporal Key ● Composite key with at least one date field ● Version key contains effective date. ● Bi-temporal key is version key with addition of transaction date field. } static } versioned
  • 6. ©2008-2015 6 Why Versioning? ●All changes to TS data are tracked ●“Look back” queries ● Valid/Effective time ● Transaction time ●Database “undo” even after commit ●Changes may be “pre-inserted” or “pre-updated” to automatically become current when the time arrives.
  • 7. ©2008-2015 7 Why Versioning? ● No extraordinary means (such as separate “history” tables). ● Normal referential constraints. ● All queries follow a consistent pattern. ● Extend CVS/SVN to database. ● All this in a transactional database without maintaining separate snapshot, history or audit tables, and with only minor impact on performance.
  • 8. ©2008-2015 8 Characteristics of Versioning ● Logical / physical differences. ● The row is the entity ● The row is one version of the entity. ● Versions cannot overlap. There cannot be two different “truths” in effect at the same time. ● There cannot be gaps between versions. The entity does not simply disappear at some point then reappear later in a different state. ● One and only one relative current version. Current to the reference or “as of” time.
  • 9. ©2008-2015 9 Versioning State of the Art ● From Wikipedia: Slowly Changing Dimension (SCD). ● Data Warehouse patterns ● Type 1: Do nothing ● Type 6: One version almost workable ● Two tables: current versions and past versions. ● Two dates: start and end. (Row spanning dependency) ● Lot of data changing for “undo.” ● Referential integrity: FK to “current” table.
  • 10. ©2008-2015 10 Minimum Requirements ● One and only one date / time value which signifies when the version took effect (no row spanning dependencies). ● NO separate field used to indicate the current version! ● New version involves one record (version independence). ● Foreign key references same as always. ● Versioning pattern: consistent and universal.
  • 11. ©2008-2015 11 1. There cannot be more than one version of the truth at any given time. In its simplest form, this means that any query that returns more than one version of the same entity for the same time is erroneous. 2. We can’t change the past. This means simply that physical updates to versioned data should be prohibited. i. This does not apply to versions set to become effective in the future. Plans change all the time! Versioning Rules
  • 12. ©2008-2015 12 Temporal Normal Form (tnf) ➲ How it is implemented
  • 13. ©2008-2015 13 Building up to VNF EmpNo (pk) FName LName HireDate PayRate Other Info 1001 Sally Jones 1998-10-10 15.35 … 1002 Sam Spade 1998-11-11 10.56 … 1004 Katherine Great 1998-12-12 9.00 … Figure1: Original Non-versioned Data
  • 14. ©2008-2015 14 Building up to VNF EmpNo (pk) FName LName HireDate PayRate Other Info 1001 Sally Jones 1998-10-10 15.35 … 1002 Sam Spade 1998-11-11 10.56 … 1004 Katherine Great 1998-12-12 9.00 … Figure1: Original Non-versioned Data EmpNo (pk) FName LName HireDate PayRate Other Info 1001 Sally Smith 1998-10-10 15.35 … 1002 Sam Spade 1998-11-11 10.56 … 1004 Katherine Great 1998-12-12 9.00 … Figure 2: “Jones” becomes “Smith” ― option 1
  • 15. ©2008-2015 15 Building up to VNF EmpNo (pk) FName LName HireDate PayRate Other Info 1001 Sally Jones 1998-10-10 15.35 … 1002 Sam Spade 1998-11-11 10.56 … 1004 Katherine Great 1998-12-12 9.00 … Figure1: Original Non-versioned Data EmpNo (pk) FName LName HireDate PayRate Other Info 1001 Sally Jones 1998-10-10 15.35 … 1002 Sam Spade 1998-11-11 10.56 … 1004 Katherine Great 1998-12-12 9.00 … 1005 Sally Smith 1998-10-10 15.35 … Figure 3: “Jones” becomes “Smith” ― option 2
  • 16. ©2008-2015 16 Building up to VNF EmpNo (pk) FName LName HireDate PayRate Other Info 1001 Sally Jones 1998-10-10 15.35 … 1002 Sam Spade 1998-11-11 10.56 … 1004 Katherine Great 1998-12-12 9.00 … Figure1: Original Non-versioned Data EmpNo (pk) Effective(pk) FName LName HireDate PayRate Other Info 1001 2010-06-19 Sally Jones 1998-10-10 15.35 … 1002 2007-01-01 Sam Spade 1998-11-11 10.56 … 1004 2008-02-26 Katherine Great 1998-12-12 9.00 … 1001 2012-01-01 Sally Smith 1998-10-10 15.35 … Figure 4: Simple Versioned Data
  • 17. ©2008-2015 17 Temporal Normal Forms ● A table is in Temporal Normal Form when it is in at least second normal form and the primary key is a Temporal key. ● Version Normal Form (VNF): primary key is a version key. ● Temporal Normal Form (TNF): primary key is a bi-temporal key. TNF can be used as a generic term, short for “VNF or TNF.” VNF always is effective time only.
  • 18. ©2008-2015 18 Version Normal Form EmpNo (pk) Created Deleted FName HireDate Other Info 1001 2008-10-01 9999-12-31 Sally 2008-10-10 … 1002 2008-11-01 9999-12-31 Sam 2008-11-11 … 1004 2008-12-01 9999-12-31 Katherine 2008-12-12 … Employees Entity Table – after VNF EmpNo (pk) Effective(pk) Created LName PayRate Other Info 1001 2008-10-10 2008-10-01 Jones 15.35 … 1002 2008-11-11 2008-11-01 Spade 10.56 … 1004 2008-12-12 2008-12-01 Great 9.00 … Temporally Normalized (Versioned) Employee Data EmpNo (pk) Effective(pk) Created LName PayRate Other Info 1001 2008-10-10 2008-10-01 Jones 15.35 … 1002 2008-11-11 2008-11-01 Spade 10.56 … 1004 2008-12-12 2008-12-01 Great 9.00 … 1001 2012-01-01 2012-02-01 Smith 15.35 …
  • 19. ©2008-2015 19 Version DML declare @EmpNo int; -- insert static record insert into Employees( Created, Deleted, HireDate, FName, ... ) values( SysDate(), '9999-12-31', '2008-10-01', 'Sally', ... ); set @EmpNo = @@Identity; -- insert first version insert into EmployeeVersions( EmpNo, Effective, Created, LName, ... ) values( @EmpNo, '2008-10-01', SysDate(), 'Jones', ... ); Creating an entity (insert): Modifying entity data (update): -- insert new version insert into EmployeeVersions( EmpNo, Effective, LName, ... ) values( 1001, '2012-01-01', 'Smith', ... );
  • 20. ©2008-2015 20 Version Normal Form EmpNo (pk) Created Deleted FName HireDate Other Info 1001 2008-10-01 9999-12-31 Sally 2008-10-10 … 1002 2008-11-01 9999-12-31 Sam 2008-11-11 … 1004 2008-12-01 9999-12-31 Katherine 2008-12-12 … Employees Entity Table – after VNF Temporally Normalized (Versioned) Employee Data EmpNo (pk) Effective(pk) Created LName PayRate Other Info 1001 2008-10-10 2008-10-01 Jones 15.35 … 1002 2008-11-11 2008-11-01 Spade 10.56 … 1004 2008-12-12 2008-12-01 Great 9.00 … 1001 2012-01-01 2012-02-01 Smith 15.35 …
  • 21. ©2008-2015 21 Version Query EmpNo Effective FName LName PayRate HireDate Other Info 1001 2010-06-19 Sally Jones 15.35 2008-10-10 … 1002 2011-01-01 Sam Spade 10.56 2008-11-11 … 1004 2011-02-26 Katherine Great 9.00 2008-12-12 … 1001 2012-01-01 Sally Smith 15.35 2008-10-10 … Figure 5: Simple Join Query – All Rows Select e.EmpNo, ev.Effective, ev.FName, ev.Lname, e.HireDate, ev.PayRate, ... from Employees e join EmployeeVersions ev on e.EmpNo = ev.EmpNo where e.Deleted > GetDate() and ev.Effective = ( select Max( Effective ) from EmployeeVersions ev1 where ev1.EmpNo = e.EmpNo and ev1.Effective < GetDate() );
  • 22. ©2008-2015 22 EmpNo(pk) Effective(pk) Created LName PayRate Other Info 1001 2008-10-10 2008-10-01 Jones 15.35 … 1002 2008-11-11 2008-11-01 Spade 10.56 … 1004 2008-12-12 2008-12-01 Great 9.00 … 1001 2012-01-01 2012-02-01 Smith 15.35 … EmpNo(pk) Effective(pk) Created(pk) LName PayRate Other Info 1001 2008-10-10 2008-10-01 Jones 15.35 … 1002 2008-11-11 2008-11-01 Spade 10.56 … 1004 2008-12-12 2008-12-01 Great 9.00 … 1001 2012-01-01 2012-02-01 Smith 15.35 … (Bi-)Temporal Normal Form EmpNo(pk) Created Deleted FName HireDate Other Info 1001 2008-10-01 9999-12-31 Sally 2008-10-10 … 1002 2008-11-01 9999-12-31 Sam 2008-11-11 … 1004 2008-12-01 9999-12-31 Katherine 2008-12-12 … Employees Entity Table – after VNF Bi-Temporally Normalized Employee Data EmpNo(pk) Effective(pk) Created(pk) LName PayRate Other Info 1001 2008-10-10 2008-10-01 Jones 15.35 … 1002 2008-11-11 2008-11-01 Spade 10.56 … 1004 2008-12-12 2008-12-01 Great 9.00 … 1001 2012-01-01 2012-02-01 Smith 15.35 … 1001 2012-01-01 2012-11-17 Smythe 15.35 …
  • 23. ©2008-2015 23 Bi-Temporal Query EmpNo Effective Created FName LName PayRate HireDate Other Info 1002 2011-01-01 2008-11-01 Sam Spade 10.56 2008-11-11 … 1004 2011-02-26 2008-12-01 Katherine Great 9.00 2008-12-12 … 1001 2012-01-01 2012-11-17 Sally Smythe 15.35 2008-10-10 … Figure 6: Bi-Temporal Join Query Select e.EmpNo, ev.Effective, ev.Created, ev.FName, ev.Lname, e.HireDate, ev.PayRate, ... from Employees e join EmployeeVersions ev on e.EmpNo = ev.EmpNo where e.Deleted > GetDate() and ev.Effective = ( select Max( Effective ) from EmployeeVersions ev1 where ev1.EmpNo = e.EmpNo and ev1.Effective < GetDate() ) and ev.Created = ( select Max( Created ) from EmployeeVersions ev2 where ev2.EmpNo = e.EmpNo and ev2.Effective = ev.Effective and ev2.Created < GetDate() );
  • 25. ©2008-2015 25 Versioned One-to-many OrderID CustID Shipped Created Deleted 12 123 2012-01-02 2011-11-10 9999-12-31 Orders: OrdersV: OrderItems: OrderItemsV: OrderID Effective Shipped Total Terms 12 2011-11-15 2012-01-08 $1030.00 5net30 OrderID ItemNo Created Deleted 12 1 2011-11-15 9999-12-31 12 2 2011-11-15 9999-12-31 OrderID ItemNo Effective Product Qty Price 12 1 2011-11-15 1705 10 $30 12 2 2011-11-15 309 2 $500 12 2 2011-11-20 309 1 $515
  • 26. ©2008-2015 26 Versioned One-to-many select * from Orders o join OrdersV ov on o.OrderID = ov.OrderID where ov.OrderID = @OrderID and o.Deleted > @AsOf and ov.Effective = ( select Max( Effective ) from OrdersV ov1 where ov1.OrderID = o.OrderID and ov1.Effective <= @AsOf ); select * from OrderItems oi join OrderItemsV oiv on oi.OrderID = oiv.OrderID and oi.ItemNo = oiv.ItemNo where oi.OrderID = @OrderID and oi.Deleted > @AsOf and oiv.Effective = ( select Max( Effective ) from OrderItemsV oiv1 where oiv1.OrderID = oi.OrderID and oiv1.ItemNo = oi.ItemNo and oiv1.Effective <= @AsOf );
  • 27. ©2008-2015 27 Versioned One-to-many select o.OrderID, o.CustID, o.Shipped, ov.Terms, oi.ItemNo, oi.Product, oiv.Qty, oi.Price, oiv.Qty * oi.Price as ItemTotal from Orders o join OrdersV ov on o.OrderID = ov.OrderID left join OrderItems oi on o.OrderID = oi.OrderID join OrderItemsV oiv on oi.OrderID = oiv.OrderID and oi.ItemNo = oiv.ItemNo where o.OrderID = @OrderID and ov.Effective = ( select Max( Effective ) from OrdersV ov1 where ov1.OrderID = o.OrderID and ov1.Effective <= @AsOf ) and oiv.Effective = ( select Max( Effective ) from OrderItemsV oiv1 where oiv1.OrderID = oi.OrderID and oiv1.ItemNo = oi.ItemNo and oiv1.Effective <= @AsOf );
  • 28. ©2008-2015 28 Version Analysis Version Slicing Time A VA5VA5 VA4VA4 VA3VA3 VA2VA2 VA1VA1 B VB5VB5 VB4VB4 VB2VB2 VB1VB1 VB3VB3 C VC3VC3 VC1VC1 VC2VC2 Current As of
  • 29. ©2008-2015 29 Version Analysis Version History V11 V1 V2 V3 V4 V5 V6 V7 V8 V9 V10 A VA5VA5 VA4VA4 VA3VA3 VA2VA2 VA1VA1 B VB5VB5 VB4VB4 VB2VB2 VB1VB1 VB3VB3 C VC3VC3 VC1VC1 VC2VC2 Time
  • 30. ©2008-2015 30 Version Analysis Effective Data 02/01/2008 VA1 02/02/2008 VA2 02/05/2008 VA3 02/07/2008 VA4 02/11/2008 VA5 Effective Data 02/01/2008 VB1 02/03/2008 VB2 02/06/2008 VB3 02/08/2008 VB4 02/10/2008 VB5 Effective Data 02/01/2008 VC1 02/04/2008 VC2 02/09/2008 VC3 Table A Table B Table C
  • 31. ©2008-2015 31 Version Analysis select a.Effective as AEff, a.Data as AData, b.Effective as BEff, b.Data as BData, c.Effective as CEff, c.Data as CData from A_Data a join B_Data b on a.A_ID = b.B_ID join C_Data c on a.A_ID = c.C_ID where b.Effective = ( select Max( Effective ) from B_Data where Effective <= a.Effective ) and c.Effective = ( select Max( Effective ) from C_Data where Effective <= a.Effective ) union all ...
  • 32. ©2008-2015 32 Version Analysis select a.Effective as AEff, a.Data as AData, b.Effective as BEff, b.Data as BData, c.Effective as CEff, c.Data as CData from A_Data a join B_Data b on a.A_ID = b.B_ID join C_Data c on a.A_ID = c.C_ID where a.Effective = ( select Max( Effective ) from A_Data where Effective <= b.Effective ) and c.Effective = ( select Max( Effective ) from C_Data where Effective <= b.Effective ) union all
  • 33. ©2008-2015 33 Version Analysis ... select a.Effective as AEff, a.Data as AData, b.Effective as BEff, b.Data as BData, c.Effective as CEff, c.Data as CData from A_Data a join B_Data b on a.A_ID = b.B_ID join C_Data c on a.A_ID = c.C_ID where a.Effective = ( select Max( Effective ) from A_Data where Effective <= c.Effective ) and b.Effective = ( select Max( Effective ) from B_Data where Effective <= c.Effective );
  • 34. ©2008-2015 34 Version Analysis AEff AData BEff BData CEff CData 02/01/2008 VA1 02/01/2008 VB1 02/01/2008 VC1 02/02/2008 VA2 02/01/2008 VB1 02/01/2008 VC1 02/02/2008 VA2 02/03/2008 VB2 02/01/2008 VC1 02/02/2008 VA2 02/03/2008 VB2 02/04/2008 VC2 02/05/2008 VA3 02/03/2008 VB2 02/04/2008 VC2 02/05/2008 VA3 02/06/2008 VB3 02/04/2008 VC2 02/07/2008 VA4 02/06/2008 VB3 02/04/2008 VC2 02/07/2008 VA4 02/08/2008 VB4 02/04/2008 VC2 02/07/2008 VA4 02/08/2008 VB4 02/09/2008 VC3 02/07/2008 VA4 02/10/2008 VB5 02/09/2008 VC3 02/11/2008 VA5 02/10/2008 VB5 02/09/2008 VC3
  • 35. ©2008-2015 35 Version Analysis Select case when AEff > BEff and AEff > CEff then AEff when BEff > AEff and BEff > CEff then BEff else CEff end as Effective, AData, BData, CData from ( -- previous query ) as History; Effective AData BData CData 02/01/2008 VA1 VB1 VC1 02/02/2008 VA2 VB1 VC1 02/03/2008 VA2 VB2 VC1 02/04/2008 VA2 VB2 VC2 02/05/2008 VA3 VB2 VC2 02/06/2008 VA3 VB3 VC2 02/07/2008 VA4 VB3 VC2 02/08/2008 VA4 VB4 VC2 02/09/2008 VA4 VB4 VC3 02/10/2008 VA4 VB5 VC3 02/11/2008 VA5 VB5 VC3 History
  • 36. ©2008-2015 36 Version Views create view Orders as select os.OrderID, os.CustID, os.Shipped, ov.Total, ov.Terms, ov.Created as DateModified from OrdersS os join OrdersV ov on ov.OrderID = os.OrderID where os.Deleted > GetDate() and ov.Effective = ( select Max( ov1.Effective ) from OrdersV ov1 where ov1.OrderID = ov.OrderID and ov1.Effective <= GetDate() ) Orders View (current)
  • 37. ©2008-2015 37 Version Views create view OrderItems as select oiv.OrderID, oiv.ItemID, oiv.Product, oiv.Qty, oiv.Price, oiv.Effective as DateModified from OrderItemsS ois join OrderItemsV oiv on oiv.OrderID = ois.OrderID and oiv.ItemNo = ois.ItemNo where oiv.Deleted > GetDate() and oiv.Effective = ( select Max( Effective ) from OrderItemsV oiv1 where oiv1.OrderID = oiv.OrderID and oiv1.ItemID = oiv.ItemID and oiv1.Effective <= GetDate() ) OrderItems View (current)
  • 38. ©2008-2015 38 Version Views select o.OrderID, o.CustID, o.Shipped, o.Total, o.Terms, oi.ItemID, oi.Product, oi.Qty, oi.Price from Orders o left join OrderItems oi on o.OrderID = oi.OrderID; Querying Current Views
  • 39. ©2008-2015 39 Version Views ● Insert ● Separate static from versioned ● Expose 'Effective' so it can be entered or use current timestamp? ● Update ● Separate static from versioned ● Update static data, insert new version data as needed ● If 'Effective' exposed, ignore or use updated value? ● Delete ● Hard, firm, soft ● Hard: physical delete. Not recommended with temporal data. ● Firm: enforce “once deleted, stays deleted.” ● Soft: Delete/undelete operations are available. View triggers
  • 40. ©2008-2015 40 ● How it is implemented ● When it is implemented ● Data must be tracked through time ● Past data must be reconstructed ● Undo ― even after commit ● Planned changes pre-inserted ● Time-related analysis Temporal Normal Form (tnf)
  • 41. ©2008-2015 41 ● How it is implemented ● When it is implemented ● Check against requirements ● One and only one date/time value (no rsd) ● No separate field to flag “current” ● Version independence ● No FK tricks ● Consistent pattern Temporal Normal Form (tnf)
  • 42. ©2008-2015 42 ● How it is implemented ● When it is implemented ● Check against requirements ● The future Temporal Normal Form (tnf)
  • 43. ©2008-2015 43 Temporal (TSQL/SQL2/SQL3) NONSEQUENCED TRANSACTION AND VALID PERIOD '2005-01-01 - 2006-01-01' SELECT e1.ename, e1.street AS old_street, e2.street AS new_street, BEGIN(TRANSACTION(e2)) AS trans_time FROM employee AS e1, employee AS e2 WHERE e1.eno = e2.eno AND TRANSACTION(e1) MEETS TRANSACTION(e2) AND e1.street <> e2.street; Find employees who changed address during 2005. Display both the previous and the new addresses.
  • 44. ©2008-2015 44 Temporal (TNF) Select e.ename, ev1.street as old_street, ev2.street as new_street, ev2.Effective as move_time From Employees e Join EmployeeVersions ev1 on ev1.EmpNo = e.EmpNo and ev1.Effective >= '2005-01-01' and ev1.Effective < '2006-01-01' Join EmployeeVersions ev2 on ev2.EmpNo = e.EmpNo and ev2.Effective =( Select Max( ev.Effective ) From EmployeeVersions ev Where ev.Effective > ev1.Effective And ev.Effecitve < '2006-01-01') Where e.Deleted > GetDate();
  • 45. ©2008-2015 45 Temporal (Suggested) Select e1.ename, e1.street as old_street, e2.street as new_street, e2.Effective as move_time, e2.Transaction as trans_time From Employees e1 Join Employees e2 On e2.EmpNo = e1.EmpNo And e2.AsOf > e1.AsOf Where Asof Effective between '2005-01-01' and '2006-01-01'; Compare to the SQL2/3 query! “AsOf” is both a keyword signifying a temporal query (in the WHERE clause) and a pseudo-column for either the effective date field (in an effective look- back) or the transaction date field (in a transaction look-back). “Effective” and “Transaction” are also pseudo-columns to allow more precision and are not dependent on the type of look-back.
  • 46. ©2008-2015 46 Version Normal Form EmpNo(pk) Created Deleted FName HireDate Other Info 1001 2008-10-01 9999-12-31 Sally 2008-10-10 … 1002 2008-11-01 9999-12-31 Sam 2008-11-11 … 1004 2008-12-01 9999-12-31 Katherine 2008-12-12 … Static Employees Table Versioned Employees (Sub)Table EmpNo (pk) Effective(pk) Created LName PayRate Other Info 1001 2008-10-10 2008-10-01 Jones 15.35 … 1002 2008-11-11 2008-11-01 Spade 10.56 … 1004 2008-12-12 2008-12-01 Great 9.00 … 1001 2012-01-01 2012-02-01 Smith 15.35 …
  • 47. ©2008-2015 47 create temporal index NAME on Employees ( LName, PayRate, ... ) -- PK field(s) not specified Effective eff_date_field Transaction trans_date_field; select EmpNo, Effective, FName, Lname, HireDate, PayRate, ... from Employees where ... [asof [effective|transaction] [date|all|between d1 and d2]]; -- Defaults to "asof eff current_timestamp" update Employees set LName = 'Smith' where ... [asof [effective] [date|all|between d1 and d2]]; -- "asof trans" not allowed insert Employees (...) values (...) [asof [effective] date]; -- "asof trans" not allowed Temporal Index
  • 48. ©2008-2015 48 Proof of Concept ● Open Source DBMS ● Download source ● Take apart ● Reassemble with t-index ● Two/thirds complete ● Remaining to be done...
  • 49. ©2008-2015 49 Temporal Termination Questions Google Group VRDBMS: https://groups.google.com/forum/?hl=en&fromgroups#!forum/vrdbms Sources Wikipedia: ● http://en.wikipedia.org/wiki/Temporal_database Time and Again series, Randy Weis & Tom Johnson: ● http://www.inbaseinc.com/dm-series.htm Richard Snodgrass: ● http://www.cs.arizona.edu/people/rts/tdbbook.pdf

Editor's Notes

  1. With versioning: We track all changes to the data, who made the change and when ― not just the last change made ― without using cumbersome “history” tables. Examining the history is simply a matter of writing the right query. We may “look back in time” to see how the data looked on a particular date (transaction time) ― even if some of the entities have subsequently been deleted. This is particularly useful in auditing and report generation. We may “look back in time” to see how the data should have looked on a particular date (valid time). It becomes possible to implement an “undo” feature in the database. So a change to the data, no matter how extensive, may be reversed or rolled all the way back to the way it was at a particular time. Data may be “pre-inserted” or “pre-updated” to take effect at a particular date and time in the future. The new or modified data will remain invisible to queries until the effective date and time is reached. We don’t have to track history through extraordinary means (such as separate “history” tables). Every versioned entity will automatically maintain a complete history, from creation to deletion with no additional effort on the part of the applications. Not only are changes tracked, but also when each change was made or became effective. Thus we can also track the length of time each version was in effect. All referential integrity constraints to and from versioned tables work the same way as with non-versioned tables. Queries against versioned tables (while we realize will be a bit more complicated) follow a consistent pattern and, once learned, are the same no matter the table or the database in which it is used. Versioning takes place at the field level. A “versioned table” is just a table that has had some of its fields versioned, not necessarily all. The underlying table can be altered (fields added or dropped) without impacting the versioned fields — unless, of course, a versioned field is dropped. Versioned fields may be unversioned and unversioned fields may be versioned with little impact. Applications like CVS and SVN ― which allow us to look back in time to follow the changes made to source code ― may easily be developed to give us the same ability to track changes to our data. All this in a transactional database without maintaining separate snapshot or audit tables, and with only minor impact on performance.
  2. Versioning State Of The Art I only recently became aware of the following synopsis of database versioning found in Wikipedia. The entry is titled Slowly Changing Dimension (SCD) which gives a brief description of the problem of tracking changes in information. This, of course, applies mainly to data warehousing applications, but still provides excellent background as to the nature of the solutions in use today. It lists six methods that are, I assume, currently used to handle modifications to data, from doing nothing (Type 1) to a hodge-podge design that uses a date to designate when the data became effective, a date to designate when it is no longer effective, an indicator to signify the row that is now current and a sequence value (Type 6/Hybrid). There are several versions of Type 6, one that seems as though it would almost be workable. There are several distinct disadvantages to even the best of these methods. There are two dates used: start and end. The start date indicates when the data in the row becomes effective. The end date indicates when the data in the row is no longer effective. The problem with this is that we now have to keep adjacent versions in sync with each other. This creates the problem I refer to as a “row spanning dependency”: when data in one row of a table is dependent on data in another row of the same table. When we need to write a new version that is to take effect immediately, we first have to update the existing current version to store “now” in the end date field and write the new version with “now” in the start date field. So all changes to the data involves an Update/Insert pair of operations (sometimes referred to as an “Upsert”). There is also a problem if we want to delete the current version, in effect “undo” the last change. The current version may be deleted but the last version must now be located to return the end date to the value understood to mean “current”. Referential integrity is still not possible as the version timestamp or a sequence value must be part of the primary key or unique index. Any foreign key in another table referring to the versioned table can only refer to one version. Actually, one of the methods solved the referential integrity problem in a clever way. The primary key consists of the natural key and a sequence number starting at 0. Any foreign key reference would refer to this row. When the second version is created, the first row is copied back into the table, becoming sequence number 1 and the first row is actually updated with the new data. So the current version is always sequence number 0 and previous versions take on higher sequence values. This also means that sequential versions must be kept synchronized and all changes involve a two-step, Insert/Update, operation. There are also the complicated (and unmentioned in the article) problem of maintaining sequential values for each entity in the table. All current versions of all entities have value 0 so this column can&amp;apos;t be an Identity (or autogenerated) field.
  3. Basic Requirements Of Maintaining Temporally Sensitive Data To make working with temporally sensitive data relatively simple and less error prone, we must demand certain minimum requirements. We must have a date and time value to signify when the version takes effect. But we should not have to specify when the version is no longer effective. Let&amp;apos;s just agree that a version remains in effect until superseded by the next version or the entity is deleted. This eliminates row-spanning dependencies (the necessity of keeping different rows of the table in sync with each other). We should not have a separate field used to indicate the current version. Whether it be a &amp;apos;Y/N&amp;apos; indication or a set numeric value, this is just another area where errors can creep in. (What happens when we have more than one version with a &amp;apos;Y&amp;apos; in this field? Don&amp;apos;t even try to argue that it would never happen!) When a new version is written to the table, no changes at all should be needed to any previous version including the current version. A logical Update of entity data is converted into a physical Insert, but this should be the only operation needed and it cannot be allowed to introduce systemic errors into the data. We should be able to create foreign key references to temporally sensitive entities no differently than to “normal” entities. The versioning method should be usable for any and all temporally sensitive data, whatever the entity and wherever in the enterprise it is needed. Easier said than done? Possibly, but we have to start somewhere and I contend that if we don&amp;apos;t meet those basic requirements, we don&amp;apos;t have a workable solution. The first two rules of versioning already mentioned (no overlapping and no gaps), are brought about by requirements 1 and 2 above. With only one date, the effective date, there is no way for the versions to get out of sync. The effective date of one version is the “end” date of the previous version. It is not possible, therefore, for overlapping of versions or gaps between versions. By using only the effective dates to determine which is the current version (or the version in effect at any particular moment in time) we eliminate any confusion or errors possible with other indicators. And because the effective date becomes part of the primary key of the versioned data, it is not possible to have two versions with the same effective date. By using only the effective date to determine the one version of interest, we satisfy requirement 3. When we modify the versioned entity ― which is performed by inserting a new version ― no changes need be made to any data already existing in the entity table.
  4. Requirement 4 was the tough one. But the solution turned to be simplicity itself. It took me an entire month to come up with a workable solution but it took another three months before I saw just how simple it turned out to be. I had arrived at an answer by such a convoluted path that I kept seeing it as complicated ― workable but complicated ― until one day I drew it all out on a whiteboard to explain it to a coworker. By ignoring the path to the solution and just looking at the solution itself, the simplicity just leaps out at you. This simplicity also affects its universal applicability, thus requirement 5 is met. The solution turns out to be nothing more than to consider versioning as just another form of relational normalization ― a Version Normal Form (vnf), if you will. I doubt any experienced data modeler actually steps through the normalization process as we are taught in Data Management 101 class in college. We very quickly reach the point where we think in 3nf (or BCNF) and our design hits the paper already in the required normal form. But let&amp;apos;s consider the process for a moment. We have identified all the attributes we will maintain for an entity. We have identified all the candidate keys and selected one to be the Primary Key (or elected to use a surrogate). Now we perform the first step in the normalization process (1nf) and as a result, we now have two tables ― the primary entity table (or independent table) and, say, one additional table (dependent table) which contains repeating attributes. Have we created a problem with referential integrity? Of course not. In fact, data integrity is maintained within the entity by using a foreign key in the dependent tables back to the independent table. Any references to the entity from other entities will be resolved by referencing the independent table. It has the one entity primary key and the normalization process will not effect that. The dependent tables will have a primary key of its own, usually consisting of the entity key field and an identifying additional value or values. The same thing applies when we continue the normalization process. At the end, we end up with one logical entity that may be spread across several physical tables, but there is one table that is the “entity” table (Employees, Customers, Parts, Classes, Items, etc.) and it is this table that is the target of any foreign key that refers to the entity. There is no problem with having both normalization and referential integrity. Thus, after placing the entity in temporal normal form, we get all the benefits of versioning and referential integrity is unaffected. We also get the benefit of having versioning in a pattern (normalization) that database programmers are intimately familiar with. So the learning curve of working with versioned data is pretty close to zero.
  5. Now when Sally notifies us of her name change, we just take the current versioned row from Employee­Versions, change “Jones” to “Smith” and Effective to the date of the wedding and insert the new record. When we query the database, we see “Smith.” But if we query asking “show me the data for employee 1001 as of Dec. 31, 2005,” (or any date before then) we will get “Jones.” Because this pattern is bi-temporal, we can also ask “show me the data for employee 1001 as it existed in the database on Jan, 10, 2006 and we will get “Jones” because, on that date, the database had not yet been updated with the correct name.
  6. Now when Sally notifies us of her name change, we just take the current versioned row from Employee­Versions, change “Jones” to “Smith” and Effective to the date of the wedding and insert the new record. When we query the database, we see “Smith.” But if we query asking “show me the data for employee 1001 as of Dec. 31, 2005,” (or any date before then) we will get “Jones.” Because this pattern is bi-temporal, we can also ask “show me the data for employee 1001 as it existed in the database on Jan, 10, 2006 and we will get “Jones” because, on that date, the database had not yet been updated with the correct name.
  7. Now when Sally notifies us of her name change, we just take the current versioned row from Employee­Versions, change “Jones” to “Smith” and Effective to the date of the wedding and insert the new record. When we query the database, we see “Smith.” But if we query asking “show me the data for employee 1001 as of Dec. 31, 2005,” (or any date before then) we will get “Jones.” Because this pattern is bi-temporal, we can also ask “show me the data for employee 1001 as it existed in the database on Jan, 10, 2006 and we will get “Jones” because, on that date, the database had not yet been updated with the correct name.
  8. Now when Sally notifies us of her name change, we just take the current versioned row from Employee­Versions, change “Jones” to “Smith” and Effective to the date of the wedding and insert the new record. When we query the database, we see “Smith.” But if we query asking “show me the data for employee 1001 as of Dec. 31, 2005,” (or any date before then) we will get “Jones.” Because this pattern is bi-temporal, we can also ask “show me the data for employee 1001 as it existed in the database on Jan, 10, 2006 and we will get “Jones” because, on that date, the database had not yet been updated with the correct name.