Temporal Table Relations and Referential Integrity

From: Richard Broersma Jr <rabroersma(at)yahoo(dot)com>
To: SQL Postgresql List <pgsql-sql(at)postgresql(dot)org>
Subject: Temporal Table Relations and Referential Integrity
Date: 2007-05-07 14:59:22
Message-ID: 124864.59370.qm@web31806.mail.mud.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

In non-temporal tables, changes to the primary key of a Parent table and record deletions can be
cascaded to a related Child table using "REFERENCES Parent( Parent_code ) ON DELETE CASCADE ON
UPDATE CASCADE,"

However, since temporal UPDATEs and DELETEs do not behave in the same way as they do in
non-temporal tables, is anyone able to successfully use Referential Integrity constraints between
Parent and Child tables? Or are custom triggers the only solution to maintain temporal relations
between Parents and Children? My question deals specifically with the "Current" style of temporal
relations, where only the currently known attributes and attribute histories are stored.

As a second question, would anyone know if temporal referential integrity is targeted for future
inclusion into the SQL standard?

I would be happy to elaborate on what I mean by Temporal Referential-Integrity (RFI) if my
questions are unclear.

Regards,
Richard Broersma Jr.

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Aaron Bono 2007-05-07 16:40:19 Re: Sequence vs. Index Scan
Previous Message Tom Lane 2007-05-07 14:37:59 Re: Sequence vs. Index Scan