Re: Mixing OO and DB

From: Robert Martin <unclebob_at_objectmentor.com>
Date: Tue, 4 Mar 2008 17:08:28 -0600
Message-ID: <2008030417082811967-unclebob_at_objectmentorcom>


On 2008-03-04 00:15:44 -0600, topmind <topmind_at_technologist.com> said:

>
>
> Robert Martin wrote:

>> On 2008-03-02 13:19:34 -0600, frebe <frebe73_at_gmail.com> said:

>
>>> If testing without the DB should be interesting at all, it means that
>>> you don't use the db for application logic.
>> 
>> It means that you don't use the database for *all* application logic.
>> Consider, for example, determining the simplest travel schedule for 100
>> sales people visiting 500 cities.  You wouldn't want to write that
>> algorithm in SQL.  And you'd want to test it against many different
>> data regimes.  Testing it without the database in place could be useful.
>> 

>
> You are fishing a bit here. Existing RDBMS generally don't work that
> well with graph-traversal problems, and it is indeed a known weakness
> of the existing crop.

I wasn't trying to pick on any kind of "known weakness". So let's say we want to send email to certain salesmen, or check the DMV web service for certain license numbers, or (I actually had a student in a class who's job it was to do this) sound the early warning siren at particular times.

> However, I see nothing wrong with using a RDBMS to store multiple
> *test cases*.

Neither do I. There are situations where that's really useful.

-- 
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 Wed Mar 05 2008 - 00:08:28 CET

Original text of this message