Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.theory -> Re: Extending my question. Was: The relational model and relational algebra - why did SQL become the industry standard?

Re: Extending my question. Was: The relational model and relational algebra - why did SQL become the industry standard?

From: Lauri Pietarinen <lauri.pietarinen_at_atbusiness.com>
Date: Mon, 03 Mar 2003 18:14:28 +0200
Message-ID: <3E637F64.5090705@atbusiness.com>


Jan Hidders wrote:

>>[snipped from previous posting...]
>>
>>
>>>- optimizing efforts will be concentrated on the most used features, that
>>> being queries without disticnt.
>>>
>>>
>>If those queries are the ones that are the most used, then that is what the
>>users apparently want, and so indeed those should be optimized the most.
>>
>>[end snip]
>>
>>
>
>Er, yes, so you see that *you* suggested it, and I merely said that if that
>was the case then IMO this wouldn't be a big problem.
>

Ok, ok. But as you - hopefully - see, it _is_ a problem.

>>Ok, let's try
>>
>>SELECT DISTINCT P#, PNAME
>> FROM V_S_SP_P;
>>
>>Correct answer, but why is performance
>>so bad?
>>
>>Oh, the DBMS materialises the whole join
>>(even reading S, which is not needed at all)
>>and then groups by P# and PNAME!
>>
>>(Just tried it on SQLServer2000).
>>
>>
>
>Excellent example. No, really. What happens if you add DISTINCT to the view
>definition?
>

I tried it. No change.

>>So while you might be right in theory, i.e. that supporting two modes at
>>once (sets and bags), is no burden for the DBMS optimiser, you are
>>certainly wrong in practice! If it is so easy, why did they (the
>>SQL-vendors) not support it a long time ago?
>>
>>
>
>Well, your specific example involves recognizing that duplicate elimination
>is not necessary in the view. That was something that was researched as
>(relatively) recently as 1994:
>
> http://www.informatik.uni-trier.de/~ley/db/conf/icde/PaulleyL94.html
>

OK, point being that if SQL had not had duplicates from the start the motivation for such research
would have been much stronger, and we would have got results sooner.

Anyway, that's nearly 10 years now...

>But you also have to solve that problem if you have a set-only model.
>

True, but there would have been more motivation to solve it. Compare the situation with
the introduction of relational model in 1970. There was a strong opposition to it:
"can't be done", "will be to slow", etc... The System-R team did a fabulous job
of overcoming the hurdles and history has now proven the practicality of Codd's
theoretical insight.

>So it
>could very well that for this particular problem you are right.
>

Meaning that "you can do more optimisations with set's"?

>>Date is trying to take the relational model to it's full potential and I
>>would claim that the SQL-mode of thinking is hindering us from achieving
>>this. And this (in my view) is ultimately Date's criticism of Hector
>>Garcia-Molina, Jeffrey D. Ullman, and Jennifer Widom, DATABASE SYSTEM
>>IMPLEMENTATION.
>>
>>
>
>Is he really criticizing this book? I don't get that impression from the
>"double trouble" article on dbdebunk.
>

No? At least he criticises some parts of it, or do you disagree?

kind regards,
Lauri Pietarinen Received on Mon Mar 03 2003 - 10:14:28 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US