The document discusses modifications to temporal databases with valid time. It describes implicit timestamping where timestamps are system-generated. Valid time insert adds a row with a valid from timestamp and "now" as the valid to. Valid time update sets the valid to of the old row and adds a new row with the new valid from and "now". Valid time delete sets the valid to timestamp of a row to the current time.
An overview of typical queries on a temporal database, e.g., temporal natural join, temporal coalescing, or temporal set operators. Examples are provided using valid-time, transaction-time and bitemporal databases.
The document discusses temporal databases and time-varying data. It provides definitions and examples of temporal databases, time-varying data, and the two dimensions of time - valid and transaction time. It also summarizes different approaches to implementing temporal databases and reasons for their increasing relevance.
Scott Bailey
Few things we model in our databases are as complicated as time. The major database vendors have struggled for years with implementing the base data types to represent time. And the capabilities and functionality vary wildly among databases. Fortunately PostgreSQL has one of the best implementations out there. We will look at PostgreSQL's core functionality, discuss temporal extensions, modeling temporal data, time travel and bitemporal data.
The document discusses adding temporal capabilities to PostgreSQL. It proposes incorporating primitives for interval processing, including normalization and alignment operators. The primitives allow reducing temporal operations to traditional database operations on interval fragments. Reduction rules provide a blueprint for implementing the primitives within PostgreSQL's query execution framework. An implementation in a PostgreSQL prototype demonstrates the approach.
This document discusses using SQL/XML on Oracle databases. It provides an overview and outlines how to:
1. Extract relational data from tables and represent it as XML using SQL/XML publishing functions
2. Store XML data in the database using the XML data type
3. Transform XML data back into relational tables
The examples show how to start with simple XML generation and build up to a well-formed XML document with headers, root elements, and XSLT references.
This document discusses temporal databases. It begins with an introduction that defines a temporal database as one that contains time-varying data and understands the passage of time. It then provides background on the history of temporal databases, including how they were developed to address limitations in early databases. The focus and discussion sections explain key aspects of temporal databases, including their features, implementations, and forms (valid time and transaction time). The conclusion reiterates that temporal databases express changing data over real time and make updating and querying time-related information easier.
An overview of typical queries on a temporal database, e.g., temporal natural join, temporal coalescing, or temporal set operators. Examples are provided using valid-time, transaction-time and bitemporal databases.
The document discusses temporal databases and time-varying data. It provides definitions and examples of temporal databases, time-varying data, and the two dimensions of time - valid and transaction time. It also summarizes different approaches to implementing temporal databases and reasons for their increasing relevance.
Scott Bailey
Few things we model in our databases are as complicated as time. The major database vendors have struggled for years with implementing the base data types to represent time. And the capabilities and functionality vary wildly among databases. Fortunately PostgreSQL has one of the best implementations out there. We will look at PostgreSQL's core functionality, discuss temporal extensions, modeling temporal data, time travel and bitemporal data.
The document discusses adding temporal capabilities to PostgreSQL. It proposes incorporating primitives for interval processing, including normalization and alignment operators. The primitives allow reducing temporal operations to traditional database operations on interval fragments. Reduction rules provide a blueprint for implementing the primitives within PostgreSQL's query execution framework. An implementation in a PostgreSQL prototype demonstrates the approach.
This document discusses using SQL/XML on Oracle databases. It provides an overview and outlines how to:
1. Extract relational data from tables and represent it as XML using SQL/XML publishing functions
2. Store XML data in the database using the XML data type
3. Transform XML data back into relational tables
The examples show how to start with simple XML generation and build up to a well-formed XML document with headers, root elements, and XSLT references.
This document discusses temporal databases. It begins with an introduction that defines a temporal database as one that contains time-varying data and understands the passage of time. It then provides background on the history of temporal databases, including how they were developed to address limitations in early databases. The focus and discussion sections explain key aspects of temporal databases, including their features, implementations, and forms (valid time and transaction time). The conclusion reiterates that temporal databases express changing data over real time and make updating and querying time-related information easier.
The DE-9IM Matrix in Details using ST_Relate: In Picture and SQLtorp42
The DE-9IM matrix is the foundation for understanding how spatial relationships are implemented in DBMSs like PostgreSQL, Oracle, and Microsoft SQL Server. This presentation makes a structure walk-through of most of the cases using a very large number of examples.
An overview of ER-diagrams including entity sets, relationship sets, and attributes. The four attributes types are covered and cardinality constraints. Further partial or full participation is discussed.
An introduction to the XPath XML query possibilities. In particular, there is a focus on the abbreviations that makes XPath efficient to use. A larger section is allocated to explain and illustrated the use of axes in XPath
Introduction to the usage of DTDs in connection with XML documents. Elements and attributes are introduced in details. Use of ID, IDREF, and IDREFS for uniqueness and referring to elements are illustrated using a number of examples.
A comparison of a database table to an XML document. There is an overview of basic XML concepts suchs as attribute, element, entity, and tag. Data centric and document centric XML document are covered.
Introduction to AI for Nonprofits with Tapp NetworkTechSoup
Dive into the world of AI! Experts Jon Hill and Tareq Monaur will guide you through AI's role in enhancing nonprofit websites and basic marketing strategies, making it easy to understand and apply.
A review of the growth of the Israel Genealogy Research Association Database Collection for the last 12 months. Our collection is now passed the 3 million mark and still growing. See which archives have contributed the most. See the different types of records we have, and which years have had records added. You can also see what we have for the future.
বাংলাদেশের অর্থনৈতিক সমীক্ষা ২০২৪ [Bangladesh Economic Review 2024 Bangla.pdf] কম্পিউটার , ট্যাব ও স্মার্ট ফোন ভার্সন সহ সম্পূর্ণ বাংলা ই-বুক বা pdf বই " সুচিপত্র ...বুকমার্ক মেনু 🔖 ও হাইপার লিংক মেনু 📝👆 যুক্ত ..
আমাদের সবার জন্য খুব খুব গুরুত্বপূর্ণ একটি বই ..বিসিএস, ব্যাংক, ইউনিভার্সিটি ভর্তি ও যে কোন প্রতিযোগিতা মূলক পরীক্ষার জন্য এর খুব ইম্পরট্যান্ট একটি বিষয় ...তাছাড়া বাংলাদেশের সাম্প্রতিক যে কোন ডাটা বা তথ্য এই বইতে পাবেন ...
তাই একজন নাগরিক হিসাবে এই তথ্য গুলো আপনার জানা প্রয়োজন ...।
বিসিএস ও ব্যাংক এর লিখিত পরীক্ষা ...+এছাড়া মাধ্যমিক ও উচ্চমাধ্যমিকের স্টুডেন্টদের জন্য অনেক কাজে আসবে ...
This slide is special for master students (MIBS & MIFB) in UUM. Also useful for readers who are interested in the topic of contemporary Islamic banking.
How to Add Chatter in the odoo 17 ERP ModuleCeline George
In Odoo, the chatter is like a chat tool that helps you work together on records. You can leave notes and track things, making it easier to talk with your team and partners. Inside chatter, all communication history, activity, and changes will be displayed.
A Strategic Approach: GenAI in EducationPeter Windle
Artificial Intelligence (AI) technologies such as Generative AI, Image Generators and Large Language Models have had a dramatic impact on teaching, learning and assessment over the past 18 months. The most immediate threat AI posed was to Academic Integrity with Higher Education Institutes (HEIs) focusing their efforts on combating the use of GenAI in assessment. Guidelines were developed for staff and students, policies put in place too. Innovative educators have forged paths in the use of Generative AI for teaching, learning and assessments leading to pockets of transformation springing up across HEIs, often with little or no top-down guidance, support or direction.
This Gasta posits a strategic approach to integrating AI into HEIs to prepare staff, students and the curriculum for an evolving world and workplace. We will highlight the advantages of working with these technologies beyond the realm of teaching, learning and assessment by considering prompt engineering skills, industry impact, curriculum changes, and the need for staff upskilling. In contrast, not engaging strategically with Generative AI poses risks, including falling behind peers, missed opportunities and failing to ensure our graduates remain employable. The rapid evolution of AI technologies necessitates a proactive and strategic approach if we are to remain relevant.
it describes the bony anatomy including the femoral head , acetabulum, labrum . also discusses the capsule , ligaments . muscle that act on the hip joint and the range of motion are outlined. factors affecting hip joint stability and weight transmission through the joint are summarized.
How to Fix the Import Error in the Odoo 17Celine George
An import error occurs when a program fails to import a module or library, disrupting its execution. In languages like Python, this issue arises when the specified module cannot be found or accessed, hindering the program's functionality. Resolving import errors is crucial for maintaining smooth software operation and uninterrupted development processes.
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Dr. Vinod Kumar Kanvaria
Exploiting Artificial Intelligence for Empowering Researchers and Faculty,
International FDP on Fundamentals of Research in Social Sciences
at Integral University, Lucknow, 06.06.2024
By Dr. Vinod Kumar Kanvaria
This presentation includes basic of PCOS their pathology and treatment and also Ayurveda correlation of PCOS and Ayurvedic line of treatment mentioned in classics.
The DE-9IM Matrix in Details using ST_Relate: In Picture and SQLtorp42
The DE-9IM matrix is the foundation for understanding how spatial relationships are implemented in DBMSs like PostgreSQL, Oracle, and Microsoft SQL Server. This presentation makes a structure walk-through of most of the cases using a very large number of examples.
An overview of ER-diagrams including entity sets, relationship sets, and attributes. The four attributes types are covered and cardinality constraints. Further partial or full participation is discussed.
An introduction to the XPath XML query possibilities. In particular, there is a focus on the abbreviations that makes XPath efficient to use. A larger section is allocated to explain and illustrated the use of axes in XPath
Introduction to the usage of DTDs in connection with XML documents. Elements and attributes are introduced in details. Use of ID, IDREF, and IDREFS for uniqueness and referring to elements are illustrated using a number of examples.
A comparison of a database table to an XML document. There is an overview of basic XML concepts suchs as attribute, element, entity, and tag. Data centric and document centric XML document are covered.
Introduction to AI for Nonprofits with Tapp NetworkTechSoup
Dive into the world of AI! Experts Jon Hill and Tareq Monaur will guide you through AI's role in enhancing nonprofit websites and basic marketing strategies, making it easy to understand and apply.
A review of the growth of the Israel Genealogy Research Association Database Collection for the last 12 months. Our collection is now passed the 3 million mark and still growing. See which archives have contributed the most. See the different types of records we have, and which years have had records added. You can also see what we have for the future.
বাংলাদেশের অর্থনৈতিক সমীক্ষা ২০২৪ [Bangladesh Economic Review 2024 Bangla.pdf] কম্পিউটার , ট্যাব ও স্মার্ট ফোন ভার্সন সহ সম্পূর্ণ বাংলা ই-বুক বা pdf বই " সুচিপত্র ...বুকমার্ক মেনু 🔖 ও হাইপার লিংক মেনু 📝👆 যুক্ত ..
আমাদের সবার জন্য খুব খুব গুরুত্বপূর্ণ একটি বই ..বিসিএস, ব্যাংক, ইউনিভার্সিটি ভর্তি ও যে কোন প্রতিযোগিতা মূলক পরীক্ষার জন্য এর খুব ইম্পরট্যান্ট একটি বিষয় ...তাছাড়া বাংলাদেশের সাম্প্রতিক যে কোন ডাটা বা তথ্য এই বইতে পাবেন ...
তাই একজন নাগরিক হিসাবে এই তথ্য গুলো আপনার জানা প্রয়োজন ...।
বিসিএস ও ব্যাংক এর লিখিত পরীক্ষা ...+এছাড়া মাধ্যমিক ও উচ্চমাধ্যমিকের স্টুডেন্টদের জন্য অনেক কাজে আসবে ...
This slide is special for master students (MIBS & MIFB) in UUM. Also useful for readers who are interested in the topic of contemporary Islamic banking.
How to Add Chatter in the odoo 17 ERP ModuleCeline George
In Odoo, the chatter is like a chat tool that helps you work together on records. You can leave notes and track things, making it easier to talk with your team and partners. Inside chatter, all communication history, activity, and changes will be displayed.
A Strategic Approach: GenAI in EducationPeter Windle
Artificial Intelligence (AI) technologies such as Generative AI, Image Generators and Large Language Models have had a dramatic impact on teaching, learning and assessment over the past 18 months. The most immediate threat AI posed was to Academic Integrity with Higher Education Institutes (HEIs) focusing their efforts on combating the use of GenAI in assessment. Guidelines were developed for staff and students, policies put in place too. Innovative educators have forged paths in the use of Generative AI for teaching, learning and assessments leading to pockets of transformation springing up across HEIs, often with little or no top-down guidance, support or direction.
This Gasta posits a strategic approach to integrating AI into HEIs to prepare staff, students and the curriculum for an evolving world and workplace. We will highlight the advantages of working with these technologies beyond the realm of teaching, learning and assessment by considering prompt engineering skills, industry impact, curriculum changes, and the need for staff upskilling. In contrast, not engaging strategically with Generative AI poses risks, including falling behind peers, missed opportunities and failing to ensure our graduates remain employable. The rapid evolution of AI technologies necessitates a proactive and strategic approach if we are to remain relevant.
it describes the bony anatomy including the femoral head , acetabulum, labrum . also discusses the capsule , ligaments . muscle that act on the hip joint and the range of motion are outlined. factors affecting hip joint stability and weight transmission through the joint are summarized.
How to Fix the Import Error in the Odoo 17Celine George
An import error occurs when a program fails to import a module or library, disrupting its execution. In languages like Python, this issue arises when the specified module cannot be found or accessed, hindering the program's functionality. Resolving import errors is crucial for maintaining smooth software operation and uninterrupted development processes.
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Dr. Vinod Kumar Kanvaria
Exploiting Artificial Intelligence for Empowering Researchers and Faculty,
International FDP on Fundamentals of Research in Social Sciences
at Integral University, Lucknow, 06.06.2024
By Dr. Vinod Kumar Kanvaria
This presentation includes basic of PCOS their pathology and treatment and also Ayurveda correlation of PCOS and Ayurvedic line of treatment mentioned in classics.
Executive Directors Chat Leveraging AI for Diversity, Equity, and InclusionTechSoup
Let’s explore the intersection of technology and equity in the final session of our DEI series. Discover how AI tools, like ChatGPT, can be used to support and enhance your nonprofit's DEI initiatives. Participants will gain insights into practical AI applications and get tips for leveraging technology to advance their DEI goals.
This presentation was provided by Steph Pollock of The American Psychological Association’s Journals Program, and Damita Snow, of The American Society of Civil Engineers (ASCE), for the initial session of NISO's 2024 Training Series "DEIA in the Scholarly Landscape." Session One: 'Setting Expectations: a DEIA Primer,' was held June 6, 2024.
हिंदी वर्णमाला पीपीटी, hindi alphabet PPT presentation, hindi varnamala PPT, Hindi Varnamala pdf, हिंदी स्वर, हिंदी व्यंजन, sikhiye hindi varnmala, dr. mulla adam ali, hindi language and literature, hindi alphabet with drawing, hindi alphabet pdf, hindi varnamala for childrens, hindi language, hindi varnamala practice for kids, https://www.drmullaadamali.com
1. Temporal Databases: Modification
Kristian Torp
Department of Computer Science
Aalborg University
people.cs.aau.dk/˜torp
torp@cs.aau.dk
November 2, 2015
daisy.aau.dk
Kristian Torp (Aalborg University) Temporal Databases: Modification November 2, 2015 1 / 57
2. Outline
1 Transaction-Time State Tables
2 Valid-Time State Tables
Implicit Timestamping
Explicit Timestamping
3 Bitemporal State Tables
Implicit Timestamping
Explicit Timestaming
4 Summary
Kristian Torp (Aalborg University) Temporal Databases: Modification November 2, 2015 2 / 57
3. Learning Goals
Learning Goals
Understand modifications on transaction-time tables
Understand modifications on valid-time tables
Implicit timestamping, system supplied
Explicit timestamping, user supplied
Understand modifications on bitemporal tables
Implicit timestamping, system supplied
Explicit timestamping, user supplied
now and UC in modifications
Note
We will use integers for timestamps
simply because it takes up less space on slides
Will focus on state tables
Most expressive
Hardest to understand (compared to event)
Kristian Torp (Aalborg University) Temporal Databases: Modification November 2, 2015 3 / 57
4. Outline
1 Transaction-Time State Tables
2 Valid-Time State Tables
Implicit Timestamping
Explicit Timestamping
3 Bitemporal State Tables
Implicit Timestamping
Explicit Timestaming
4 Summary
Kristian Torp (Aalborg University) Temporal Databases: Modification November 2, 2015 4 / 57
5. Transaction-Time Example, Implicit Timestamping
Note
Implicit means timestamps values are always system supplied
Logical Operations
Time 4: Hire Ann to work in the HR department
Time 8: Move Ann to the RD department
Time 12: Hire Bart to work in the HR department
Time 16: Fire Bart
Kristian Torp (Aalborg University) Temporal Databases: Modification November 2, 2015 5 / 57
6. Transaction-Time Example, Implicit Timestamping
Note
Implicit means timestamps values are always system supplied
Logical Operations
Time 4: Hire Ann to work in the HR department
Time 8: Move Ann to the RD department
Time 12: Hire Bart to work in the HR department
Time 16: Fire Bart
Example (At Time 4: Transaction-Time Insert)
Name Dept tts tte
Ann HR 4 UC
Kristian Torp (Aalborg University) Temporal Databases: Modification November 2, 2015 5 / 57
7. Transaction-Time Example, Implicit Timestamping
Note
Implicit means timestamps values are always system supplied
Logical Operations
Time 4: Hire Ann to work in the HR department
Time 8: Move Ann to the RD department
Time 12: Hire Bart to work in the HR department
Time 16: Fire Bart
Example (At Time 8: Transaction-Time Update)
Name Dept tts tte
Ann HR 4 8
Ann RD 8 UC
Kristian Torp (Aalborg University) Temporal Databases: Modification November 2, 2015 5 / 57
8. Transaction-Time Example, Implicit Timestamping
Note
Implicit means timestamps values are always system supplied
Logical Operations
Time 4: Hire Ann to work in the HR department
Time 8: Move Ann to the RD department
Time 12: Hire Bart to work in the HR department
Time 16: Fire Bart
Example (At Time 12: Transaction-Time Insert)
Name Dept tts tte
Ann HR 4 8
Ann RD 8 UC
Bart HR 12 UC
Kristian Torp (Aalborg University) Temporal Databases: Modification November 2, 2015 5 / 57
9. Transaction-Time Example, Implicit Timestamping
Note
Implicit means timestamps values are always system supplied
Logical Operations
Time 4: Hire Ann to work in the HR department
Time 8: Move Ann to the RD department
Time 12: Hire Bart to work in the HR department
Time 16: Fire Bart
Example (At Time 16: Transaction-Time Delete)
Name Dept tts tte
Ann HR 4 8
Ann RD 8 UC
Bart HR 12 16
Kristian Torp (Aalborg University) Temporal Databases: Modification November 2, 2015 5 / 57
10. Transaction-Time Insert
Logical Operations
Time 4: Hire Ann to work in the HR department
Example (Emps as of Time 6)
VT
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Ann, HR
Example (Table)
Name Dept tts tte
Ann HR 4 UC
Kristian Torp (Aalborg University) Temporal Databases: Modification November 2, 2015 6 / 57
11. Transaction-Time Update
Logical Operations
Time 4: Hire Ann to work in the HR department
Time 8: Move Ann to the RD department
Example (Emps as of Time 10)
VT
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Ann, RD
Ann, HR
Example (Table)
Name Dept tts tte
Ann HR 4 8
Ann RD 8 UC
Kristian Torp (Aalborg University) Temporal Databases: Modification November 2, 2015 7 / 57
12. Transaction-Time Insert (Again)
Logical Operations
Time 4: Hire Ann to work in the HR department
Time 8: Move Ann to the RD department
Time 12: Hire Bart to work in the HR department
Example (Emps as of Time 14)
VT
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Bart, RD
Ann, RD
Ann, HR
Example (Table)
Name Dept tts tte
Ann HR 4 8
Ann RD 8 UC
Bart HR 12 UC
Kristian Torp (Aalborg University) Temporal Databases: Modification November 2, 2015 8 / 57
13. Transaction-Time Delete
Logical Operations
Time 4: Hire Ann to work in the HR department
Time 8: Move Ann to the RD department
Time 12: Hire Bart to work in the HR department
Time 16: Fire Bart
Example (Emps as of Time 18)
VT
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Bart, RD
Ann, RD
Ann, HR
Example (Table)
Name Dept tts tte
Ann HR 4 8
Ann RD 8 UC
Bart HR 12 16
Kristian Torp (Aalborg University) Temporal Databases: Modification November 2, 2015 9 / 57
14. Quiz: Transaction-Time State Table
Logical Operations
Time 4 Hire Curt to work in the HR department
Time 8 Move Curt to the RD department
Time 12 Fire Curt from the company
Name Dept tts tte
Curt HR 4 UC
Curt RD 8 UC
Name Dept tts tte
Curt HR 4 8
Curt RD 8 UC
A B
Name Dept tts tte
Curt HR 4 8
Curt RD 8 12
Name Dept tts tte
Curt HR 4 8
Curt RD 8 12
Curt RD 12 UC
C D
Kristian Torp (Aalborg University) Temporal Databases: Modification November 2, 2015 10 / 57
15. Summary: Transaction-Time Modifications
Main Points
Transaction time always system supplied values
Insert: Explicit attributes + [current time, UC)
Delete: Set column tte to current time
Update: A delete followed by an insert
Note
System always supplies the timestamps!!!
UC = Until Changed
Also called now or nobind-now
Queries on current state of table work as before
Backwards compatibility ⇒ no rewrite of existing code
Logical deletes (newer physical deletes)
More than one insert/update/delete per time unit
Physical database design split current from history
Kristian Torp (Aalborg University) Temporal Databases: Modification November 2, 2015 11 / 57
16. Outline
1 Transaction-Time State Tables
2 Valid-Time State Tables
Implicit Timestamping
Explicit Timestamping
3 Bitemporal State Tables
Implicit Timestamping
Explicit Timestaming
4 Summary
Kristian Torp (Aalborg University) Temporal Databases: Modification November 2, 2015 12 / 57
17. Outline
1 Transaction-Time State Tables
2 Valid-Time State Tables
Implicit Timestamping
Explicit Timestamping
3 Bitemporal State Tables
Implicit Timestamping
Explicit Timestaming
4 Summary
Kristian Torp (Aalborg University) Temporal Databases: Modification November 2, 2015 13 / 57
18. Valid-Time Implicit Timestamping
Note
Recall, implicit means timestamps values are always system supplied
Logical Operations
time: 4 Hire Ann to work in the HR department
time: 8 Move Ann to the RD department
time: 12 Hire Bart to work in the HR department
time: 16 Fire Bart
Kristian Torp (Aalborg University) Temporal Databases: Modification November 2, 2015 14 / 57
19. Valid-Time Implicit Timestamping
Note
Recall, implicit means timestamps values are always system supplied
Logical Operations
time: 4 Hire Ann to work in the HR department
time: 8 Move Ann to the RD department
time: 12 Hire Bart to work in the HR department
time: 16 Fire Bart
Example (At Time 4: Valid-Time Insert)
Name Dept vts vte
Ann HR 4 now
Kristian Torp (Aalborg University) Temporal Databases: Modification November 2, 2015 14 / 57
20. Valid-Time Implicit Timestamping
Note
Recall, implicit means timestamps values are always system supplied
Logical Operations
time: 4 Hire Ann to work in the HR department
time: 8 Move Ann to the RD department
time: 12 Hire Bart to work in the HR department
time: 16 Fire Bart
Example (At Time 8: Valid-Time Update)
Name Dept vts vte
Ann HR 4 8
Ann RD 8 now
Kristian Torp (Aalborg University) Temporal Databases: Modification November 2, 2015 14 / 57
21. Valid-Time Implicit Timestamping
Note
Recall, implicit means timestamps values are always system supplied
Logical Operations
time: 4 Hire Ann to work in the HR department
time: 8 Move Ann to the RD department
time: 12 Hire Bart to work in the HR department
time: 16 Fire Bart
Example (At Time 12: Valid-Time Insert)
Name Dept vts vte
Ann HR 4 8
Ann RD 8 now
Bart HR 12 now
Kristian Torp (Aalborg University) Temporal Databases: Modification November 2, 2015 14 / 57
22. Valid-Time Implicit Timestamping
Note
Recall, implicit means timestamps values are always system supplied
Logical Operations
time: 4 Hire Ann to work in the HR department
time: 8 Move Ann to the RD department
time: 12 Hire Bart to work in the HR department
time: 16 Fire Bart
Example (At Time 16: Valid-Time Delete)
Name Dept vts vte
Ann HR 4 8
Ann RD 8 now
Bart HR 12 16
Kristian Torp (Aalborg University) Temporal Databases: Modification November 2, 2015 14 / 57
23. Valid-Time Insert
Logical Operations
Time 4: Hire Ann to work in the HR department
Example (Emps as of Time 6)
VT
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Ann, HR
Example (Table)
Name Dept vts vte
Ann HR 4 now
Kristian Torp (Aalborg University) Temporal Databases: Modification November 2, 2015 15 / 57
24. Valid-Time Update
Logical Operations
Time 4: Hire Ann to work in the HR department
Time 8: Move Ann to the RD department
Example (Emps as of Time 10)
VT
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Ann, RD
Ann, HR
Example (Table)
Name Dept vts vte
Ann HR 4 8
Ann RD 4 now
Kristian Torp (Aalborg University) Temporal Databases: Modification November 2, 2015 16 / 57
25. Valid-Time Insert (Again)
Logical Operations
Time 4: Hire Ann to work in the HR department
Time 8: Move Ann to the RD department
Time 12: Hire Bart to work in the HR department
Example (Emps as of Time 14)
VT
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Bart, RD
Ann, RD
Ann, HR
Example (Table)
Name Dept vts vte
Ann HR 4 8
Ann RD 6 now
Bart HR 12 now
Kristian Torp (Aalborg University) Temporal Databases: Modification November 2, 2015 17 / 57
26. Valid-Time Delete
Logical Operations
Time 4: Hire Ann to work in the HR department
Time 8: Move Ann to the RD department
Time 12: Hire Bart to work in the HR department
Time 16: Fire Bart
Example (Emps as of Time 18)
VT
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Bart, RD
Ann, RD
Ann, HR
Example (Table)
Name Dept vts vte
Ann HR 4 8
Ann RD 6 now
Bart HR 12 16
Kristian Torp (Aalborg University) Temporal Databases: Modification November 2, 2015 18 / 57
27. Summary: Implicit Timestamping
Temporal Modifications
Insert: explicit attributes + [current time, now)
Delete: Set column vte to current time
Update: A delete followed by an insert
Note
Implicit valid-time and transaction-time is handled similarly
System can supplies the timestamps!!!
Operations on current state of table as before
Logical deletes (no physical deletes in these cases!!!)
Kristian Torp (Aalborg University) Temporal Databases: Modification November 2, 2015 19 / 57
28. Quiz: Modifications to Table
Logical Operations
time:1 Hire Curt to work in the HR department
time:12 Fire Curt
time:20 Hire Dan to work in the HR department
Name Dept vts vte
Curt HR 1 12
Dan HR 20 now
Name Dept vts vte
Curt HR 1 12
Curt HR 12 now
Dan HR 20 now
A B
Name Dept vts vte
Curt HR 1 now
Curt HR 12 now
Dan HR 20 now
Name Dept vts vte
Curt HR 1 12
Curt HR 12 20
Dan HR 20 now
C D
Kristian Torp (Aalborg University) Temporal Databases: Modification November 2, 2015 20 / 57
29. Quiz: Table to Modifications
Name Dept vts vte
Dan HR 1 now
Eli RD 10 20
A
Time 1 Hire Dan, HR
Time 10 Hire Eli, RD
B
Time 1 Hire Dan, HR
Time 10 Hire Eli, RD
Time 20 Fire Eli
C
Time 1 Hire Dan, HR
Time 10 Hire Eli, RD
Time 10 Fire Dan
Time 20 Fire Eli
D
Time 1 Hire Dan, HR
Time 10 Hire Eli, RD
Time 10 Eli to RD
Time 20 Fire Eli
Kristian Torp (Aalborg University) Temporal Databases: Modification November 2, 2015 21 / 57
30. Quiz: Conceptual Difference?
Example (Departments)
Name Dept vts vte
Ann HR 1 10
Ann RD 10 20
Ann HR 20 40
Name Dept vts vte
Ann HR 1 15
Ann RD 10 20
Ann HR 20 40
Kristian Torp (Aalborg University) Temporal Databases: Modification November 2, 2015 22 / 57
31. Quiz: Conceptual Difference?
Example (Departments)
Name Dept vts vte
Ann HR 1 10
Ann RD 10 20
Ann HR 20 40
Name Dept vts vte
Ann HR 1 15
Ann RD 10 20
Ann HR 20 40
Example (Salaries)
Name Salary vts vte
Ann 40 1 10
Ann 50 10 20
Ann 70 20 40
Name Salary vts vte
Ann 40 1 15
Ann 50 10 20
Ann 70 20 40
Kristian Torp (Aalborg University) Temporal Databases: Modification November 2, 2015 22 / 57
32. Outline
1 Transaction-Time State Tables
2 Valid-Time State Tables
Implicit Timestamping
Explicit Timestamping
3 Bitemporal State Tables
Implicit Timestamping
Explicit Timestaming
4 Summary
Kristian Torp (Aalborg University) Temporal Databases: Modification November 2, 2015 23 / 57
33. Valid-Time Example: Case One
Note
Exlicit means timestamps values are user supplied
Logical Operations
Time 4: Hire Ann HR department [2, 14)
Time 8: Hire Bart RD department [14, now)
Time 12: Fire Ann
Time 16: Move Bart to HR department
Kristian Torp (Aalborg University) Temporal Databases: Modification November 2, 2015 24 / 57
34. Valid-Time Example: Case One
Note
Exlicit means timestamps values are user supplied
Logical Operations
Time 4: Hire Ann HR department [2, 14)
Time 8: Hire Bart RD department [14, now)
Time 12: Fire Ann
Time 16: Move Bart to HR department
Example (At Time 4: Valid-Time Insert)
Name Dept vts vte
Ann HR 2 14
Kristian Torp (Aalborg University) Temporal Databases: Modification November 2, 2015 24 / 57
35. Valid-Time Example: Case One
Note
Exlicit means timestamps values are user supplied
Logical Operations
Time 4: Hire Ann HR department [2, 14)
Time 8: Hire Bart RD department [14, now)
Time 12: Fire Ann
Time 16: Move Bart to HR department
Example (At Time 8: Valid-Time Insert)
Name Dept vts vte
Ann HR 2 14
Bart RD 14 now
Kristian Torp (Aalborg University) Temporal Databases: Modification November 2, 2015 24 / 57
36. Valid-Time Example: Case One
Note
Exlicit means timestamps values are user supplied
Logical Operations
Time 4: Hire Ann HR department [2, 14)
Time 8: Hire Bart RD department [14, now)
Time 12: Fire Ann
Time 16: Move Bart to HR department
Example (At Time 12: Valid-Time Delete)
Name Dept vts vte
Ann HR 2 12
Bart RD 14 now
Kristian Torp (Aalborg University) Temporal Databases: Modification November 2, 2015 24 / 57
37. Valid-Time Example: Case One
Note
Exlicit means timestamps values are user supplied
Logical Operations
Time 4: Hire Ann HR department [2, 14)
Time 8: Hire Bart RD department [14, now)
Time 12: Fire Ann
Time 16: Move Bart to HR department
Example (At Time 16: Valid-Time Update)
Name Dept vts vte
Ann HR 2 12
Bart RD 14 16
Bart HR 16 now
Kristian Torp (Aalborg University) Temporal Databases: Modification November 2, 2015 24 / 57
38. Valid-Time Insert
Logical Operations
Time:4 Hire Ann HR department [2, 14)
Example (Emps at Time 6)
VT
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Ann, HR
Example (Table)
Name Dept vts vte
Ann HR 2 14
Kristian Torp (Aalborg University) Temporal Databases: Modification November 2, 2015 25 / 57
39. Valid-Time Insert with now
Logical Operations
Time 4: Hire Ann HR department [2, 14)
Time 8: Hire Bart RD department [14, now)
Example (Emps as of Time 10)
VT
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Bart, RD
Ann, HR
Example (Table)
Name Dept vts vte
Ann HR 2 14
Bart RD 14 now
Kristian Torp (Aalborg University) Temporal Databases: Modification November 2, 2015 26 / 57
40. Valid-Time Delete
Logical Operations
Time 4: Hire Ann HR department [2, 14)
Time 8: Hire Bart RD department [14, now)
Time 12: Fire Ann
Example (Emps as of Time 15)
VT
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Bart, RD
Ann, HR
Example (Table)
Name Dept vts vte
Ann HR 2 12
Bart RD 14 now
Kristian Torp (Aalborg University) Temporal Databases: Modification November 2, 2015 27 / 57
41. Valid-Time Update
Logical Operations
Time 4: Hire Ann HR department [2, 14)
Time 8: Hire Bart RD department [14, now)
Time 12: Fire Ann
Time 16: Move Bart to HR department
Example (Emps as of Time 18)
VT
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Bart, HR
Bart, RD
Ann, HR
Example (Table)
Name Dept vts vte
Ann HR 2 12
Bart RD 14 16
Bart HR 16 now
Kristian Torp (Aalborg University) Temporal Databases: Modification November 2, 2015 28 / 57
42. Valid-Time Example: Case Two
Logical Operations
Time 4: Hire Ann HR department [2, 18)
Time 8: Hire Bart RD Department [14, 24)
Time 12: Ann on leave [6, 14)
Time 16: Remove Bart from HR for the period [8, 20)
Kristian Torp (Aalborg University) Temporal Databases: Modification November 2, 2015 29 / 57
43. Valid-Time Example: Case Two
Logical Operations
Time 4: Hire Ann HR department [2, 18)
Time 8: Hire Bart RD Department [14, 24)
Time 12: Ann on leave [6, 14)
Time 16: Remove Bart from HR for the period [8, 20)
Example (At Time 4: Valid-Time Insert)
Name Dept vts vte
Ann HR 2 18
Kristian Torp (Aalborg University) Temporal Databases: Modification November 2, 2015 29 / 57
44. Valid-Time Example: Case Two
Logical Operations
Time 4: Hire Ann HR department [2, 18)
Time 8: Hire Bart RD Department [14, 24)
Time 12: Ann on leave [6, 14)
Time 16: Remove Bart from HR for the period [8, 20)
Example (At Time 8: Valid-Time Insert)
Name Dept vts vte
Ann HR 2 18
Bart RD 14 24
Kristian Torp (Aalborg University) Temporal Databases: Modification November 2, 2015 29 / 57
45. Valid-Time Example: Case Two
Logical Operations
Time 4: Hire Ann HR department [2, 18)
Time 8: Hire Bart RD Department [14, 24)
Time 12: Ann on leave [6, 14)
Time 16: Remove Bart from HR for the period [8, 20)
Example (At Time 12: Valid-Time Update)
Name Dept vts vte
Ann HR 2 6
Ann HR 14 18
Bart RD 14 24
Kristian Torp (Aalborg University) Temporal Databases: Modification November 2, 2015 29 / 57
46. Valid-Time Example: Case Two
Logical Operations
Time 4: Hire Ann HR department [2, 18)
Time 8: Hire Bart RD Department [14, 24)
Time 12: Ann on leave [6, 14)
Time 16: Remove Bart from HR for the period [8, 20)
Example (At Time 16: Valid-Time Delete)
Name Dept vts vte
Ann HR 2 6
Ann HR 14 18
Bart RD 20 24
Kristian Torp (Aalborg University) Temporal Databases: Modification November 2, 2015 29 / 57
47. Valid-Time Insert
Logical Operations
Time 4: Hire Ann HR department [2, 18)
Example (Emps as of Time 6)
VT
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
Ann, HR
Example (Table)
Name Dept vts vte
Ann HR 2 18
Kristian Torp (Aalborg University) Temporal Databases: Modification November 2, 2015 30 / 57
48. Valid-Time Insert (Again)
Logical Operations
Time 4: Hire Ann HR department [2, 18)
Time 8: Hire Bart RD Department [14, 24)
Example (Emps as of Time 10)
VT
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
Bart, RD
Ann, HR
Example (Table)
Name Dept vts vte
Ann HR 2 18
Bart RD 14 24
Kristian Torp (Aalborg University) Temporal Databases: Modification November 2, 2015 31 / 57
49. Valid-Time Update
Logical Operations
Time 4: Hire Ann HR department [2, 18)
Time 8: Hire Bart RD Department [14, 24)
Time 12: Ann on leave [6, 14)
Example (Emps as of Time 15)
VT
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
Ann, HR
Bart, RD
Ann, HR
Example (Table)
Name Dept vts vte
Ann HR 2 6
Ann HR 14 16
Bart RD 14 24
Kristian Torp (Aalborg University) Temporal Databases: Modification November 2, 2015 32 / 57
50. Valid-Time Delete
Logical Operations
Time 4: Hire Ann HR department [2, 18)
Time 8: Hire Bart RD Department [14, 24)
Time 12: Ann on leave [6, 14)
Time 16: Remove Bart from HR for the period [8, 20)
Example (Emps as of Time 18)
VT
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
Ann, HR
Bart, RD
Ann, HR
Example (Table)
Name Dept vts vte
Ann HR 2 6
Ann HR 14 16
Bart RD 20 24
Kristian Torp (Aalborg University) Temporal Databases: Modification November 2, 2015 33 / 57
51. Visualizations of Delete
Example (Result: Zero Rows)
VT
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
Data
Delete
Result
Kristian Torp (Aalborg University) Temporal Databases: Modification November 2, 2015 34 / 57
52. Visualizations of Delete
Example (Result: Zero Rows)
VT
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
Data
Delete
Result
Example (Result: One Row)
VT
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
Data
Delete
Result
Kristian Torp (Aalborg University) Temporal Databases: Modification November 2, 2015 34 / 57
53. Visualizations of Delete
Example (Result: Zero Rows)
VT
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
Data
Delete
Result
Example (Result: One Row)
VT
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
Data
Delete
Result
Example (Result: Two Rows)
VT
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
Data
Delete
Result Result
Kristian Torp (Aalborg University) Temporal Databases: Modification November 2, 2015 34 / 57
54. Valid-Time State Modifications, Explicit Timestamping
Operations
Insert: Explicit attributes + interval supplied
Delete: Remove where delete interval overlaps (for each original row)
0 rows if delete interval totally overlaps
1 row if delete interval left/right overlaps
2 rows if delete interval contained in row interval
Update: Delete followed by insert
Note
User supplies the timestamps
Physical deletes may occur
Kristian Torp (Aalborg University) Temporal Databases: Modification November 2, 2015 35 / 57
55. Outline
1 Transaction-Time State Tables
2 Valid-Time State Tables
Implicit Timestamping
Explicit Timestamping
3 Bitemporal State Tables
Implicit Timestamping
Explicit Timestaming
4 Summary
Kristian Torp (Aalborg University) Temporal Databases: Modification November 2, 2015 36 / 57
56. Outline
1 Transaction-Time State Tables
2 Valid-Time State Tables
Implicit Timestamping
Explicit Timestamping
3 Bitemporal State Tables
Implicit Timestamping
Explicit Timestaming
4 Summary
Kristian Torp (Aalborg University) Temporal Databases: Modification November 2, 2015 37 / 57
57. Bitemporal Example, Implicit Timestamping
Logical Operations
Time 4: Hire Ann to work in the HR department
Time 8: Move Ann to the RD department
Time 12: Hire Bart to work in the HR department
Time 16: Fire Bart
Kristian Torp (Aalborg University) Temporal Databases: Modification November 2, 2015 38 / 57
58. Bitemporal Example, Implicit Timestamping
Logical Operations
Time 4: Hire Ann to work in the HR department
Time 8: Move Ann to the RD department
Time 12: Hire Bart to work in the HR department
Time 16: Fire Bart
Example (At Time 4: Bitemporal Insert)
Name Dept vts vte tts tte
Ann HR 4 now 4 UC
Kristian Torp (Aalborg University) Temporal Databases: Modification November 2, 2015 38 / 57
59. Bitemporal Example, Implicit Timestamping
Logical Operations
Time 4: Hire Ann to work in the HR department
Time 8: Move Ann to the RD department
Time 12: Hire Bart to work in the HR department
Time 16: Fire Bart
Example (At Time 8: Bitemporal Update)
Name Dept vts vte tts tte
Ann HR 4 now 4 8
Ann HR 4 8 8 UC
Ann RD 8 now 8 UC
Kristian Torp (Aalborg University) Temporal Databases: Modification November 2, 2015 38 / 57
60. Bitemporal Example, Implicit Timestamping
Logical Operations
Time 4: Hire Ann to work in the HR department
Time 8: Move Ann to the RD department
Time 12: Hire Bart to work in the HR department
Time 16: Fire Bart
Example (At Time 12: : Bitemporal Insert)
Name Dept vts vte tts tte
Ann HR 4 now 4 8
Ann HR 4 8 8 UC
Ann RD 8 now 8 UC
Bart HR 12 now 12 UC
Kristian Torp (Aalborg University) Temporal Databases: Modification November 2, 2015 38 / 57
61. Bitemporal Example, Implicit Timestamping
Logical Operations
Time 4: Hire Ann to work in the HR department
Time 8: Move Ann to the RD department
Time 12: Hire Bart to work in the HR department
Time 16: Fire Bart
Example (At Time 16: : Bitemporal Delete)
Name Dept vts vte tts tte
Ann HR 4 now 4 8
Ann HR 4 8 8 UC
Ann RD 8 now 8 UC
Bart HR 12 now 12 16
Bart HR 12 16 16 UC
Kristian Torp (Aalborg University) Temporal Databases: Modification November 2, 2015 38 / 57
63. Outline
1 Transaction-Time State Tables
2 Valid-Time State Tables
Implicit Timestamping
Explicit Timestamping
3 Bitemporal State Tables
Implicit Timestamping
Explicit Timestaming
4 Summary
Kristian Torp (Aalborg University) Temporal Databases: Modification November 2, 2015 40 / 57
64. Bitemporal Delete, Explicit Valid Time
Example (Case 1: No changes)
time:1 Insert Ann, HR, [2, 8)
Example (Case 2: Delete entire interval)
time:1 Insert Ann, HR, [2, 8)
time:5 Delete Ann, HR, [1, 10)
Example (Case 3: Delete first part)
time:1 Insert Ann, HR, [2, 8)
time:5 Delete Ann, HR, [1, 5)
Example (Case 4: Delete in the middle)
time:1 Insert Ann, HR, [2, 8)
time:5 Delete Ann, HR, [4, 7)
Kristian Torp (Aalborg University) Temporal Databases: Modification November 2, 2015 41 / 57
65. Bitemporal Delete, Explicit Valid Time, Case 1, Time 10
Example (Case 1: No changes)
time:1 Insert Ann, HR, [2, 8)
Example (Graph)
TT
0 1 2 3 4 5 6 7 8 9 10
VT
0
1
2
3
4
5
6
7
8
9
10
Ann, HR
Example (Table)
Name Dept vts vte tts tte
Ann HR 2 8 1 now
Kristian Torp (Aalborg University) Temporal Databases: Modification November 2, 2015 42 / 57
66. Bitemporal Delete, Explicit Valid Time, Case 2, Time 10
Example (Case 2: Delete entire interval)
time:1 Insert Ann, HR, [2, 8)
time:5 Delete Ann, HR, [1, 10)
Example (Graph)
TT
0 1 2 3 4 5 6 7 8 9 10
VT
0
1
2
3
4
5
6
7
8
9
10
Ann, HR
Example (Table)
Name Dept vts vte tts tte
Ann HR 2 8 1 5
Kristian Torp (Aalborg University) Temporal Databases: Modification November 2, 2015 43 / 57
67. Bitemporal Delete, Explicit Valid Time, Case 3, Time 10
Example (Case 3: Delete first part)
time:1 Insert Ann, HR, [2, 8)
time:5 Delete Ann, HR, [1, 5)
Example (Graph)
TT
0 1 2 3 4 5 6 7 8 9 10
VT
0
1
2
3
4
5
6
7
8
9
10
Ann, HR
Ann, HR
Example (Table)
Name Dept vts vte tts tte
Ann HR 2 8 1 5
Ann HR 5 8 5 UC
Kristian Torp (Aalborg University) Temporal Databases: Modification November 2, 2015 44 / 57
68. Bitemporal Delete, Explicit Valid Time, Case 4, Time 10
Example (Case 4: Delete in the middle)
time:1 Insert Ann, HR, [2, 8)
time:5 Delete Ann, HR, [4, 7)
Example (Graph)
TT
0 1 2 3 4 5 6 7 8 9 10
VT
0
1
2
3
4
5
6
7
8
9
10
Ann, HR
Ann, HR
Ann, HR
Example (Table)
Name Dept vts vte tts tte
Ann HR 2 8 1 5
Ann HR 2 4 5 UC
Ann HR 7 8 5 UC
Kristian Torp (Aalborg University) Temporal Databases: Modification November 2, 2015 45 / 57
76. Assignment: Bitemporal Modification I
Modifications on (Name, Salary)
Time:2 insert Joe, 10
Time:4 insert Tom, 22
Time:10 Update Joe’s salary to 15
Time:12 Delete Tom
Assignments
Show the content of the table emp bt at time 15
Draw the bitemporal graph for the table emp bt
Kristian Torp (Aalborg University) Temporal Databases: Modification November 2, 2015 53 / 57
77. Assignment: Bitemporal Modification II
Name Salary vts vte tts tte
Joe 10 2 now 2 10
Tom 22 4 now 4 12
Joe 10 2 10 10 UC
Joe 15 10 now 10 UC
Tom 22 4 12 4 UC
Kristian Torp (Aalborg University) Temporal Databases: Modification November 2, 2015 54 / 57
79. Outline
1 Transaction-Time State Tables
2 Valid-Time State Tables
Implicit Timestamping
Explicit Timestamping
3 Bitemporal State Tables
Implicit Timestamping
Explicit Timestaming
4 Summary
Kristian Torp (Aalborg University) Temporal Databases: Modification November 2, 2015 56 / 57
80. Summary
Main Points
Implicit timestamps valid-time ≈ transaction-time
Explicit timestamp for valid-time many details
Insert, fairly straight-forward
Delete, complicated because 0, 1, or 2 intervals
Update, is conceptual still a delete followed by an insert!
Many details for bitemporal with explicit timestamping
Again delete the hardest to understand
Update, is conceptual still a delete followed by an insert!
Note
Use half-open intervals, e.g., [10, 15) makes life simpler!
Kristian Torp (Aalborg University) Temporal Databases: Modification November 2, 2015 57 / 57