pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
To: SQL Padawan <sql_padawan@protonmail.com>
To: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: Understanding the differences between Temporal tables, CDC and Time Series.
Date: Wed, 10 Nov 2021 08:53:44 +0100
Message-ID: <a195ee12-f777-0624-11cc-aa0ca012d046@enterprisedb.com> (raw)
In-Reply-To: <-6G4DflKS7DGekpDCJwxfFi-cGwrdnftqvxBirKKSxnVT-OmPkn9kKPmyG7BDHLNfGWHtcchPSOkdUuR2UvxaTTZOCs4JEz0VYa8E02Agwc=@protonmail.com>
References: <-6G4DflKS7DGekpDCJwxfFi-cGwrdnftqvxBirKKSxnVT-OmPkn9kKPmyG7BDHLNfGWHtcchPSOkdUuR2UvxaTTZOCs4JEz0VYa8E02Agwc=@protonmail.com>

On 10.11.21 07:43, SQL Padawan wrote:
> I'm looking into Temporal Tables (TT - i.e. System/Application time 
> versioning) but I would like to understand the differences between TTs 
> and two other features (which appear similar in many ways) - Change Data 
> Capture and Time Series.
> 
> Are Temporal Tables (in a sense) a query framework framework around CDC?
> 
> And if that's the case, what then are Time Series - which are 
> specifically designed to host (time) changing data?
> 
> Are Temporal Tables (again, in a sense) Time Series databases which only 
> record changes in time(-stamps)?
> 
> I'm unclear as to the "philosophical" distinctions here and would be 
> grateful if anybody could explain the diffence(s) between them?

A time series database contains data records containing a time stamp (a 
point in time).  These records represent things that happened, for 
example log files, measurements, events.  This data is then usually used 
for analytics, such as, how many web site visitors did we have per hour 
over the last week.

A temporal database contains records that have a timestamp range (in 
PostgreSQL terms, also known as period or interval, delimited by two 
points in time).  There are (at least) two ways to use this.  One is 
that the database system automatically records when a record was 
inserted, updated, and deleted, so that historical versions of records 
are automatically kept, and you can then query, what was the value of 
this at this time, or more generally what was the result of this query 
at this time.  Use cases here are record-keeping, auditing, and the 
like.  The other is that the database users themselves enter when a 
record is supposed to be valid, and the database system takes this into 
account in queries.  So you could have product prices or salaries that 
automatically change at a certain time.  This is basically a tool to 
make development of certain database applications more convenient.

So these two concepts are really totally separate and independent 
things, except that they have a word based on "time" in their name.





view thread (3+ messages)  latest in thread

Message-ID: <a195ee12-f777-0624-11cc-aa0ca012d046@enterprisedb.com>
Permalink:  ../a195ee12-f777-0624-11cc-aa0ca012d046@enterprisedb.com/
Also on:    postgresql.org/message-id/a195ee12-f777-0624-11cc-aa0ca012d046@enterprisedb.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: peter.eisentraut@enterprisedb.com, sql_padawan@protonmail.com
  Subject: Re: Understanding the differences between Temporal tables, CDC and Time Series.
  In-Reply-To: <a195ee12-f777-0624-11cc-aa0ca012d046@enterprisedb.com>
  References: <-6G4DflKS7DGekpDCJwxfFi-cGwrdnftqvxBirKKSxnVT-OmPkn9kKPmyG7BDHLNfGWHtcchPSOkdUuR2UvxaTTZOCs4JEz0VYa8E02Agwc=@protonmail.com> <a195ee12-f777-0624-11cc-aa0ca012d046@enterprisedb.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox