8. What are temporal databases? Valid (stated) Time Transaction (logged) Time The 2 dimensions of time
9. What are temporal databases? Valid (stated) Time Transaction (logged) Time Granularity of the time axis Chronons can be days, Seconds, milliseconds depending on the application domain
10. What are temporal databases? The moving point ‘now’ Valid (stated) Time Transaction (logged) Time
35. Demonstration SUPPLIER SUPPLIER PART Non Temporal Schema (SP) TNF Temporal Schema (TSP) Example schema taken from Temporal Data and the Relational Model by CJ Date, H Darwin, NA Lorentzos (2003)
97. DEMO 4 S1 Transaction time = now (showing one S relvar) t26(now-5days) ORA-20001: :Integrity Constraint violated – parent key not found S1,P1
98. DEMO 4 S1 Transaction time = now (showing one S relvar) t26(now-5days) Delete rule on foreign key constraint SP_S_FK is RESTRICT S1,P1 delete restrict
99. DEMO 4 S1 Transaction time = now (showing one S relvar) t26(now-5days) Delete rule on foreign key constraint SP_S_FK is CASCADE S1,P1 delete cascade
105. DEMO 5 S1,P2 Transaction time = now (showing all SP relvars) S1,P3 S2,P4 S2,P5 S2,P6 S3,P1 S3,P3 S3,P6 S1,P4 S1,P5 S1,P1
106. DEMO 5 S1,P2 Transaction time = now (showing all SP relvars) S1,P3 S2,P4 S2,P5 S2,P6 S3,P1 S3,P3 S3,P6 S1,P4 S1,P5 S1,P1 QUERY A – Page 74 List of dates each supplier was able to supply at least one part S1 S1 S3 S2
107. DEMO 5 Transaction time = now (showing all SP relvars) S2,P4 S2,P5 S2,P6 S3,P1 S3,P3 S3,P6 S1,P4 S1,P5 QUERY B – Page 75 List of dates each supplier was unable to supply at least one part S1,P2 S1,P3 S1,P1 S1 S1 S1 S2 S2 S3 S3
111. DEMO 6 Dept 10, Sales, New York Transaction time = now (showing Dept relvar) t28(now)
112. DEMO 6 Dept 10, Sales, New York Transaction time = now (showing Dept relvars) Dept 20, Finance, New York t29(now)
113. DEMO 6 Dept 10, Sales, New York Transaction time = now (showing Dept/Emp relvars) Dept 20, Finance, New York t30(now) Emp 1, John, Clerk,…,Dept 10
115. DEMO 6 Dept 10, Sales, New York Transaction time = now Dept 20, Finance, New York t31(now+20) Emp 1, John, Clerk,…,Dept 10 (showing Dept/Emp relvars)
117. DEMO 6 Dept 10, Sales, New York Transaction time = now Dept 20, Finance, New York t32(now) Emp 1, John, Clerk,…,Dept 10 ORA-20001: :Integrity Constraint violated – parent key not found delete restrict (showing Dept/Emp relvars)
118. DEMO 6 Dept 10, Sales, New York Transaction time = now Dept 20, Finance, New York t33(now) Emp 1, John, Clerk,…,Dept 20 delete cascade (showing Dept/Emp relvars)
120. DEMO 6 Dept 10, Sales, New York Transaction time = now Dept 20, Finance, New York t33(now) Emp 1, John, Clerk,…,Dept 20 transferable (showing Dept/Emp relvars)
121. DEMO 6 Dept 10, Sales, New York Transaction time = now Dept 20, Finance, New York t34(now) Emp 1, John, Clerk,…,Dept 20 Non transferable ORA-20001: :Illegal attempt to modify non-transferable foreign key. (showing Dept/Emp relvars)
122. DEMO 6 Dept 10, Sales, New York Transaction time = now Dept 20, Finance, New York t34(now) Emp 1, John, Clerk,…,Dept 20 Non transferable (showing Dept/Emp relvars)
123.
124.
125. A Q & Q U E S T I O N S A N S W E R S Rob Squire UK Consulting [email_address]