Temporal Data
Temporal Data
Transaction systems
Relational DB
OO DB
OR DB
Decision Support
OLAP
Data cube
Data Mining
Temporal and spatial databases
1
Database System Concepts
23.1
Overview
Temporal Data
2
Database System Concepts
23.2
Time In Databases
While most databases tend to model reality at a point in time (at
3
Database System Concepts
23.3
4
Database System Concepts
23.4
5
Database System Concepts
23.5
6
Database System Concepts
23.6
7
Database System Concepts
23.7
9
Database System Concepts
23.9
normalized fashion.
Represent a line segment by the coordinates of its endpoints.
Approximate a curve by partitioning it into a sequence of segments
List of vertices in order, starting vertex is the same as the ending vertex, or
Represent boundary edges as separate tuples, with each containing
identifier of the polygon, or
10
Database System Concepts
23.10
11
Database System Concepts
23.11
12
Database System Concepts
23.12
Design Databases
Represent design components as objects (generally
rectangles, polygons.
Complex two-dimensional objects: formed from simple
13
Database System Concepts
23.13
14
Database System Concepts
23.14
Geographic Data
Raster data consist of bit maps or pixel maps, in two or more
dimensions.
Example 2-D raster image: satellite image of cloud cover, where
each pixel stores the cloud visibility in a particular area.
15
Database System Concepts
23.15
16
Database System Concepts
23.16
17
Database System Concepts
23.17
Spatial Queries
Nearness queries request objects that lie near a specified
location.
Nearest neighbor queries, given a point or an object, find
18
Database System Concepts
23.18
19
Database System Concepts
23.19
choose one dimension for partitioning at the root level of the tree.
choose another dimensions for partitioning in nodes at the next level
and so on, cycling through the dimensions.
In each node, approximately half of the points stored in the sub-
number of points.
The k-d-B tree extends the k-d tree to allow multiple child nodes
20
Database System Concepts
23.20
21
Database System Concepts
23.21
correspondingly each such node has four child nodes corresponding to the four
quadrants and so on
Leaf nodes have between zero and some fixed maximum number of points
(set to 1 in example).
22
Database System Concepts
23.22
Quadtrees (Cont.)
PR quadtree: stores points; space is divided based on regions,
23.23
R-Trees
R-trees are a N-dimensional extension of B+-trees, useful for
24
Database System Concepts
23.24
R Trees (Cont.)
Bounding box of a node serves as its key in its parent node (if any)
Bounding boxes of children of a node are allowed to overlap
A polygon is stored only in one node, and the bounding box of
25
Database System Concepts
23.25
Example R-Tree
A set of rectangles (solid line) and the bounding boxes (dashed line) of the
nodes of an R-tree for the rectangles. The R-tree is shown on the right.
26
Database System Concepts
23.26
Search in R-Trees
To find data items (rectangles/polygons) intersecting
(overlaps) a given query point/region, do the following,
starting from the root node:
If the node is a leaf node, output the data items whose keys
intersect the given query point/region.
Else, for each child of the current node whose bounding box
overlaps the query point/region, recursively search the child
Can be very inefficient in worst case since multiple paths may
need to be searched
but works acceptably in practice.
Simple extensions of search procedure to handle predicates
27
Database System Concepts
23.27
Insertion in R-Trees
To insert a data item:
To find leaf, follow a child (if any) whose bounding box contains
bounding box of data item, else child whose overlap with data
item bounding box is maximum
Goal: divide entries of an overfull node into two sets such that the
bounding boxes have minimum total area
23.28
as follows
1. Find pair of entries with maximum separation
that is, the pair such that the bounding box of the two would
has the maximum wasted space (area of bounding box sum
of areas of two entries)
4. Stop when half the entries have been added to one node
entries,
Cheaper but generates slightly worse splits.
29
Database System Concepts
23.29
Deleting in R-Trees
Deletion of an entry in an R-tree done much like a B+-tree
deletion.
In case of underfull node, borrow entries from a sibling if possible,
else merging sibling nodes
30
Database System Concepts
23.30