Re: Is relational theory irrelevant? (was Re: Dreaming About Redesigning SQL)

From: Tony <andrewst_at_onetel.net.uk>
Date: 11 Nov 2003 06:56:46 -0800
Message-ID: <c0e3f26e.0311110656.1261438f_at_posting.google.com>


michael_at_preece.net (Mike Preece) wrote in message
> Anyway, it does allow me to type in something like:
>
> List Persons "Mike" Name PhoneNumber PhoneType PhoneUsage
>
> and get the information I want just about as efficiently as possible.
> I just can't think how that could be improved upon - it couldn't be
> much simpler and I can't think how you could design a DBMS that gets
> this data more efficiently than a single direct read of a 2k frame
> from disk (irrespective of the size of the Phones file). Oh I get it -
> Bob's 8-fold improvement jiggery pokery trick? Ha. Haha. Ha. Hmmm... I
> guess my sense of humour must be different to his. Seriously though -
> what is the equivalent SQL statement to get the same information?
> Would the statement be identical whether the data is coming from the
> PersonsPhones table or from RVAs in the Persons file

I made a fairly long reply to this a few days ago (as andrewst on Dbforums), but it seems to have got lost in the post somehow.

Anyway, to make the main points again: no, the relational approach won't beat your single direct read, but it may well match it. If we want to optimise to make that happen, we can - at the PHYSICAL level. For example, in Oracle, by putting both tables in the same hash cluster.

The equivalent SQL would be:

select name, PhoneNumber, PhoneType, PhoneUsage from PersonPhone
where name = 'Mike';

No, the syntax would NOT be the same if we used an RVA in the Persons table because that would be a different LOGICAL design - and not one I would ever choose. But the SQL syntax WOULD be the same using the same logical design, regardless of whether the data was PHYSICALLY stored together with the Persons data or separately. That is the beauty of the logical/physical distinction relational makes and Pick doesn't. Received on Tue Nov 11 2003 - 15:56:46 CET

Original text of this message