Database Reference
In-Depth Information
Chapter 7. Advanced Topics for Time
Series Databases
So far, we have considered how time series can be stored in databases where each time series
is easily identified: possibly by name, possibly by a combination of tagged values. The ap-
plications of such time series databases are broad and cover many needs.
There are situations, however, where the time series databases that we have described so far
fall short. One such situation is where we need to have a sense of location in addition to time.
An ordinary time series database makes the assumption that essentially all queries will have
results filtered primarily based on time. Put another way, time series databases require to you
specify which metric and when the data was recorded. Sometimes, however, we need to in-
clude the concept of where . We may want to specify only where and when without specify-
ing which . When we make this change to the queries that we want to use, we move from hav-
ing a time series database to having a geo-temporal database.
Note that it isn't the inclusion of locational data into a time series database per se that makes
it into a geo-temporal database. Any or all of latitude, longitude, x , y , or z could be included
in an ordinary time series database without any problem. As long as we know which time
series we want and what time range we want, this locational data is just like any other used to
identify the time series. It is the requirement that location data be a primary part of querying
the database that makes all the difference.
Suppose, for instance, that we have a large number of data-collecting robots wandering the
ocean recording surface temperature (and a few other parameters) at various locations as they
move around. A natural query for this data is to retrieve all temperature measurements that
have been made within a specified distance of a particular point in the ocean. With an ordin-
ary time series database, however, we are only able to scan by a particular robot for a partic-
ular time range, yet we cannot know which time to search for to find the measurements for a
robot at a particular location—we don't have any way to build an efficient query to get the
data we need, and it's not practical to scan the entire database. Also, because the location of
each robot changes over time, we cannot store the location in the tags for the entire time
series. We can, however, solve this problem by creating a geo-temporal database, and here's
how.
Search WWH ::




Custom Search