Subject | Re: [Firebird-Architect] Re: View updates and upward compatibility |
---|---|
Author | Ann W. Harrison |
Post date | 2004-10-18T20:35:07Z |
At 03:46 PM 10/18/2004, paulruizendaal wrote:
I described originally? There's a trigger on a view, but it
does not affect the parent table, only records the action in
a log table. Why should that disable the 'natural' update?
for 10 years, the default state of simple views has been UPDATEABLE.
Reversing that policy now will (in all probability) cause working
updates to fail if your model is adopted. In the current state of
Firebird 2 the updates don't occur - no error, not hint.
Regards,
Ann
>It is a while since I've looked at this, but my recollection ofBut only one of each, I think
>Oracle's way of doing it is:
>
>- On tables you can specify BEFORE and AFTER triggers
>- On views you can specify INSTEAD OF triggersUnder the Oracle model how would you handle the logging case
>- BEFORE and AFTER won't work with views
>- INSTEAD OF won't work with tables
>- Some views can be updated. If an updateable view has
> a trigger (which must be of type INSTEAD OF), 'natural'
> update is disabled/foregone
>
>The above sounds like a logical and sound design to me. Also, it
>seems to be compatible with the rules that Dmitry put forward (see
>Ann's earlier post).
I described originally? There's a trigger on a view, but it
does not affect the parent table, only records the action in
a log table. Why should that disable the 'natural' update?
> PerhapsIn the absence of 10 years of history, I'd agree with you. However
>we should not signal that natural update is switched off, but signal
>that it should be switched on. Something like:
>
>CREATE [UPDATEABLE] VIEW ...
for 10 years, the default state of simple views has been UPDATEABLE.
Reversing that policy now will (in all probability) cause working
updates to fail if your model is adopted. In the current state of
Firebird 2 the updates don't occur - no error, not hint.
Regards,
Ann