Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mkiQZ-0007XP-L2 for pgsql-general@arkaria.postgresql.org; Wed, 10 Nov 2021 07:53:51 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mkiQY-0002DT-9k for pgsql-general@arkaria.postgresql.org; Wed, 10 Nov 2021 07:53:50 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mkiQX-0002DJ-V8 for pgsql-general@lists.postgresql.org; Wed, 10 Nov 2021 07:53:49 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mkiQV-0002SG-8C for pgsql-general@lists.postgresql.org; Wed, 10 Nov 2021 07:53:48 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 751335C019C; Wed, 10 Nov 2021 02:53:46 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Wed, 10 Nov 2021 02:53:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=nuwLtAJOh0FiCIEAla+FDlK548r/AnXcz4wGt3uc9 IE=; b=VxYer9nAqHXGGNLFClQv2uxrj1c0qSRbm0Lw/WusMizEhqLXgNVR42Pek MJyu4z0Mx4XmFBvg2Cwh6Y2cTKLJQPH6SRITwvGOCD4tDZfyXlKmjpBlvi+FyAQY mlkXfjqRFBvvKGNt5Gb99ibUPwsolJgmRULLtnEtUy2Y/hvpozrI1+qrPa+aOUUE QvBa+//eZAezOuYzfL5YNyF2rOCxRu69XIZHZhuCUIyECm40e81Cynm8+QEEiEZx S+WkZKlZZK++I4UxmdN68WX23gOVsGk7wmm5MpCd0QNKxvSGj0qoweXuspRtgGz7 akP5DXDDrjgY/sZX+2rsaldhOle0g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrudehgdelkecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefkffggfgfuvfhfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpefrvghtvghr ucfgihhsvghnthhrrghuthcuoehpvghtvghrrdgvihhsvghnthhrrghuthesvghnthgvrh hprhhishgvuggsrdgtohhmqeenucggtffrrghtthgvrhhnpeefjeegheetuefhveevudel ueeftdejteeiffetvdduhfdtieefgfeutedtveeggfenucevlhhushhtvghrufhiiigvpe dtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehpvghtvghrrdgvihhsvghnthhrrghuthes vghnthgvrhhprhhishgvuggsrdgtohhm X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 10 Nov 2021 02:53:45 -0500 (EST) Message-ID: Date: Wed, 10 Nov 2021 08:53:44 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.3.0 Subject: Re: Understanding the differences between Temporal tables, CDC and Time Series. Content-Language: en-US To: SQL Padawan , "pgsql-general@lists.postgresql.org" References: <-6G4DflKS7DGekpDCJwxfFi-cGwrdnftqvxBirKKSxnVT-OmPkn9kKPmyG7BDHLNfGWHtcchPSOkdUuR2UvxaTTZOCs4JEz0VYa8E02Agwc=@protonmail.com> From: Peter Eisentraut In-Reply-To: <-6G4DflKS7DGekpDCJwxfFi-cGwrdnftqvxBirKKSxnVT-OmPkn9kKPmyG7BDHLNfGWHtcchPSOkdUuR2UvxaTTZOCs4JEz0VYa8E02Agwc=@protonmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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.