SlideShare a Scribd company logo
Temporal and
Spatial Database
Dr S SRIDEVI
Conventional DB Vs Temporal DB
• 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/14/2023 2
Temporal Database
Temporal Database
Transaction Time
Valid Time
contains
Valid time. The valid time denotes when facts are true with respect to
the real world.
Transaction time. The transaction time of a database fact is the time
when the fact is entered in the database.
A temporal database is a database with built-in support for handling
data involving time, being related to the slowly changing dimension
concept, for example a temporal data model and a temporal version
of Structured Query Language (SQL).
5/14/2023 3
Types of Temporal Data
• Static Data: This temporal data have zero temporality. Inferences that
can be derived from this data are free from any temporality.
• Sequences: Sequences are ordered sequence of the events or
transactions. This type of temporal data has the temporal relationship
such as before, after, during, meet and overlap etc.
• Time Stamped: This temporal data has explicit time related
information. Relationship can be quantitative. The inference is made
through this type of data may be temporal or non temporal.
• Time Series: Time series data is the special case of the time stamped
data. In time series data, events have uniform distance on the time
scale.
• Fully Temporal: Data of this category is fully time dependent. The
inferences are also strictly temporal.
5/14/2023 4
Temporal Database (contd..)
5/14/2023 5
Different Forms of Temporal Database
Historical Database – stores data with respect to valid time.
Rollback Database - stores data with respect to transaction
time.
Bitemporal Database - - stores data with respect to both valid
transaction time.
5/14/2023 6
7
Allen’s Interval operations
 Since intervals are represented as pairs of
timepoints, comparisons between intervals are based on
timepoint comparisons of the upper and lower bounds.
 Let I1, I2 be two intervals, and Start(I), end(I) be
respectively the lower bound and upper bound of the
interval I.
 The interval comparison operators are BEFORE,
AFTER, DURING, CONTAINS, OVERLAPS, OVERLAPPED BY,
MEETS, MET BY,STARTS, STARTED BY, FINISHES,
FINISHED BY and EQUAL. This set of comparisons was
originally defined by Allen.
5/14/2023
8
Operators on Intervals
Temporal predicate operators:
i1 = [s1,e1]; i2 = [s2,e2]
– i1 BEFORE i2
(e1<s2)
– i1 MEETS i2
(s2 = e1)
– i1 EQUALS i2
(s1 = s2 AND e1 = e2)
– i1 OVERLAPS i2
(s2 < s1 < e2 OR s1 < s2 < e1)
i1
i1
i1
i1
i2
i2
i2
i2
5/14/2023
Sample Query
Retrieve the state of the record for Chung at 9:30AM, April 4, 2004:
Query: Retrieving a Lost Row with Oracle Flashback Query
• SELECT * FROM employees AS OF TIMESTAMP TO_TIMESTAMP('2004-04-
04 09:30:00', 'YYYY-MM-DD HH:MI:SS') WHERE last_name = 'Chung';
Query: Restores Chung's information to the employees table:
Restoring a Lost Row After Oracle Flashback Query
• INSERT INTO employees ( SELECT * FROM employees AS OF TIMESTAMP
TO_TIMESTAMP('2004-04-04 09:30:00', 'YYYY-MM-DD HH:MI:SS')
WHERE last_name = 'Chung' );
5/14/2023 9
Time Series Databases
• A time series database (TSDB) is a software system that is optimized for handling time
series data, arrays of numbers indexed by time (a datetime or a datetime range). In some
fields these time series are called profiles, curves, or traces.
• Time series data is a sequence of data points collected at regular intervals over a period of
time. In short, it is any data that has a timestamp, including Internet of Things (IoT) device
data, stocks, commodity prices, tide measurements, solar flare tracking, and health
information.
5/14/2023 10
TIME SERIES DATABASE REQUIREMENTS
• Data location: If related data is not co-located on the same physical storage, queries
can be slow and even result in time-outs.
• Fast, easy range queries: Analyzing time series data requires the ability to write
range queries. With many databases, the sheer volume of time series data may cause
the index to outpace the available memory, degrade read and write performance, and
produce errors. A NoSQL database that co-locates related time series data ensures
that requests complete without error
• High write performance: Many databases are not able to serve requests predictably
and quickly during peak loads. Unless the database prioritizes cluster availability over
strong consistency, the database may become less responsive or even completely
unresponsive.
• Data compaction: As time series data ages, the granularity of the data often becomes
less relevant to the purpose of useful analysis. To be able to store and retrieve the data
efficiently, organizations must have the ability to roll up and compress the data
according to the needs of the business.
5/14/2023 11
BENEFITS OF A TIME SERIES DATABASE
• Massive scalability and performance: An effective time series database
enables an application to scale easily to support millions of IoT devices or
time series data points in a continuous flow and perform real-time analysis.
• Reduced downtime: In scenarios where downtime is unacceptable, the
architecture of a database that is built for time series data ensures that data is
always available even in the event of network partitions or hardware failures.
• Lower costs: High resiliency translates into fewer resources needed to
manage outages. Fast and easy scaling using commodity hardware reduces
the operational and hardware costs of scaling up or down.
• Improved business decisions: By enabling an organization to analyze data
in real time, a time series database helps an organization make faster and
more accurate adjustments for energy consumption, device maintenance,
infrastructure changes, or other important decisions that impact the
business.
5/14/2023 12
13
Applications of Temporal Database
and Time Series Database
• Health care: patient histories need to be maintained
• Insurance: claims and accident histories are required
• Finance : portfolio management, accounting & banking, stock market analysis, audit analysis
• Personnel management: salary and position history need to be maintained
• Banking: credit histories
• Data Warehousing: historical trends for analysis
• Scheduling apps.: airline, car, hotel reservations and project management
• Scientific apps.: weather monitoring, chemical process monitoring
5/14/2023
What is a SDBMS ? (Spatial DBMS)
• A SDBMS is a software module that
• can work with an underlying DBMS
• supports spatial data models, spatial abstract data types (ADTs) and a
query language from which these ADTs are callable
• supports spatial indexing, efficient algorithms for processing spatial
operations, and domain specific rules for query optimization
• Example: Oracle Spatial data cartridge, ESRI SDE
• can work with Oracle 8i DBMS
• Has spatial data types (e.g. polygon), operations (e.g. overlap) callable
from SQL3 query language
• Has spatial indices, e.g. R-trees
Modeling: What need to be presented?
• Single object
Points, Lines and Regions
Modeling: What need to be presented?
• Spatially related collections of objects
Partitions-----a set of regions
Networks-----points and lines
SDBMS Example
• Consider a spatial dataset with:
• County boundary (dashed white line)
• Census block - name, area, population,
boundary (dark line)
• Water bodies (dark polygons)
• Satellite Imagery (gray scale pixels)
• Storage in a SDBMS table:
create table census_blocks (
name string,
area float,
population number,
boundarypolygon );
Fig 1.2
Spatial Data Types and Post-relational Databases
• Post-relational DBMS
• Support user defined abstract data types
• Spatial data types (e.g. polygon) can be added
• Choice of post-relational DBMS
• Object oriented (OO) DBMS
• Object relational (OR) DBMS
• A spatial database is a collection of spatial data types, operators, indices,
processing strategies, etc. and can work with many post-relational DBMS as
well as programming languages like Java, Visual Basic etc.
How is a SDBMS different from a GIS ?
• GIS is a software to visualize and analyze spatial data using spatial
analysis functions such as
• Search Thematic search, search by region, (re-)classification
• Location analysis Buffer, corridor, overlay
• Terrain analysis Slope/aspect, catchment, drainage network
• Flow analysis Connectivity, shortest path
• Distribution Change detection, proximity, nearest neighbor
• Spatial analysis/Statistics Pattern, centrality, autocorrelation, indices of similarity, topology:
hole description
• Measurements Distance, perimeter, shape, adjacency, direction
• GIS uses SDBMS
• to store, search, query, share large spatial data sets
How is a SDBMS different from a GIS ?
• SDBMS focusses on
• Efficient storage, querying, sharing of large spatial datasets
• Provides simpler set based query operations
• Example operations: search by region, overlay, nearest neighbor, distance, adjacency,
perimeter etc.
• Uses spatial indices and query optimization to speedup queries over large spatial datasets.
• SDBMS may be used by applications other than GIS
• Astronomy, Genomics, Multimedia information systems, ...
• Will one use a GIS or a SDBM to answer the following:
• How many neighboring countries does USA have?
• Which country has highest number of neighbors?
Components of a SDBMS
• Recall: a SDBMS is a software module that
• can work with an underlying DBMS
• supports spatial data models, spatial ADTs and a query language from which these ADTs are
callable
• supports spatial indexing, algorithms for processing spatial operations, and domain specific
rules for query optimization
• Components include
• spatial data model, query language, query processing, file organization and indices, query
optimization, etc.
• Figure 1.6 shows these components
• We discuss each component briefly in chapter 1.6 and in more detail in later chapters.
Three Layer Architecture Fig 1.6
1.6.2 Spatial Query Language
• Spatial query language
• Spatial data types, e.g. point, linestring, polygon, …
• Spatial operations, e.g. overlap, distance, nearest neighbor, …
• Callable from a query language (e.g. SQL3) of underlying DBMS
SELECT S.name
FROM Senator S
WHERE S.district.Area() > 300
• Standards
• SQL3 (a.k.a. SQL 1999) is a standard for query languages
• OGIS is a standard for spatial data types and operators
• Both standards enjoy wide support in industry
• More details in chapters 2 and 3
1.6.3 Query Processing
• Efficient algorithms to answer spatial queries
• Common Strategy - filter and refine
• Filter Step:Query Region overlaps with MBRs of B,C and D
• Refine Step: Query Region overlaps with B and C
Fig 1.8
Query Processing of Join Queries
Fig 1.9
•Example - Determining pairs of intersecting rectangles
• (a):Two sets R and S of rectangles, (b): A rectangle with 2 opposite corners
marked, (c ): Rectangles sorted by smallest X coordinate value
• Plane sweep filter identifies 5 pairs out of 12 for refinement step
•Details of plane sweep algorithm on page 15
Spatial Indexing: Search Data-Structures
Fig. 1.13: R- tree
Fig 1.12: B-tree
•Choice for spatial indexing:
•B-tree is a hierarchical collection of ranges of linear keys, e.g. numbers
•B-tree index is used for efficient search of traditional data
•B-tree can be used with space filling curve on spatial data
•R-tree provides better search performance yet!
•R-tree is a hierarchical collection of rectangles
•More details in chapter 4

More Related Content

PPTX
Distributed dbms architectures
Pooja Dixit
 
DOC
rdbms-notes
Mohit Saini
 
PPTX
Database System Architectures
Information Technology
 
PPTX
DBMS ARCHITECTURE.pptx
Anusha sivakumar
 
PPTX
Dbms architecture
Shubham Dwivedi
 
PPTX
Data-Intensive Technologies for Cloud Computing
huda2018
 
PPTX
Data Mining: Mining ,associations, and correlations
Datamining Tools
 
PPTX
Multidimensional data models
774474
 
Distributed dbms architectures
Pooja Dixit
 
rdbms-notes
Mohit Saini
 
Database System Architectures
Information Technology
 
DBMS ARCHITECTURE.pptx
Anusha sivakumar
 
Dbms architecture
Shubham Dwivedi
 
Data-Intensive Technologies for Cloud Computing
huda2018
 
Data Mining: Mining ,associations, and correlations
Datamining Tools
 
Multidimensional data models
774474
 

What's hot (20)

PPTX
Concurrency control
Subhasish Pati
 
PPT
Deadlock detection and recovery by saad symbian
saad symbian
 
PPT
Dbms ii mca-ch5-ch6-relational algebra-2013
Prosanta Ghosh
 
PPTX
Introduction to Hadoop
Dr. C.V. Suresh Babu
 
PPTX
HADOOP TECHNOLOGY ppt
sravya raju
 
PPT
24. Advanced Transaction Processing in DBMS
koolkampus
 
PPTX
Distributed Databases
Meghaj Mallick
 
PPTX
Chapter-1 Introduction to Database Management Systems
Kunal Anand
 
PDF
Remote backup system
DipendraMahato3
 
PPTX
Slide 4 dbms users
Visakh V
 
PPT
5.2 mining time series data
Krish_ver2
 
PDF
Address Binding Scheme
Rajesh Piryani
 
PPTX
Multimedia system, Architecture & Databases
Harshita Ved
 
PPT
Basic DBMS ppt
dangwalrajendra888
 
PPTX
Database management system
Shashikumar_chari
 
PPT
Schemaless Databases
Dan Gunter
 
PPT
Object Oriented Database Management System
Ajay Jha
 
PPT
Understanding operating systems 5th ed ch02
BarrBoy
 
PPSX
Hadoop
Nishant Gandhi
 
PPTX
Access to non local names
Varsha Kumar
 
Concurrency control
Subhasish Pati
 
Deadlock detection and recovery by saad symbian
saad symbian
 
Dbms ii mca-ch5-ch6-relational algebra-2013
Prosanta Ghosh
 
Introduction to Hadoop
Dr. C.V. Suresh Babu
 
HADOOP TECHNOLOGY ppt
sravya raju
 
24. Advanced Transaction Processing in DBMS
koolkampus
 
Distributed Databases
Meghaj Mallick
 
Chapter-1 Introduction to Database Management Systems
Kunal Anand
 
Remote backup system
DipendraMahato3
 
Slide 4 dbms users
Visakh V
 
5.2 mining time series data
Krish_ver2
 
Address Binding Scheme
Rajesh Piryani
 
Multimedia system, Architecture & Databases
Harshita Ved
 
Basic DBMS ppt
dangwalrajendra888
 
Database management system
Shashikumar_chari
 
Schemaless Databases
Dan Gunter
 
Object Oriented Database Management System
Ajay Jha
 
Understanding operating systems 5th ed ch02
BarrBoy
 
Access to non local names
Varsha Kumar
 
Ad

Similar to temporal and spatial database.pptx (20)

PDF
Performance Comparison between Pytorch and Mindspore
IJDMS
 
PDF
PERFORMANCE STUDY OF TIME SERIES DATABASES
IJDMS
 
PDF
Spatio-Temporal Database and Its Models: A Review
IOSR Journals
 
PDF
Survey real time databases
Manuel Santos
 
PPT
Ch1revised
maheswari narne
 
PPT
Introduction to spatialdatabases lecture slides
DeivamaniMallayya
 
PPT
Intro to spatial databases: GIS, Postgres.
LonJames2
 
PPTX
Temporal database
District Administration
 
PDF
Management of Bi-Temporal Properties of Sql/Nosql Based Architectures – A Re...
lyn kurian
 
PPTX
Spatial Database and Database Management System
Lal Mohammad
 
PPT
Lecture-8-The-GIS-Database-Part-1.ppt
Prabin Pandit
 
PPTX
Unit - 4 Data input and Analysis
Mukilan N
 
PPTX
Dbms and it infrastructure
projectandppt
 
PDF
Unit 5_ Advanced Database Models, Systems, and Applications.pdf
COSMOS58
 
PPT
tempDB.ppt
GopiBala5
 
PDF
Database management unit 6 of computer engineering
wivax28493
 
PPTX
Need for Time series Database
Pramit Choudhary
 
PDF
Relational
dieover
 
PPTX
DATAWAREHOUSE MAIn under data mining for
AyushMeraki1
 
Performance Comparison between Pytorch and Mindspore
IJDMS
 
PERFORMANCE STUDY OF TIME SERIES DATABASES
IJDMS
 
Spatio-Temporal Database and Its Models: A Review
IOSR Journals
 
Survey real time databases
Manuel Santos
 
Ch1revised
maheswari narne
 
Introduction to spatialdatabases lecture slides
DeivamaniMallayya
 
Intro to spatial databases: GIS, Postgres.
LonJames2
 
Temporal database
District Administration
 
Management of Bi-Temporal Properties of Sql/Nosql Based Architectures – A Re...
lyn kurian
 
Spatial Database and Database Management System
Lal Mohammad
 
Lecture-8-The-GIS-Database-Part-1.ppt
Prabin Pandit
 
Unit - 4 Data input and Analysis
Mukilan N
 
Dbms and it infrastructure
projectandppt
 
Unit 5_ Advanced Database Models, Systems, and Applications.pdf
COSMOS58
 
tempDB.ppt
GopiBala5
 
Database management unit 6 of computer engineering
wivax28493
 
Need for Time series Database
Pramit Choudhary
 
Relational
dieover
 
DATAWAREHOUSE MAIn under data mining for
AyushMeraki1
 
Ad

Recently uploaded (20)

PDF
AI-Driven IoT-Enabled UAV Inspection Framework for Predictive Maintenance and...
ijcncjournal019
 
PDF
top-5-use-cases-for-splunk-security-analytics.pdf
yaghutialireza
 
PPTX
Civil Engineering Practices_BY Sh.JP Mishra 23.09.pptx
bineetmishra1990
 
PDF
20ME702-Mechatronics-UNIT-1,UNIT-2,UNIT-3,UNIT-4,UNIT-5, 2025-2026
Mohanumar S
 
DOCX
SAR - EEEfdfdsdasdsdasdasdasdasdasdasdasda.docx
Kanimozhi676285
 
PDF
All chapters of Strength of materials.ppt
girmabiniyam1234
 
PDF
Zero carbon Building Design Guidelines V4
BassemOsman1
 
PPTX
MSME 4.0 Template idea hackathon pdf to understand
alaudeenaarish
 
PDF
Natural_Language_processing_Unit_I_notes.pdf
sanguleumeshit
 
PDF
Packaging Tips for Stainless Steel Tubes and Pipes
heavymetalsandtubes
 
PPTX
IoT_Smart_Agriculture_Presentations.pptx
poojakumari696707
 
PDF
Introduction to Ship Engine Room Systems.pdf
Mahmoud Moghtaderi
 
PPTX
22PCOAM21 Session 1 Data Management.pptx
Guru Nanak Technical Institutions
 
PPTX
Module2 Data Base Design- ER and NF.pptx
gomathisankariv2
 
PDF
settlement FOR FOUNDATION ENGINEERS.pdf
Endalkazene
 
PDF
Construction of a Thermal Vacuum Chamber for Environment Test of Triple CubeS...
2208441
 
PPTX
22PCOAM21 Session 2 Understanding Data Source.pptx
Guru Nanak Technical Institutions
 
PDF
Advanced LangChain & RAG: Building a Financial AI Assistant with Real-Time Data
Soufiane Sejjari
 
PDF
67243-Cooling and Heating & Calculation.pdf
DHAKA POLYTECHNIC
 
PDF
FLEX-LNG-Company-Presentation-Nov-2017.pdf
jbloggzs
 
AI-Driven IoT-Enabled UAV Inspection Framework for Predictive Maintenance and...
ijcncjournal019
 
top-5-use-cases-for-splunk-security-analytics.pdf
yaghutialireza
 
Civil Engineering Practices_BY Sh.JP Mishra 23.09.pptx
bineetmishra1990
 
20ME702-Mechatronics-UNIT-1,UNIT-2,UNIT-3,UNIT-4,UNIT-5, 2025-2026
Mohanumar S
 
SAR - EEEfdfdsdasdsdasdasdasdasdasdasdasda.docx
Kanimozhi676285
 
All chapters of Strength of materials.ppt
girmabiniyam1234
 
Zero carbon Building Design Guidelines V4
BassemOsman1
 
MSME 4.0 Template idea hackathon pdf to understand
alaudeenaarish
 
Natural_Language_processing_Unit_I_notes.pdf
sanguleumeshit
 
Packaging Tips for Stainless Steel Tubes and Pipes
heavymetalsandtubes
 
IoT_Smart_Agriculture_Presentations.pptx
poojakumari696707
 
Introduction to Ship Engine Room Systems.pdf
Mahmoud Moghtaderi
 
22PCOAM21 Session 1 Data Management.pptx
Guru Nanak Technical Institutions
 
Module2 Data Base Design- ER and NF.pptx
gomathisankariv2
 
settlement FOR FOUNDATION ENGINEERS.pdf
Endalkazene
 
Construction of a Thermal Vacuum Chamber for Environment Test of Triple CubeS...
2208441
 
22PCOAM21 Session 2 Understanding Data Source.pptx
Guru Nanak Technical Institutions
 
Advanced LangChain & RAG: Building a Financial AI Assistant with Real-Time Data
Soufiane Sejjari
 
67243-Cooling and Heating & Calculation.pdf
DHAKA POLYTECHNIC
 
FLEX-LNG-Company-Presentation-Nov-2017.pdf
jbloggzs
 

temporal and spatial database.pptx

  • 2. Conventional DB Vs Temporal DB • 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/14/2023 2
  • 3. Temporal Database Temporal Database Transaction Time Valid Time contains Valid time. The valid time denotes when facts are true with respect to the real world. Transaction time. The transaction time of a database fact is the time when the fact is entered in the database. A temporal database is a database with built-in support for handling data involving time, being related to the slowly changing dimension concept, for example a temporal data model and a temporal version of Structured Query Language (SQL). 5/14/2023 3
  • 4. Types of Temporal Data • Static Data: This temporal data have zero temporality. Inferences that can be derived from this data are free from any temporality. • Sequences: Sequences are ordered sequence of the events or transactions. This type of temporal data has the temporal relationship such as before, after, during, meet and overlap etc. • Time Stamped: This temporal data has explicit time related information. Relationship can be quantitative. The inference is made through this type of data may be temporal or non temporal. • Time Series: Time series data is the special case of the time stamped data. In time series data, events have uniform distance on the time scale. • Fully Temporal: Data of this category is fully time dependent. The inferences are also strictly temporal. 5/14/2023 4
  • 6. Different Forms of Temporal Database Historical Database – stores data with respect to valid time. Rollback Database - stores data with respect to transaction time. Bitemporal Database - - stores data with respect to both valid transaction time. 5/14/2023 6
  • 7. 7 Allen’s Interval operations  Since intervals are represented as pairs of timepoints, comparisons between intervals are based on timepoint comparisons of the upper and lower bounds.  Let I1, I2 be two intervals, and Start(I), end(I) be respectively the lower bound and upper bound of the interval I.  The interval comparison operators are BEFORE, AFTER, DURING, CONTAINS, OVERLAPS, OVERLAPPED BY, MEETS, MET BY,STARTS, STARTED BY, FINISHES, FINISHED BY and EQUAL. This set of comparisons was originally defined by Allen. 5/14/2023
  • 8. 8 Operators on Intervals Temporal predicate operators: i1 = [s1,e1]; i2 = [s2,e2] – i1 BEFORE i2 (e1<s2) – i1 MEETS i2 (s2 = e1) – i1 EQUALS i2 (s1 = s2 AND e1 = e2) – i1 OVERLAPS i2 (s2 < s1 < e2 OR s1 < s2 < e1) i1 i1 i1 i1 i2 i2 i2 i2 5/14/2023
  • 9. Sample Query Retrieve the state of the record for Chung at 9:30AM, April 4, 2004: Query: Retrieving a Lost Row with Oracle Flashback Query • SELECT * FROM employees AS OF TIMESTAMP TO_TIMESTAMP('2004-04- 04 09:30:00', 'YYYY-MM-DD HH:MI:SS') WHERE last_name = 'Chung'; Query: Restores Chung's information to the employees table: Restoring a Lost Row After Oracle Flashback Query • INSERT INTO employees ( SELECT * FROM employees AS OF TIMESTAMP TO_TIMESTAMP('2004-04-04 09:30:00', 'YYYY-MM-DD HH:MI:SS') WHERE last_name = 'Chung' ); 5/14/2023 9
  • 10. Time Series Databases • A time series database (TSDB) is a software system that is optimized for handling time series data, arrays of numbers indexed by time (a datetime or a datetime range). In some fields these time series are called profiles, curves, or traces. • Time series data is a sequence of data points collected at regular intervals over a period of time. In short, it is any data that has a timestamp, including Internet of Things (IoT) device data, stocks, commodity prices, tide measurements, solar flare tracking, and health information. 5/14/2023 10
  • 11. TIME SERIES DATABASE REQUIREMENTS • Data location: If related data is not co-located on the same physical storage, queries can be slow and even result in time-outs. • Fast, easy range queries: Analyzing time series data requires the ability to write range queries. With many databases, the sheer volume of time series data may cause the index to outpace the available memory, degrade read and write performance, and produce errors. A NoSQL database that co-locates related time series data ensures that requests complete without error • High write performance: Many databases are not able to serve requests predictably and quickly during peak loads. Unless the database prioritizes cluster availability over strong consistency, the database may become less responsive or even completely unresponsive. • Data compaction: As time series data ages, the granularity of the data often becomes less relevant to the purpose of useful analysis. To be able to store and retrieve the data efficiently, organizations must have the ability to roll up and compress the data according to the needs of the business. 5/14/2023 11
  • 12. BENEFITS OF A TIME SERIES DATABASE • Massive scalability and performance: An effective time series database enables an application to scale easily to support millions of IoT devices or time series data points in a continuous flow and perform real-time analysis. • Reduced downtime: In scenarios where downtime is unacceptable, the architecture of a database that is built for time series data ensures that data is always available even in the event of network partitions or hardware failures. • Lower costs: High resiliency translates into fewer resources needed to manage outages. Fast and easy scaling using commodity hardware reduces the operational and hardware costs of scaling up or down. • Improved business decisions: By enabling an organization to analyze data in real time, a time series database helps an organization make faster and more accurate adjustments for energy consumption, device maintenance, infrastructure changes, or other important decisions that impact the business. 5/14/2023 12
  • 13. 13 Applications of Temporal Database and Time Series Database • Health care: patient histories need to be maintained • Insurance: claims and accident histories are required • Finance : portfolio management, accounting & banking, stock market analysis, audit analysis • Personnel management: salary and position history need to be maintained • Banking: credit histories • Data Warehousing: historical trends for analysis • Scheduling apps.: airline, car, hotel reservations and project management • Scientific apps.: weather monitoring, chemical process monitoring 5/14/2023
  • 14. What is a SDBMS ? (Spatial DBMS) • A SDBMS is a software module that • can work with an underlying DBMS • supports spatial data models, spatial abstract data types (ADTs) and a query language from which these ADTs are callable • supports spatial indexing, efficient algorithms for processing spatial operations, and domain specific rules for query optimization • Example: Oracle Spatial data cartridge, ESRI SDE • can work with Oracle 8i DBMS • Has spatial data types (e.g. polygon), operations (e.g. overlap) callable from SQL3 query language • Has spatial indices, e.g. R-trees
  • 15. Modeling: What need to be presented? • Single object Points, Lines and Regions
  • 16. Modeling: What need to be presented? • Spatially related collections of objects Partitions-----a set of regions Networks-----points and lines
  • 17. SDBMS Example • Consider a spatial dataset with: • County boundary (dashed white line) • Census block - name, area, population, boundary (dark line) • Water bodies (dark polygons) • Satellite Imagery (gray scale pixels) • Storage in a SDBMS table: create table census_blocks ( name string, area float, population number, boundarypolygon ); Fig 1.2
  • 18. Spatial Data Types and Post-relational Databases • Post-relational DBMS • Support user defined abstract data types • Spatial data types (e.g. polygon) can be added • Choice of post-relational DBMS • Object oriented (OO) DBMS • Object relational (OR) DBMS • A spatial database is a collection of spatial data types, operators, indices, processing strategies, etc. and can work with many post-relational DBMS as well as programming languages like Java, Visual Basic etc.
  • 19. How is a SDBMS different from a GIS ? • GIS is a software to visualize and analyze spatial data using spatial analysis functions such as • Search Thematic search, search by region, (re-)classification • Location analysis Buffer, corridor, overlay • Terrain analysis Slope/aspect, catchment, drainage network • Flow analysis Connectivity, shortest path • Distribution Change detection, proximity, nearest neighbor • Spatial analysis/Statistics Pattern, centrality, autocorrelation, indices of similarity, topology: hole description • Measurements Distance, perimeter, shape, adjacency, direction • GIS uses SDBMS • to store, search, query, share large spatial data sets
  • 20. How is a SDBMS different from a GIS ? • SDBMS focusses on • Efficient storage, querying, sharing of large spatial datasets • Provides simpler set based query operations • Example operations: search by region, overlay, nearest neighbor, distance, adjacency, perimeter etc. • Uses spatial indices and query optimization to speedup queries over large spatial datasets. • SDBMS may be used by applications other than GIS • Astronomy, Genomics, Multimedia information systems, ... • Will one use a GIS or a SDBM to answer the following: • How many neighboring countries does USA have? • Which country has highest number of neighbors?
  • 21. Components of a SDBMS • Recall: a SDBMS is a software module that • can work with an underlying DBMS • supports spatial data models, spatial ADTs and a query language from which these ADTs are callable • supports spatial indexing, algorithms for processing spatial operations, and domain specific rules for query optimization • Components include • spatial data model, query language, query processing, file organization and indices, query optimization, etc. • Figure 1.6 shows these components • We discuss each component briefly in chapter 1.6 and in more detail in later chapters.
  • 23. 1.6.2 Spatial Query Language • Spatial query language • Spatial data types, e.g. point, linestring, polygon, … • Spatial operations, e.g. overlap, distance, nearest neighbor, … • Callable from a query language (e.g. SQL3) of underlying DBMS SELECT S.name FROM Senator S WHERE S.district.Area() > 300 • Standards • SQL3 (a.k.a. SQL 1999) is a standard for query languages • OGIS is a standard for spatial data types and operators • Both standards enjoy wide support in industry • More details in chapters 2 and 3
  • 24. 1.6.3 Query Processing • Efficient algorithms to answer spatial queries • Common Strategy - filter and refine • Filter Step:Query Region overlaps with MBRs of B,C and D • Refine Step: Query Region overlaps with B and C Fig 1.8
  • 25. Query Processing of Join Queries Fig 1.9 •Example - Determining pairs of intersecting rectangles • (a):Two sets R and S of rectangles, (b): A rectangle with 2 opposite corners marked, (c ): Rectangles sorted by smallest X coordinate value • Plane sweep filter identifies 5 pairs out of 12 for refinement step •Details of plane sweep algorithm on page 15
  • 26. Spatial Indexing: Search Data-Structures Fig. 1.13: R- tree Fig 1.12: B-tree •Choice for spatial indexing: •B-tree is a hierarchical collection of ranges of linear keys, e.g. numbers •B-tree index is used for efficient search of traditional data •B-tree can be used with space filling curve on spatial data •R-tree provides better search performance yet! •R-tree is a hierarchical collection of rectangles •More details in chapter 4