Re: How to ensure data consistency?

From: Tony <andrewst_at_onetel.com>
Date: 7 Sep 2004 07:57:58 -0700
Message-ID: <ed8a00fa.0409070657.22221eb5_at_posting.google.com>


ddtl <fake_at_address.com> wrote in message news:<3fsrj0lpe76pfvfjfe1ur2ubpb3hqu69fg_at_4ax.com>...
> it is impossible to enforce specialization constraints, and the only way to
> ensure that every item with additional properties in the super-table has
> an entry in the appropriate sub-table, is in the front end and not in a
> database itself :-(.
>
> Probably there is a need to design a separate input form for each type of
> items in the super-table (so that the user won't have to think into which
> sub-table he has to enter an additional information), and to commit
> (programmatically) user's input to a database only after he had filled in
> all the additional properties - then the front-end should create an entry
> in a super-table. If succeeded, it should create an additional entry in an
> appropriate sub-table, and if there was an error - to delete an entry in a
> super-table (that probably should be done in a transaction).
>
> I thought that using a good database (like postgresql I am using) will
> allow give the user familiar only with INSERT and UPDATE commands
> a direct access to a database to add new data, and a carefully
> implemented database rules will prevent that user from doing anything
> to compromise data integrity. Apparently, it is not so :(.

It would be possible, if Postgres supported the ANSI "CREATE ASSERTION" statement. Presumably it does not? Received on Tue Sep 07 2004 - 16:57:58 CEST

Original text of this message