Re: Mixing OO and DB

From: frebe <>
Date: Thu, 28 Feb 2008 22:31:22 -0800 (PST)
Message-ID: <>

> >> We still have it, and we still use it.  But we also hide it from
> >> the bulk of the application.
> > What is the benefit with hiding SQL from the bulk of the
> > application?
>      For one thing, it decouples the application code and the database
> schema.  

And the benefit with decoupling application code and database schema, is?

> For another, as noted by Mr. Martin, it allows the creation
> of a domain specific language that better reflects the concepts in the
> problem and solution domains.

What created language are you talking about, the API?

> > If you have a lot of find_by_xxx methods, swapping would still be
> > quite difficult.
>      That is true.  In my experience there isn't usually a
> proliferation of such methods because traversal is done by object
> reference rather than by some subset of object state.

What does the number of find_by_xxx methods has to do with object traversal? Anyway, I have seen many "OO" application, there the number of find_by_xxx methods are huge and you are forced to use a find_by_xxx methods that doesn't really fit, or create a new one.

//frebe Received on Fri Feb 29 2008 - 07:31:22 CET

Original text of this message