Oracle FAQ Your Portal to the Oracle Knowledge Grid

Home -> Community -> Usenet -> comp.databases.theory -> Re: Navigation question

Re: Navigation question

From: dawn <>
Date: 14 Feb 2007 16:47:14 -0800
Message-ID: <>

On Feb 14, 6:15 pm, "Marshall" <> wrote:
> On Feb 14, 1:59 pm, "dawn" <> wrote:
> > On Feb 14, 3:32 pm, "Marshall" <> wrote:
> > I have not seen any
> > applications that execute exactly one or even only (unordered) sets of
> > SQL statements,
> Any two SQL queries where query B is parameterized by
> data retrieved by query A can be rewritten into a single
> query.

Yes, but that isn't how software is written, is it? Have you ever seen an entire application that does not navigate the database in this way at some point (and for good reason)?

> The rewritten single query will (absent pathological
> behavior in the query optimizer) be at least as fast as
> the sum of the two original queries, and possibly faster.

I'm not sure I believe that, but let's say it is true, then what. What does the application code then do with this cartesian crossproduct  of data? Include just one "property" of an entity where the property has multiple values, such as e-mail addresses. We want the name of the company an the list of contact e-mail addresses (let's say there are 5 for our example), plus the postal address of the HQ, in some "header" block on a data entry page and then a list of orders and dates below it (let's say there are 100). So we retrieve a view that includes one row per e-mail address per order, for 600 rows we need to now deconstruct for the screen. Have you ever seen this done? I'm interested in whether there are really any significant applications that do no navigation -- do you really think there are? Thanks. -- dawn

> Network utilization will necessarily be at least a little better.
> Marshall
Received on Wed Feb 14 2007 - 18:47:14 CST

Original text of this message