Re: Unknown SQL
Date: Sat, 21 Jul 2001 18:01:45 GMT
Message-ID: <9curf7$r6m$06$1_at_news.t-online.com>
Philip Lijnzaad wrote:
> There are a few that I left out, but which are very relevant when
managing
> large datasets:
...
[excellent examples for mass updates]
...
I fully agree that all of your samples are frequently necessary. It is interesting to see that all of them are not for everyday business-logic but for research, testing, maintenance and "getting the feel of the data".
Two weeks ago we had an internal discussion, if we want to include update
queries into our specification. Your arguments might lead us to reconsider
standpoints.
Thank you.
> Do you mean something like
>
> UPDATE Customers c
> SET c.balance = c.balance +
> (SELECT SUM(amount)
> FROM Payments p
> WHERE c.custid = p.custid
> AND p.date > c.last_update
> HAVING SUM(amount) > 0.0) ,
> c.last_update = TODAY()
> WHERE c.credit_rating < 3;
>
> If OODBMs offer this, excellent. I haven't seen the query capability
> necessary for this yet, though.
No, as far as I know there is no ODBMS that offers the above functionality. POET and O2 (dead) would be the ones to take a look at.
We hope to provide a callback interface to handle examples like the above within the next 6 months.
> Carl> - A callback interface "Updateable". The update() method would be
called
> Carl> with every object of the resultset of a query.
>
> So you would have 1 million callbacks if the result set is that big? You
> prolly want to put the update() or commit() method on the objectSet, not
on
> the individual objects.
If the server is written in the same programming language as the callback object, it is no problem to automatically transfer the update closure to the server and execute it there.
Execution would have exactly the same performance as "native" loop code.
Kind regards,
Carl
--- Carl Rosenberger db4o - database for objects - http://www.db4o.comReceived on Sat Jul 21 2001 - 20:01:45 CEST