Time series database

From Wikipedia, the free encyclopedia

A time series database server (TSDS) is a software system that is optimized for handling a time series. In this context, a time series is an associative array of numbers indexed by a datetime or a datetime range. These time series are often called profiles or curves, depending upon the market. A time series of stock prices might be called a price curve, or a time series of energy consumption might be called a load profile. Despite the disparate naming, the operations performed on them are sufficiently common as to demand special database treatment.

TSDSs simplify the development of software with complex business rules in a wide variety of sectors. Queries for historical data, replete with time ranges and roll ups and arbitrary time zone conversions are difficult in a relational database. Compositions of those rules are even more difficult. This is a problem compounded by the free nature of relational systems themselves. Many relational systems are often not modelled correctly with respect to time series data. TSDS on the other hand impose a model and this allows them to provide more features for doing so.

Ideally, these repositories are often natively implemented using special database algorithms. However, good performance has also been obtained by storing time series as binary large objects (BLOBs) in a relational database or by using a VLDB approach coupled with a pure star schema. These work best when time is treated as a fact, not a dimension.

Contents

[edit] Overview

The TSDS allows users to create, enumerate, update and destroy various time series and organize them in some fashion. These series may be organized hierarchically and optionally have companion metadata available with them. The server often supports a number of basic calculations that work on a series as a whole, such as multiplying, adding, or otherwise combining various time series into a new time series. They can also filter on arbitrary patterns defined by the day of the week, low value filters, high value filters, or even have the values of one series filter another. Some TSDSs also build in a wealth of statistical functions.

For example, consider the following hypothetical "time series" or "profile" expression:

select nymex/gold_price * nymex/gold_volume

To analyze this, the TSDS would join the two series nymex/gold_price and nymex/gold_volume based on the overlapping areas of time for each, multiply the values where they intersect, and then output a single composite time series.

Obviously, more complex expressions are allowed. TSDSs often allow users to manage a repository of filters or masks that specify in some way a pattern based on the day of a week and a set of holidays. In this way, one can readily assemble time series data. Assuming such a filter exists, one might hypothetically write

select onpeak( cellphoneusage )

which would extract out the time series of cellphoneusage that only intersects that of 'onpeak'. Some systems might generalize the filter to be a time series itself.

This syntactical simplicity drives the appeal of the TSDS. For example, a simple utility bill might be implemented using a query such as:

select max( onpeak( powerusagekw ) ) * demand_charge;
select sum( onpeak( powerusagekwh ) ) * energy_charge;

TSDS also generally have conversions to and from specific time zones implemented at the server level.

[edit] Benefits

In the power industry, TSDS can simplify calculating utility bills on the consumer side as well as ease the evaluation of complex portfolios on the supplier side. Telecommunications vendors having similar technical problems benefit similarly. From a TSDS perspective, there is little difference in the treatment of a cell phone bill or communications assets as opposed to a power bill and a generation asset. Because of their ability to store mountains of time series data, TSDSs also allow environmental concerns such as weather or emissions monitors to more quickly build off the rack solutions.

[edit] Drawbacks

As of now there is no standard for a time series database server language. Some vendors support transactions, others do not. Some systems are focused on a particular vertical market, such as energy or stocks. Others take an approach that tries to unify views across vertical markets into a time series field, but these have yet to meet with widespread commercial acceptance.

[edit] Example

A workable implementation of a time series database can be easily deployed in a conventional SQL-based relational database provided that the database software supports both binary large objects (BLOBs) and user-defined functions. SQL statements which operate on one or more time series quantites on the same row of a table or join can easily be written, as the user-defined time series functions operate comfortably inside of a SELECT statement. However, time series functionality such as a SUM function operating in the context of a GROUP BY clause cannot be easily achieved. Wonderware, a business unit of Invensys, has delivered more than 20,000 installations[1] of their IndustrialSQL Server Historian. IndustrialSQL is an extension to Microsoft SQL Server allowing the users to get the benefits from both a time series and a transactional database server.


[edit] See also

  • Historis (database), a time series database
  • FAME (database), a time series database

[edit] References

  1. ^ Overview

[edit] External links

Time Series Databases

Selected Power Authorities and Markets in the United States

Selected Commodities Markets in the United States