Subject Re: [ib-support] updatable views, joins, read-only views
Author unordained
i'll accept that firebird has no plans to implement updatability on views resulting from a join, and i cannot speak to
the SQL standards on this issue ... but i can say, at the expense of being a stinker, that it is most definitely not
logically impossible. i'll refer you to Chris Date (C.J. Date of relational database theory fame, right along with E.F.
Codd et. al.):

http://www.pgro.uk7.net/views2_0110.htm (sorry, they're not exactly the most entertaining authors)

there are problems, yes, with updating joins. but it is not categorically impossible, from a relational perspective.
i'd rather firebird be relationally-complete than sql-compliant. doesn't firebird have an older, non-sql internal
language it spoke before sql? (other than the byte-code!)

that said, i'll probably wind up, as suggested, either using procedures or triggers on the joined view. it's a one-time
thing, fixing some accounting rows that got out of sync (thanks to a bug in our software, now fixed) ... so i shouldn't
need triggers on the master records to keep the detail records in sync. they should be, from now on.

(in this case, i was going to update, through the view, values in 'detail' records, based on values in the 'master'
record. therefore, the effect of the update statement would have been to update exactly one row, in one (base) table,
the 'detail row' ... had i been updating the 'master' records, yes, there would have been a logical problem, as i would
have, effectively, been updating many rows in the view (but only one row in one base table) while only asking to update
one row of the view.)

thanks for your time, and good luck to you all ...

-philip

---------- Original Message -----------
From: Helen Borrie <helebor@...>
To: ib-support@yahoogroups.com
Sent: Wed, 16 Apr 2003 19:32:51 +1000
Subject: Re: [ib-support] updatable views, joins, read-only views

> No, they are also logically impossible. Under SQL rules, each update,
> insert or delete statement can operate on one and only one table. There
> isn't any syntax (or logic) that says
> update tablea and table b...
> and you can't issue multiple statements in one "hit".
>
> Yes, of course. You can write a stored procedure. In some cases, you
> might achieve what you want with an after update trigger. Various database
> access components encapsulate ways to make joined sets "updatable" at the
> client.
>
> No, Firebird has no plans at present to be a non-SQL database. :-)
>
> heLen