Database Reference
In-Depth Information
Somewhat surprisingly, it is possible to implement a geo-temporal database using an ordin-
ary time series database together with just a little bit of additional machinery called a geo-in-
dex. That is, we can do this if the data we collect and the queries we need to do satisfy a few
simple assumptions. This chapter describes these assumptions, gives examples of when these
assumptions hold, and describes how to implement this kind of geo-temporal database.
Stationary Data
In the special case where each time series is gathered in a single location that does not
change, we do not actually need a geo-temporal database. Since the location doesn't change,
the location does not need to be recorded more than once and can instead be recorded as an
attribute of the time series itself, just like any other attribute. This means that querying such a
database with a region of interest and a time range involves nothing more than finding the
time series that are in the region and then issuing a normal time-based query for those time
series.
Wandering Sources
The case of time series whose data source location changes over time is much more interest-
ing than the case where location doesn't change. The exciting news is that if the data source
location changes relatively slowly, such as with the ocean robots, there are a variety of meth-
ods to make location searches as efficient as time scans. We describe only one method here.
To start with, we assume that all the locations are on a plane that is divided into squares. For
an ocean robot, imagine its path mapped out as a curve, and we've covered the map with
squares. The robot's path will pass through some of the squares. Where the path crosses a
square is what we call an intersection.
We also assume that consecutive points in a time series are collected near one another geo-
graphically because the data sources move slowly with respect to how often they collect data.
As data is ingested, we can examine the location data for each time series and mark down in
a separate table (the geo-index) exactly when the time series path intersects each square and
which squares it intersects. These intersections of time series and squares can be stored and
indexed by the ID of the square so that we can search the geo-index using the square and get
a list of all intersections with that square. That list of intersections tells us which robots have
crossed the square and when they crossed it. We can then use that information to query the
Search WWH ::




Custom Search