Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Referential integrity considering Status?

Referential integrity considering Status?

From: Fernando Rui A. Raimundo <raimundoNO_at_XPAMmail.telepac.pt>
Date: Tue, 21 Aug 2001 10:52:25 +0100
Message-ID: <u3a4otk787pa9me5ittj011i05asmqog6n@4ax.com>


I'm building a database in which most tables have a status column with Active, Inactive and Deleted status. Most deletes are logical and just affect this status column.

Details of referential integrity aren't important to my point, but they go along these lines: new records can only reference Active records; any record can go from Active to Inactive, but can go to Deleted only if every reference to it is Deleted too; and so on.

The problem is that the database internal referential integrity is based solely on existence or non-existence of records. So my solution is to build triggers in every table considering every relation. I'll do it if I must, but it is quite a considerable task, prone to error, and I fear performance problems. And in many relations even this solution fails due to the dreadful 'mutating table' error.

I believe this must be a common situation. So my question is: Is there a better technique to implement referential integrity considering record's status? Any good book, web page, or other resource on this subject?

Thanks in advance.
(if you prefer to reply by email, please note the anti-spam measures below.)

Fernando Raimundo
raimundoNO_at_XPAMmail.telepac.pt

[P.f. remova as 6 MAIUSCULAS] [Please remove all 6 CAPITALS] Received on Tue Aug 21 2001 - 04:52:25 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US