Re: S.O.D.A. database Query API - call for comments
Date: Sun, 29 Apr 2001 13:47:16 +0200
Message-ID: <9cgv1d$lf3$07$1_at_news.t-online.com>
AV wrote:
> IMHO, from practical point of view, SODA would gain having
> -- query returns Collection or array. Why new ObjectSet interface?
Hi Alex,
The reason against the usage of arrays:
You would want to have the ability to instantiate objects on demand. A
result of a call to size() might tell you that it would not be a good idea
to load 50 million objects over your modem connection.
ObjectSet rather is an Iterator or Enumeration than a Collection.
Why a new interface?
S.O.D.A. is not intended to be only for Java.
Which standard is supported in a wide range of languages?
JDK 1.1.x is far from being dead since it looks like it will be widely used on the Symbian EPOC platform.
> -- work with public setter/gutter rather than public attributes
> (we are in OO train, aren't we?)
You should consider two levels here:
A database stores objects with attributes, not with methods. Queries are run against the database.
Getters/Setters are used to descibe business logic. You typically do not want to trigger getter business logic upon a call to a database query.
Two further points:
- Working with setter/getter methods would imply that you would need the
code of the application on the server side. The backend for the current
approach can work with abstract objects.
- Typical getter/setters might be obsolete in the near future. Have a look
at properties in C#.
> -- examples how to manipulate attributes inherited from subclasses.
> -- example of precompiled preparedStatement
Thank you for these two hints to continue working on examples.
> Question of sql portability has several sides.
> -- knowledge of sql and pl/sql is 95-105 % portable
105% ?
Are you talking about the portability of code or the portability of coders
knowledge?
Both are of course portable to some degree.
> -- in many (in most?) cases database(s) are fixed
This is of course true but evolution always needs to continue. Just consider the effort the mobile telephone industry is currently undertaking to set up packet based communication systems.
> -- for programmer of universal db-access layer
> several non-standard features are something to deal with...
I don't quite understand the point here.
Have a nice Sunday.
Thank you very much for your comments.
Kind regards,
Carl
--- Carl Rosenberger db4o - database for objects - http://www.db4o.comReceived on Sun Apr 29 2001 - 13:47:16 CEST