design for multiple time series - Mailing list pgsql-general

From Seb
Subject design for multiple time series
Date
Msg-id 87txed9acf.fsf@kolob.subpolar.dyndns.org
Whole thread Raw
Responses Re: design for multiple time series  (Jayadevan M <maymala.jayadevan@gmail.com>)
Re: design for multiple time series  (rob stone <floriparob@gmail.com>)
List pgsql-general
Hi,

I'm working on the design of a database for time series data collected
by a variety of meteorological sensors.  Many sensors share the same
sampling scheme, but not all.  I initially thought it would be a good
idea to have a table identifying each parameter (variable) that the
sensors report on:

CREATE TABLE parameters (
    parameter_id serial PRIMARY KEY,
    parameter_name character_varying(200) NOT NULL,
    ...
)

and then store the data in a table referencing it:

CREATE TABLE series (
    record_id serial PRIMARY KEY,
    parameter_id integer REFERENCES parameters,
    reading ????
    ...
)

but of course, the data type for the parameters may vary, so it's
impossible to assign a data type to the "reading" column.  The number of
variables measured by the sensors is quite large and may grow or
decrease over time, and grouping them into subjects (tables) is not
clear, so it's not simple to just assign them to different columns.

I've been trying to search for solutions in various sources, but am
having trouble finding relevant material.  I'd appreciate any advice.

Cheers,

--
Seb


pgsql-general by date:

Previous
From: "Francisco Figueiredo Jr."
Date:
Subject: Re: Npgsql - Where can I find Npgsql.NpgsqlServices
Next
From: Koichi Suzuki
Date:
Subject: Re: [Postgres-xc-general] "Tuple not found error" during Index creation