Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 4FDB59FB6B1 for ; Mon, 14 May 2007 14:00:41 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 45436-04 for ; Mon, 14 May 2007 14:00:38 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from web31805.mail.mud.yahoo.com (web31805.mail.mud.yahoo.com [68.142.207.68]) by postgresql.org (Postfix) with SMTP id 5F1B19FB48E for ; Mon, 14 May 2007 14:00:37 -0300 (ADT) Received: (qmail 92380 invoked by uid 60001); 14 May 2007 17:00:36 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=jd4tdXgD4TJWRNYAnmnIsgoPZ4BNz12M1/0g98qhDsqAXaXiEXaaQw9hwQahuAXp8uUm6x8j6OBhBDCAyDxpQ5OmlnsC8eANd8b3i5I/zfNc8kA5wJBIMQnVbwCMuz7M9TLNCKTVm5HjQ6gikmKyNeKyKHrHzKhxLV6sx3j3HGY=; X-YMail-OSG: E.CknGoVM1mwzJNB0x5o46we_lpxy4Lp4ufAJawp37Cm7p6XJVbAhCm3zoJg1YFZtg-- Received: from [63.203.180.122] by web31805.mail.mud.yahoo.com via HTTP; Mon, 14 May 2007 10:00:36 PDT Date: Mon, 14 May 2007 10:00:36 -0700 (PDT) From: Richard Broersma Jr Subject: Re: Temporal Table Relations and Referential Integrity To: Michael Glaesemann Cc: SQL Postgresql List In-Reply-To: <513B4F8D-D6E6-4B41-BDF8-F1017FE74ECD@seespotcode.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Message-ID: <245961.91228.qm@web31805.mail.mud.yahoo.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.66 tagged_above=0 required=5 tests=AWL=-0.096, BAYES_00=-2.599, DNS_FROM_RFC_ABUSE=0.2, DNS_FROM_RFC_POST=1.708, DNS_FROM_RFC_WHOIS=1.447 X-Spam-Level: X-Archive-Number: 200705/106 X-Sequence-Number: 28386 --- Michael Glaesemann 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.