Re: The wisdom of the object mentors (Was: Searching OO Associations with RDBMS Persistence Models)
Date: Tue, 13 Jun 2006 11:22:47 +0200
Message-ID: <2006061311224716807-unclebob_at_objectmentorcom>
On 2006-06-01 22:26:02 +0200, "Mikito Harakiri"
<mikharakiri_nospaum_at_yahoo.com> said:
>> what's wrong with my assertion that application design should be decoupled >> from database design.
>
> Assertion alone is worthless without solid method that supports it. And
> what method OO propellerheads suggest? OR mappers (which essentially
> are reincarnated OODBMS)? What I am supposed to learn 20 something
> ad-hock mapping types instead of 6 clean relational operators? Or worse
> yet, some "pattern"?
Databases are data centric. While they have behaviors; those behaviors
are related to data management. Applications are behavior centric,
while they manipulate data, the things that do to that data are rich
with business rules and formatting behaviors.
Applications are generally independent of each other (altough they
often communicate indirectly through the DB). Changes to applications
have much to do with behavior and formatting, and not so much to do
with data.
Since the forces that change databases and applications are different, and their customers are different, they should be designed for these different environments and constraints. An application should be designed such that it's modules are flexible and easy to change. A database should be designed such that it's changes to it's structure minimize impact on all the applications.
If an application depends strongly on the database structure, then the structure of its behaviors will be coupled to the database structure. Since this structure is a result of catering to many different applications, each application will have an indirect coupling on all the others. Or to say this a different way, the application will not be able to use the data structures that are most favorable to its algorithms because it is coupled to the DB whose data structures are a compromise between all applications.
-- Robert C. Martin (Uncle Bob) | email: unclebob_at_objectmentor.com Object Mentor Inc. | blog: www.butunclebob.com The Agile Transition Experts | web: www.objectmentor.com 800-338-6716 |Received on Tue Jun 13 2006 - 11:22:47 CEST