Re: Mixing OO and DB

From: Bob Badour <bbadour_at_pei.sympatico.ca>
Date: Thu, 13 Mar 2008 12:56:42 -0300
Message-ID: <47d94ebf$0$4057$9a566e8b_at_news.aliant.net>


topmind wrote:

> On Mar 12, 9:14 am, S Perryman <q..._at_q.com> wrote:
> 

>>Bob Badour wrote:
>>
>>>>Robert Martin wrote:
>>>>
>>>>>That's fine. Consider, for example, an algorithm that finds the
>>>>>minimum spanning distance of a graph. (e.g. cheapest network route, or
>>>>>cheapest travel itinerary, etc). The node and edges of the graph are
>>>>>stored in database tables.
>>>>>Shall we execute that algorithm by doing thousands of tiny queries as
>>>>>we walk from node to node through the edges? Or shall we query all the
>>>>>nodes and edges in one gulp, arrange them into a graph of objects, and
>>>>>walk through them that way?
>>>
>>>If one studies the algorithms for minimum spanning trees, one quickly
>>>sees the task involves no traversals whatsoever. In fact, one generally
>>>creates the MST as a precursor to some sort of traversal, and the
>>>algorithms themselves are specified in terms of sets, which makes them
>>>ideal for implementing relationally.
>>
>>What about the canonical graph algorithms (breadth/depth first, transitive
>>closure etc) ??

What about them? Where exactly did they appear in the algorithm I described for evaluating the minimum spanning forest? How exactly would an MST algorithm using some sort of traversal method deal with a multi-tree forest? How exactly would it traverse from one disjoint tree to another?

[snip] Received on Thu Mar 13 2008 - 16:56:42 CET

Original text of this message