Subject Re: Order of execution cascade operations
Author Adam
--- In firebird-support@yahoogroups.com, "tomjanczkadao"
<tomjancz@...> wrote:
>
> >
> > But yes, by the time you do a select on OLD.fk2 from
> > the master_table, the record is already gone.
>
>
> i've noticed this behavior and i was surprised. Isn't it temporary
> violation of foreign key fk2? (it reference to non-existing master
record)
>
> Regards, Tomek
>

Blast from the past there, June 2007.

At the start and end of every transaction the database is consistent.
At the start and end of every DML statement the database is
consistent. At the start and end of every operation the database is
consistent.

Nowhere can your client applications or PSQL access an inconsistent
database.

So yes, as an implementation artifact there is technically a violation
within an operation that is guaranteed solved by the time the
operation succeeds or fails. But I think it would be a technicality
and quite fussy to call it a problem.

Adam