Time Series

Introduction

We will first take a look at a high-level view of time series before diving into specifics for RaimaDB. Time series is a data model for data that is collected periodically over some time. The data will typically be indexed, listed, analyzed, and graphed. There are mainly two domains for time series, which we will cover in the following subsections.

The Time Domain

The first of the two domains is the time domain, where the data consist of discrete measurements with time stamps that are used to extract certain characteristics. This data can then be used for monitoring, reporting, or making future predictions. For efficient retrieval, storage, and lookup, the data is indexed, downsampled, and/or aggregated.

The Frequency Domain

The other domain is the frequency domain, where the data consist of power spectrums. Instead of discrete measurements with respect to time, we have a power spectrum with respect to frequency over a time interval. Power spectrums with high frequencies will normally be over a short time interval while lower frequencies will be over a longer time interval. Data in the time domain can be converted to the frequency domain and vice versa by doing a Discrete Fourier Transform (DFT) or an Inverse DFT.

Fast Fourier Transform (FFT)

Fast Fourier Transform (FFT) is a class of algorithms for the Discrete Fourier Transform (DFT). If you are unfamiliar with FFT, we would recommend the following resource:

RaimaDB implements a simple, reasonably efficient algorithm with some limitations for converting data between the time domain and the frequency domain. If a more general solution or higher performance is needed than RaimaDB offers we suggest FFTW1:

The RaimaDB FFT implementation has been integrated with the time series template classes presented later.

Continue with the C++ Template Classes for Time Series section.