Re: Mixing OO and DB

From: Patrick May <pjm_at_spe.com>
Date: Tue, 11 Mar 2008 11:12:21 -0400
Message-ID: <m2wso9i9be.fsf_at_spe.com>


"Brian Selzer" <brian_at_selzer-software.com> writes:
> "Patrick May" <pjm_at_spe.com> wrote in message news:m28x0riv27.fsf_at_spe.com...
>> In any case, we're getting a little far afield from the
>> original question. In enterprise systems, denormalization for
>> performance does take place. This is just one of several reasons
>> for decoupling the application logic from the database schema.
>
> I don't agree with this. You're equating the database schema with
> the database implementation.

     Not at all. I don't see where you get that from what I wrote.

> The schema specifies what information is to be and can be recorded.

     Yes.

> As such the schema is an integral part of the application
> specification, and it cannot be decoupled

     No. One schema can support multiple applications, and often does in enterprise environments. One application can be supported by different schemas -- there is not one and only one way to represent the information required by the application.

     Even if an application uses the database system's capabilities to implement some application functionality, there are still changes to the underlying schema that do not, or should not, require change to the applications that use that schema. This is why approaches like dependency inversion are useful. The application depends on an interface and the combination of database schema and any logic running in the database implements that interface. Either can change without impacting the other.

Sincerely,

Patrick



S P Engineering, Inc. | Large scale, mission-critical, distributed OO
                       | systems design and implementation.
          pjm_at_spe.com  | (C++, Java, Common Lisp, Jini, middleware, SOA)
Received on Tue Mar 11 2008 - 16:12:21 CET

Original text of this message