SlideShare a Scribd company logo
Temporal Databases
Outline
 Spatial Databases
 Indexing, Query processing
 Temporal Databases
 Spatio-temporal
 ….
Temporal DBs – Motivation
 Conventional databases represent the state of an enterprise at a single
moment of time
 Many applications need information about the past
 Financial (payroll)
 Medical (patient history)
 Government
 Temporal DBs: a system that manages time varying data
Comparison
 Conventional DBs:
 Evolve through transactions from one state to the next
 Changes are viewed as modifications to the state
 No information about the past
 Snapshot of the enterprise
 Temporal DBs:
 Maintain historical information
 Changes are viewed as additions to the information
stored in the database
 Incorporate notion of time in the system
 Efficient access to past states
Temporal Databases
 Temporal Data Models: extension of
relational model by adding temporal
attributes to each relation
 Temporal Query Languages: TQUEL, SQL3
 Temporal Indexing Methods and Query
Processing
Taxonomy of time
 Transaction time databases
 Transaction time is the time when a fact is
stored in the database
 Valid time databases:
 Valid time is the time that a fact becomes
effective in reality
 Bi-temporal databases:
 Support both notions of time
Example
 Sales example: data about sales are stored at the
end of the day
 Transaction time is different than valid time
 Valid time can refer to the future also!
 Credit card: 03/01-04/06
Transaction Time DBs
 Time evolves discretely, usually is associated with the
transaction number:
 A record R is extended with an interval [t.start, t.end).
When we insert an object at t1 the temporal attributes
are updated -> [t1, now)
 Updates can be made only to the current state!
 Past cannot be changed
 “Rollback” characteristics
T1 -> T2 -> T3 -> T4 ….
Transaction Time DBs
 Deletion is logical (never physical deletions!)
 When an object is deleted at t2, its temporal attribute
changes from [t1, now)  [t1, t2) (i.e. it updates its
interval)
 Object is “alive” from insertion to deletion time, ex. t1
to t2. If the value is “now” then the object is still alive
eid salary start end
10 20K 9/93 10/94
20 50K 4/94 *
33 30K 5/94 6/95
10 50K 1/95 *
time
Transaction Time DBs
1 2 4 8 10 15 16 17 25 28 30 33 41 42 45 47 48 51 53
u
b
f
c
d
g
p
j
k
i
m
e
Database evolves through insertions and deletions
id
Transaction Time DBs
 Requirements for index methods:
 Store past logical states
 Support addition/deletion/modification changes
on the objects of the current state
 Efficiently access and query any database state
Transaction Time DBs
 Queries:
 Timestamp (timeslice) queries: ex. “Give me all
employees at 05/94”
 Range-timeslice: “Find all employees with id
between 100 and 200 that worked in the
company on 05/94”
 Interval (period) queries: “Find all employees
with id in [100,200] from 05/94 to 06/96”
Valid Time DBs
 Time evolves continuously
 Each object is a line segment representing
its time span (eg. Credit card valid time)
 Support full operations on interval data:
 Deletion at any time
 Insertion at any time
 Value change (modification) at any time (no
ordering)
Valid Time DBs
 Deletion is physical:
 No way to know about the previous states of
intervals
 The notion of “future”, “present” and “past”
is relative to a certain timestamp t
Valid Time DBs
Iy
Iz
Ix
Iw
valid-time axis
previous collection
Iy
Ix
Iw
valid-time axis
new collection
The reality “best know now !”
Valid Time DBs
 Requirements for an Index method:
 Store the latest collection of interval-objects
 Support add/del/mod changes to this collection
 Efficiently query the intervals in the collection
 Timestamp query
 Interval (period) query
Bitemporal DBs
 A transaction-time Database, but each record is an
interval (plus the other attributes of the record)
 Keeping the evolution of a dynamic collection of
interval-objects
 At each timestamp, it is a valid time database
Bitemporal DBs
Iy
Ix
v
Iy Iz
Ix
v
Iy Iz
Ix
Iw
v
Iy
Ix
Iw
v
Iy
Ix
Iw
v
t
t1 t5
t4
t3
t2
C(t1) C(t5)
C(t4)
C(t3)
C(t2)
Bitemporal DBs
 Requirements for access methods:
 Store past/logical states of collections of objects
 Support add/del/mod of interval objects of the
current logical state
 Efficient query answering
Temporal Indexing
 Straight-forward approaches:
 B+-tree and R-tree
 Problems?
 Transaction time:
 Snapshot Index, TSB-tree, MVB-tree, MVAS
 Valid time:
 Interval structures: Segment tree, even R-tree
 Bitemporal:
 Bitemporal R-tree
Temporal Indexing
 Lower bound on answering timeslice and
range-timeslace queries:
 Space O(n/B), search O(logBn + s/B)
 n: number of changes, s: answer size, B
page capacity
Ad

More Related Content

Similar to tempDB.ppt (20)

Temporal database
Temporal databaseTemporal database
Temporal database
Hussain Azmee
 
Back to the future - Temporal Table in SQL Server 2016
Back to the future - Temporal Table in SQL Server 2016Back to the future - Temporal Table in SQL Server 2016
Back to the future - Temporal Table in SQL Server 2016
Stéphane Fréchette
 
BI-TEMPORAL IMPLEMENTATION IN RELATIONAL DATABASE MANAGEMENT SYSTEMS: MS SQ...
BI-TEMPORAL IMPLEMENTATION IN  RELATIONAL DATABASE  MANAGEMENT SYSTEMS: MS SQ...BI-TEMPORAL IMPLEMENTATION IN  RELATIONAL DATABASE  MANAGEMENT SYSTEMS: MS SQ...
BI-TEMPORAL IMPLEMENTATION IN RELATIONAL DATABASE MANAGEMENT SYSTEMS: MS SQ...
lyn kurian
 
129471717 unit-v
129471717 unit-v129471717 unit-v
129471717 unit-v
homeworkping8
 
Data Warehousing concepts for Data Engineering
Data Warehousing concepts for Data EngineeringData Warehousing concepts for Data Engineering
Data Warehousing concepts for Data Engineering
GouthumM
 
Perfect trio : temporal tables, transparent archiving in db2 for z_os and idaa
Perfect trio : temporal tables, transparent archiving in db2 for z_os and idaaPerfect trio : temporal tables, transparent archiving in db2 for z_os and idaa
Perfect trio : temporal tables, transparent archiving in db2 for z_os and idaa
Cuneyt Goksu
 
Updating and Scheduling of Streaming Web Services in Data Warehouses
Updating and Scheduling of Streaming Web Services in Data WarehousesUpdating and Scheduling of Streaming Web Services in Data Warehouses
Updating and Scheduling of Streaming Web Services in Data Warehouses
International Journal of Science and Research (IJSR)
 
Teradata Tutorial for Beginners
Teradata Tutorial for BeginnersTeradata Tutorial for Beginners
Teradata Tutorial for Beginners
rajkamaltibacademy
 
Data Warehousing and Data Mining
Data Warehousing and Data MiningData Warehousing and Data Mining
Data Warehousing and Data Mining
idnats
 
Survey On Temporal Data And Change Management in Data Warehouses
Survey On Temporal Data And Change Management in Data WarehousesSurvey On Temporal Data And Change Management in Data Warehouses
Survey On Temporal Data And Change Management in Data Warehouses
Etisalat
 
A Comparsion of Databases and DataWarehouses.ppt
A Comparsion of Databases and DataWarehouses.pptA Comparsion of Databases and DataWarehouses.ppt
A Comparsion of Databases and DataWarehouses.ppt
anitha803197
 
The delta architecture
The delta architectureThe delta architecture
The delta architecture
Prakash Chockalingam
 
Dataware house Introduction By Quontra Solutions
Dataware house Introduction By Quontra SolutionsDataware house Introduction By Quontra Solutions
Dataware house Introduction By Quontra Solutions
Quontra Solutions
 
PERFORMANCE STUDY OF TIME SERIES DATABASES
PERFORMANCE STUDY OF TIME SERIES DATABASESPERFORMANCE STUDY OF TIME SERIES DATABASES
PERFORMANCE STUDY OF TIME SERIES DATABASES
IJDMS
 
Performance Comparison between Pytorch and Mindspore
Performance Comparison between Pytorch and MindsporePerformance Comparison between Pytorch and Mindspore
Performance Comparison between Pytorch and Mindspore
IJDMS
 
OmniBase Object Database
OmniBase Object DatabaseOmniBase Object Database
OmniBase Object Database
ESUG
 
Delta from a Data Engineer's Perspective
Delta from a Data Engineer's PerspectiveDelta from a Data Engineer's Perspective
Delta from a Data Engineer's Perspective
Databricks
 
JUG SF - Introduction to data streaming
JUG SF - Introduction to data streamingJUG SF - Introduction to data streaming
JUG SF - Introduction to data streaming
Nicolas Fränkel
 
Data Warehouse by Amr Ali
Data Warehouse by Amr AliData Warehouse by Amr Ali
Data Warehouse by Amr Ali
Amr Ali
 
BruJUG - Introduction to data streaming
BruJUG - Introduction to data streamingBruJUG - Introduction to data streaming
BruJUG - Introduction to data streaming
Nicolas Fränkel
 
Back to the future - Temporal Table in SQL Server 2016
Back to the future - Temporal Table in SQL Server 2016Back to the future - Temporal Table in SQL Server 2016
Back to the future - Temporal Table in SQL Server 2016
Stéphane Fréchette
 
BI-TEMPORAL IMPLEMENTATION IN RELATIONAL DATABASE MANAGEMENT SYSTEMS: MS SQ...
BI-TEMPORAL IMPLEMENTATION IN  RELATIONAL DATABASE  MANAGEMENT SYSTEMS: MS SQ...BI-TEMPORAL IMPLEMENTATION IN  RELATIONAL DATABASE  MANAGEMENT SYSTEMS: MS SQ...
BI-TEMPORAL IMPLEMENTATION IN RELATIONAL DATABASE MANAGEMENT SYSTEMS: MS SQ...
lyn kurian
 
Data Warehousing concepts for Data Engineering
Data Warehousing concepts for Data EngineeringData Warehousing concepts for Data Engineering
Data Warehousing concepts for Data Engineering
GouthumM
 
Perfect trio : temporal tables, transparent archiving in db2 for z_os and idaa
Perfect trio : temporal tables, transparent archiving in db2 for z_os and idaaPerfect trio : temporal tables, transparent archiving in db2 for z_os and idaa
Perfect trio : temporal tables, transparent archiving in db2 for z_os and idaa
Cuneyt Goksu
 
Teradata Tutorial for Beginners
Teradata Tutorial for BeginnersTeradata Tutorial for Beginners
Teradata Tutorial for Beginners
rajkamaltibacademy
 
Data Warehousing and Data Mining
Data Warehousing and Data MiningData Warehousing and Data Mining
Data Warehousing and Data Mining
idnats
 
Survey On Temporal Data And Change Management in Data Warehouses
Survey On Temporal Data And Change Management in Data WarehousesSurvey On Temporal Data And Change Management in Data Warehouses
Survey On Temporal Data And Change Management in Data Warehouses
Etisalat
 
A Comparsion of Databases and DataWarehouses.ppt
A Comparsion of Databases and DataWarehouses.pptA Comparsion of Databases and DataWarehouses.ppt
A Comparsion of Databases and DataWarehouses.ppt
anitha803197
 
Dataware house Introduction By Quontra Solutions
Dataware house Introduction By Quontra SolutionsDataware house Introduction By Quontra Solutions
Dataware house Introduction By Quontra Solutions
Quontra Solutions
 
PERFORMANCE STUDY OF TIME SERIES DATABASES
PERFORMANCE STUDY OF TIME SERIES DATABASESPERFORMANCE STUDY OF TIME SERIES DATABASES
PERFORMANCE STUDY OF TIME SERIES DATABASES
IJDMS
 
Performance Comparison between Pytorch and Mindspore
Performance Comparison between Pytorch and MindsporePerformance Comparison between Pytorch and Mindspore
Performance Comparison between Pytorch and Mindspore
IJDMS
 
OmniBase Object Database
OmniBase Object DatabaseOmniBase Object Database
OmniBase Object Database
ESUG
 
Delta from a Data Engineer's Perspective
Delta from a Data Engineer's PerspectiveDelta from a Data Engineer's Perspective
Delta from a Data Engineer's Perspective
Databricks
 
JUG SF - Introduction to data streaming
JUG SF - Introduction to data streamingJUG SF - Introduction to data streaming
JUG SF - Introduction to data streaming
Nicolas Fränkel
 
Data Warehouse by Amr Ali
Data Warehouse by Amr AliData Warehouse by Amr Ali
Data Warehouse by Amr Ali
Amr Ali
 
BruJUG - Introduction to data streaming
BruJUG - Introduction to data streamingBruJUG - Introduction to data streaming
BruJUG - Introduction to data streaming
Nicolas Fränkel
 

Recently uploaded (20)

Biophysics Chapter 3 Methods of Studying Macromolecules.pdf
Biophysics Chapter 3 Methods of Studying Macromolecules.pdfBiophysics Chapter 3 Methods of Studying Macromolecules.pdf
Biophysics Chapter 3 Methods of Studying Macromolecules.pdf
PKLI-Institute of Nursing and Allied Health Sciences Lahore , Pakistan.
 
pulse ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
pulse  ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulsepulse  ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
pulse ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
sushreesangita003
 
Political History of Pala dynasty Pala Rulers NEP.pptx
Political History of Pala dynasty Pala Rulers NEP.pptxPolitical History of Pala dynasty Pala Rulers NEP.pptx
Political History of Pala dynasty Pala Rulers NEP.pptx
Arya Mahila P. G. College, Banaras Hindu University, Varanasi, India.
 
Sinhala_Male_Names.pdf Sinhala_Male_Name
Sinhala_Male_Names.pdf Sinhala_Male_NameSinhala_Male_Names.pdf Sinhala_Male_Name
Sinhala_Male_Names.pdf Sinhala_Male_Name
keshanf79
 
One Hot encoding a revolution in Machine learning
One Hot encoding a revolution in Machine learningOne Hot encoding a revolution in Machine learning
One Hot encoding a revolution in Machine learning
momer9505
 
Exploring-Substances-Acidic-Basic-and-Neutral.pdf
Exploring-Substances-Acidic-Basic-and-Neutral.pdfExploring-Substances-Acidic-Basic-and-Neutral.pdf
Exploring-Substances-Acidic-Basic-and-Neutral.pdf
Sandeep Swamy
 
How to manage Multiple Warehouses for multiple floors in odoo point of sale
How to manage Multiple Warehouses for multiple floors in odoo point of saleHow to manage Multiple Warehouses for multiple floors in odoo point of sale
How to manage Multiple Warehouses for multiple floors in odoo point of sale
Celine George
 
The ever evoilving world of science /7th class science curiosity /samyans aca...
The ever evoilving world of science /7th class science curiosity /samyans aca...The ever evoilving world of science /7th class science curiosity /samyans aca...
The ever evoilving world of science /7th class science curiosity /samyans aca...
Sandeep Swamy
 
To study Digestive system of insect.pptx
To study Digestive system of insect.pptxTo study Digestive system of insect.pptx
To study Digestive system of insect.pptx
Arshad Shaikh
 
Introduction to Vibe Coding and Vibe Engineering
Introduction to Vibe Coding and Vibe EngineeringIntroduction to Vibe Coding and Vibe Engineering
Introduction to Vibe Coding and Vibe Engineering
Damian T. Gordon
 
2541William_McCollough_DigitalDetox.docx
2541William_McCollough_DigitalDetox.docx2541William_McCollough_DigitalDetox.docx
2541William_McCollough_DigitalDetox.docx
contactwilliamm2546
 
GDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptxGDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptx
azeenhodekar
 
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptxSCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
Ronisha Das
 
Handling Multiple Choice Responses: Fortune Effiong.pptx
Handling Multiple Choice Responses: Fortune Effiong.pptxHandling Multiple Choice Responses: Fortune Effiong.pptx
Handling Multiple Choice Responses: Fortune Effiong.pptx
AuthorAIDNationalRes
 
Anti-Depressants pharmacology 1slide.pptx
Anti-Depressants pharmacology 1slide.pptxAnti-Depressants pharmacology 1slide.pptx
Anti-Depressants pharmacology 1slide.pptx
Mayuri Chavan
 
Geography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjectsGeography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjects
ProfDrShaikhImran
 
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - WorksheetCBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
Sritoma Majumder
 
Metamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative JourneyMetamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative Journey
Arshad Shaikh
 
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
larencebapu132
 
apa-style-referencing-visual-guide-2025.pdf
apa-style-referencing-visual-guide-2025.pdfapa-style-referencing-visual-guide-2025.pdf
apa-style-referencing-visual-guide-2025.pdf
Ishika Ghosh
 
pulse ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
pulse  ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulsepulse  ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
pulse ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
sushreesangita003
 
Sinhala_Male_Names.pdf Sinhala_Male_Name
Sinhala_Male_Names.pdf Sinhala_Male_NameSinhala_Male_Names.pdf Sinhala_Male_Name
Sinhala_Male_Names.pdf Sinhala_Male_Name
keshanf79
 
One Hot encoding a revolution in Machine learning
One Hot encoding a revolution in Machine learningOne Hot encoding a revolution in Machine learning
One Hot encoding a revolution in Machine learning
momer9505
 
Exploring-Substances-Acidic-Basic-and-Neutral.pdf
Exploring-Substances-Acidic-Basic-and-Neutral.pdfExploring-Substances-Acidic-Basic-and-Neutral.pdf
Exploring-Substances-Acidic-Basic-and-Neutral.pdf
Sandeep Swamy
 
How to manage Multiple Warehouses for multiple floors in odoo point of sale
How to manage Multiple Warehouses for multiple floors in odoo point of saleHow to manage Multiple Warehouses for multiple floors in odoo point of sale
How to manage Multiple Warehouses for multiple floors in odoo point of sale
Celine George
 
The ever evoilving world of science /7th class science curiosity /samyans aca...
The ever evoilving world of science /7th class science curiosity /samyans aca...The ever evoilving world of science /7th class science curiosity /samyans aca...
The ever evoilving world of science /7th class science curiosity /samyans aca...
Sandeep Swamy
 
To study Digestive system of insect.pptx
To study Digestive system of insect.pptxTo study Digestive system of insect.pptx
To study Digestive system of insect.pptx
Arshad Shaikh
 
Introduction to Vibe Coding and Vibe Engineering
Introduction to Vibe Coding and Vibe EngineeringIntroduction to Vibe Coding and Vibe Engineering
Introduction to Vibe Coding and Vibe Engineering
Damian T. Gordon
 
2541William_McCollough_DigitalDetox.docx
2541William_McCollough_DigitalDetox.docx2541William_McCollough_DigitalDetox.docx
2541William_McCollough_DigitalDetox.docx
contactwilliamm2546
 
GDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptxGDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptx
azeenhodekar
 
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptxSCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
Ronisha Das
 
Handling Multiple Choice Responses: Fortune Effiong.pptx
Handling Multiple Choice Responses: Fortune Effiong.pptxHandling Multiple Choice Responses: Fortune Effiong.pptx
Handling Multiple Choice Responses: Fortune Effiong.pptx
AuthorAIDNationalRes
 
Anti-Depressants pharmacology 1slide.pptx
Anti-Depressants pharmacology 1slide.pptxAnti-Depressants pharmacology 1slide.pptx
Anti-Depressants pharmacology 1slide.pptx
Mayuri Chavan
 
Geography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjectsGeography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjects
ProfDrShaikhImran
 
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - WorksheetCBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
CBSE - Grade 8 - Science - Chemistry - Metals and Non Metals - Worksheet
Sritoma Majumder
 
Metamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative JourneyMetamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative Journey
Arshad Shaikh
 
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
larencebapu132
 
apa-style-referencing-visual-guide-2025.pdf
apa-style-referencing-visual-guide-2025.pdfapa-style-referencing-visual-guide-2025.pdf
apa-style-referencing-visual-guide-2025.pdf
Ishika Ghosh
 
Ad

tempDB.ppt

  • 2. Outline  Spatial Databases  Indexing, Query processing  Temporal Databases  Spatio-temporal  ….
  • 3. Temporal DBs – Motivation  Conventional databases represent the state of an enterprise at a single moment of time  Many applications need information about the past  Financial (payroll)  Medical (patient history)  Government  Temporal DBs: a system that manages time varying data
  • 4. Comparison  Conventional DBs:  Evolve through transactions from one state to the next  Changes are viewed as modifications to the state  No information about the past  Snapshot of the enterprise  Temporal DBs:  Maintain historical information  Changes are viewed as additions to the information stored in the database  Incorporate notion of time in the system  Efficient access to past states
  • 5. Temporal Databases  Temporal Data Models: extension of relational model by adding temporal attributes to each relation  Temporal Query Languages: TQUEL, SQL3  Temporal Indexing Methods and Query Processing
  • 6. Taxonomy of time  Transaction time databases  Transaction time is the time when a fact is stored in the database  Valid time databases:  Valid time is the time that a fact becomes effective in reality  Bi-temporal databases:  Support both notions of time
  • 7. Example  Sales example: data about sales are stored at the end of the day  Transaction time is different than valid time  Valid time can refer to the future also!  Credit card: 03/01-04/06
  • 8. Transaction Time DBs  Time evolves discretely, usually is associated with the transaction number:  A record R is extended with an interval [t.start, t.end). When we insert an object at t1 the temporal attributes are updated -> [t1, now)  Updates can be made only to the current state!  Past cannot be changed  “Rollback” characteristics T1 -> T2 -> T3 -> T4 ….
  • 9. Transaction Time DBs  Deletion is logical (never physical deletions!)  When an object is deleted at t2, its temporal attribute changes from [t1, now)  [t1, t2) (i.e. it updates its interval)  Object is “alive” from insertion to deletion time, ex. t1 to t2. If the value is “now” then the object is still alive eid salary start end 10 20K 9/93 10/94 20 50K 4/94 * 33 30K 5/94 6/95 10 50K 1/95 * time
  • 10. Transaction Time DBs 1 2 4 8 10 15 16 17 25 28 30 33 41 42 45 47 48 51 53 u b f c d g p j k i m e Database evolves through insertions and deletions id
  • 11. Transaction Time DBs  Requirements for index methods:  Store past logical states  Support addition/deletion/modification changes on the objects of the current state  Efficiently access and query any database state
  • 12. Transaction Time DBs  Queries:  Timestamp (timeslice) queries: ex. “Give me all employees at 05/94”  Range-timeslice: “Find all employees with id between 100 and 200 that worked in the company on 05/94”  Interval (period) queries: “Find all employees with id in [100,200] from 05/94 to 06/96”
  • 13. Valid Time DBs  Time evolves continuously  Each object is a line segment representing its time span (eg. Credit card valid time)  Support full operations on interval data:  Deletion at any time  Insertion at any time  Value change (modification) at any time (no ordering)
  • 14. Valid Time DBs  Deletion is physical:  No way to know about the previous states of intervals  The notion of “future”, “present” and “past” is relative to a certain timestamp t
  • 15. Valid Time DBs Iy Iz Ix Iw valid-time axis previous collection Iy Ix Iw valid-time axis new collection The reality “best know now !”
  • 16. Valid Time DBs  Requirements for an Index method:  Store the latest collection of interval-objects  Support add/del/mod changes to this collection  Efficiently query the intervals in the collection  Timestamp query  Interval (period) query
  • 17. Bitemporal DBs  A transaction-time Database, but each record is an interval (plus the other attributes of the record)  Keeping the evolution of a dynamic collection of interval-objects  At each timestamp, it is a valid time database
  • 18. Bitemporal DBs Iy Ix v Iy Iz Ix v Iy Iz Ix Iw v Iy Ix Iw v Iy Ix Iw v t t1 t5 t4 t3 t2 C(t1) C(t5) C(t4) C(t3) C(t2)
  • 19. Bitemporal DBs  Requirements for access methods:  Store past/logical states of collections of objects  Support add/del/mod of interval objects of the current logical state  Efficient query answering
  • 20. Temporal Indexing  Straight-forward approaches:  B+-tree and R-tree  Problems?  Transaction time:  Snapshot Index, TSB-tree, MVB-tree, MVAS  Valid time:  Interval structures: Segment tree, even R-tree  Bitemporal:  Bitemporal R-tree
  • 21. Temporal Indexing  Lower bound on answering timeslice and range-timeslace queries:  Space O(n/B), search O(logBn + s/B)  n: number of changes, s: answer size, B page capacity