Re: Decline of Science: Computer Science and Databases

From: Carl Rosenberger <carl_at_db4o.com>
Date: Thu, 28 Nov 2002 17:41:10 +0100
Message-ID: <as5gf4$u0n$07$1_at_news.t-online.com>


Alfredo Novoa wrote:
> >ObjectSet set = db.get(new Contract());
> >while(set.hasNext()){
> > System.out.println(set.next().toString());
> >}
>
> It is a cheap trick. You must have to harcode that report, and you
> have created a network style data design with the specific purpose of
> generating that report.

The "cheap trick" is called object orientation.

It uses "network style datadesign" all over to handle and modify data, not just for generating reports.

(As mentioned before: Please neglect".toString()" in the above example. Formatting the report is a different story. All I wanted to show is that it's a pain to set up a simple query for a high level class in an inheritance hierarchy, if your class structure is scattered across multiple tables.)

> >With your approach, your queries would have to resolve every single
> >relation by hand. You would either have to set up 30 individual
> >queries or you would need 30 outer joins in one monster query.
>
> Yes, a monster query for a monster design and a monster result. But
> still the best general purpose solution by far.
>
> And you always can generate that report using several queries and
> printed tables. Probabily it would have a better aspect.

It wasn't the "best general purpose solution" for the company I used to work for. For the complex problem that had to be solved, an object database would have been ideal.

> Only unthinking hackers wants to store class hierarchies in a
> database.

Only unthinking theoreticians produce generalisations like this one.

Your generalisation certainly is false for usecases where

- a network model is used to hold data
- compatibility to SQL is not an issue
- only a hierarchical access path is necessary
- time to market is essential
- the class model may be constantly refactored and reducing
maintenance work to do so is a must
- navigation solves all issues perfectly and queries aren't needed

Kind regards,
Carl

--
Carl Rosenberger
db4o - database for objects - http://www.db4o.com
Received on Thu Nov 28 2002 - 17:41:10 CET

Original text of this message