Re: Mixing OO and DB

From: Gene Wirchenko <>
Date: Tue, 04 Mar 2008 14:45:08 -0800
Message-ID: <>

Marshall <> wrote:

>On Mar 4, 10:10 am, Gene Wirchenko <> wrote:
>> Robert Martin <> wrote:
>> >get_accountant("Bob");
>> > or
>> >find_by_name_and_department("Bob", "Accounting");
>> >I'm sure you can think of some others that would read nicer than the SQL.
>> Now throw another column into the mix. How many methods are you
>> going to end up with? What will you have gained?
>Nice point.
>Now let's consider what all the combinations are. If we have
>a single table with ten columns, then we have 1024 possible
>column lists, so if we want a class for each such we need
>a thousand classes. We also have to consider how many
>"find" methods we need. This is a function of the number


     There are even more. I may want ranges. How many employees are in pay category a to pay category b? Which work orders have status other than billed or void?


Gene Wirchenko

Computerese Irregular Verb Conjugation:

     I have preferences.
     You have biases.
     He/She has prejudices.
Received on Tue Mar 04 2008 - 23:45:08 CET

Original text of this message