Re: Mixing OO and DB

From: David Cressey <cressey73_at_verizon.net>
Date: Sun, 09 Mar 2008 12:17:53 GMT
Message-ID: <RzQAj.3752$Mp4.2818_at_trndny02>


"Marshall" <marshall.spight_at_gmail.com> wrote in message news:485c487b-90d4-477f-a26a-10a280110d29_at_e6g2000prf.googlegroups.com...
> On Mar 8, 6:07 pm, Robert Martin <uncle..._at_objectmentor.com> wrote:
> > On 2008-03-06 15:37:56 -0600, topmind <topm..._at_technologist.com> said:
> >
> > >> Each small group of classes becomes a little roll-your-own data
access
> > >> and manipulation scheme that is perfectly tuned for it's very
specific
> > >> purpose.
> >
> > > Which is over-kill for the task-level.
> >
> > Do you have proof that it's overkill? Do you have any objective
> > measurements that it's overkill? Or it is just your own opinion. I
> > mean, if it works for you that's great, but don't force your own
> > opinions on everyone else <grin>
>
> This is a fallacious argument. You're proposing extra effort without
> justification. The idea that, in the absence of evidence either way,
> topmind's proposal of not putting in that effort is on equal footing
> with yours doesn't hold. Extra effort requires justification. What
> you are saying is, "hey, we don't know if this work has any value
> or not, so doing it is just as justified as not doing it."
>
> Burden of proof and all.
>
>
> > It is very common for programmers to manipulate data into forms that
> > are particularly convenient for the application they are writing.
> > Databases are seldom in that form since (for one thing) they must
> > usually serve many different and competing applications.
>
> (I'm going to just label the above as bogus without justification.
> It's late and I'm lazy.)

Not so fast, Marshall.

There's a germ of truth in his comment. The difference is between fine tuning for a special purpose and broad tuning for multiple purposes.

Let me make two analogies:

First, in gasoline engines. There is a certain kind of gasoline engine that's used for purposes like pumping water. The way these machines are tuned is very different from the tuning of an auto engine. These engines deliver very good power within a very narrow band of RPM, and get more energy out of the gasoline, to boot. However, if you operate them out of their comfort zone, their power delivery is pitiful. I'll call that "narrow tall peak" tuning, for lack of a better term.

An auto engine is tuned to deliver fairly good power over a fairly wide band of RPM. How wide depends on the trannie. The cost is that the peak is not nearly as tall.

The other analogy is with what has been called "query bias" in here. Single use data can be manipulated into a form that highly convenient for a certain kind of use. Data that is used in a variety of ways tends to be manipulated into a form that's not quite as convenient for any one of the uses, depending on other factors.

A well tuned database can outperform a badly tuned database by ten to one or more. However, one way to get a badly tuned database is to design it for a single purpose, and then try to extend its mission to cover multiple purposes.

I don't think we should go quite so far as to claim that application programmers should make their application look more like a database. All I want them to give is that their specialized use of the data is parochial compared to the larger issue of sharing the data. Each application programmer tends to view his own application as the center of the universe. It isn't.

BTW, "the database" isn't the center of the universe, either, much as a DBA will tell you otherwise. A database view of the data is itself parochial when compared with enterprise wide data integration. But that's another discussion. Received on Sun Mar 09 2008 - 13:17:53 CET

Original text of this message