Re: The wisdom of the object mentors (Was: Searching OO Associations with RDBMS Persistence Models)
Date: 13 Jun 2006 06:52:37 -0700
Message-ID: <1150206757.698134.88410_at_f6g2000cwb.googlegroups.com>
Robert Martin wrote:
> On 2006-06-01 12:56:01 +0200, frebe73_at_gmail.com said:
>
> > The big questing is: Why do you want to unplug the SQL DBMS?
>
> I don't. Just like I don't want to disconnect my engine from my car.
> However, I want the car designed such that the engine can be
> disconnected.
>
> I don't want to replace the DB, I just want it to be replaceable. This
> just makes for good modularity, and good testability. I do not want to
> sacrifice any of the power of the DB, I just want to place the code
> that uses that power in a place that the rest of the application is not
> directly aware of.
I don't think that's possible, since the power of a relational (or even SQL) DBMS is in the data definition, constraints, and manipulation it allows. Most database-aware applications end up duplicating at least part of all that in code.
Obviously analogies are what they are, but an engine doesn't have an output that's used throughout the car like data is used throughout an application. I think a better analogy might be that you want your car designed such that it doesn't rely on wheels and could easily be used with other forms of locomotion; but obviously that would mean so many changes that it would no longer be a car. Cars and planes have, as far as I know, little in common.
- erk