pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Richard Broersma Jr <rabroersma@yahoo.com>
To: Michael Glaesemann <grzm@seespotcode.net>
Cc: SQL Postgresql List <pgsql-sql@postgresql.org>
Subject: Re: Temporal Table Relations and Referential Integrity
Date: Mon, 14 May 2007 10:00:36 -0700 (PDT)
Message-ID: <245961.91228.qm@web31805.mail.mud.yahoo.com> (raw)
In-Reply-To: <513B4F8D-D6E6-4B41-BDF8-F1017FE74ECD@seespotcode.net>


--- Michael Glaesemann <grzm@seespotcode.net> wrote:
> It'd be helpful if you provided links to what you refer to as the  
> Current style. The only reference for managing temporal data in ANSI  
> SQL I'm aware of is Snodgrass' "Developing Time-Oriented Database  
> Applications in SQL"[1]. Date, Darwen, and Lorentzos' "Temporal Data  
> and the Relational Model"[2] is a more general text on the same  
> topic, but isn't directly applicable to ANSI SQL.

The "Current style" should actually be called "Current State".  There are three temporal models
discussed in the Snodgrass book: Current, Sequenced, and Non-Sequenced State Tables.  This is
described in Chapter 7 sections 1-3.  The Current State table only models currently known and
historical values of the database.  Sequenced and Non-Sequenced can model past/present/future
data.

The temporal relationship that I am interested in modeling is a temporal parent that is related to
a temporal child.  I wanted to see if any method exists to support Referential Integrity that can
handle Temporal ON UPDATE CASCADE and ON DELETE CASCADE between the parent and child tables.

Snodgrass page 127 code fragment 5.20 uses a "CREATE ASSERTION" to maintain RI for CURRENT STATE
data between a temporal parent and child.  However, I am looking for a method to extend this
example to allow ON UPDATE CASCADE and ON DELETE CASCADE, since the CREATE ASSERTION method will
only prevent you from from altering the data in a way so as to make it inconsistent between the
two tables.

> [2](http://www.amazon.com/gp/product/1558608559/)
I did purchase the Chris Date book, but I haven't spend any time reading it since its
illustrations use Tutorial-D instead of SQL.

Regards,
Richard Broersma Jr.




view thread (3+ messages)

Message-ID: <245961.91228.qm@web31805.mail.mud.yahoo.com>
Permalink:  ../245961.91228.qm@web31805.mail.mud.yahoo.com/
Also on:    postgresql.org/message-id/245961.91228.qm@web31805.mail.mud.yahoo.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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: rabroersma@yahoo.com, grzm@seespotcode.net
  Subject: Re: Temporal Table Relations and Referential Integrity
  In-Reply-To: <245961.91228.qm@web31805.mail.mud.yahoo.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