Re: Is mysql a RDBMS ?

From: Bob Badour <bbadour_at_golden.net>
Date: Mon, 25 Aug 2003 14:19:07 -0400
Message-ID: <fyt2b.662$FT7.79814719_at_mantis.golden.net>


"Mikito Harakiri" <mikharakiri_at_ywho.com> wrote in message news:xas2b.10$V06.160_at_news.oracle.com...
>
> "Bob Badour" <bbadour_at_golden.net> wrote in message
> news:Nws2b.656$cK7.79368235_at_mantis.golden.net...
> > > > > Chris Date claims that the concept of a multiset is confusing
> > > >
> > > > It is worse than confusing. Consider the following table:
> > > >
> > > > A
> > > > =
> > > > 1
> > > > 1
> > > > 1
> > > > 2
> > > >
> > > > When you observe the table variable above and decide you need to
> delete
> > > > exactly one row where A = 1, how do you express the deletion in SQL?
> > >
> > > In MySQL you write
> > >
> > > DELETE FROM ... WHERE A = 1 LIMIT 1;
> >
> > I see the latest ANSI standard had kludged a solution to that specific
> > question. My first thought is: Which of the three rows does it delete?
> Why?
> > But I have a much more interesting question: Suppose one cannot predict
> > exactly how many rows are 1, but one knows one must to delete all but 2
of
> > them. How does one express the deletion in SQL?
>
> Scalar subquery can calculate the number of 1s. All that is need from the
> implementation, then, is scalar subqueries allowed in the "limit" clause.

I could keep coming up with examples and you could keep coming up with ad hoc kludges to address the examples I devise. I admit that allowing any scalar expression in any clause requiring a scalar argument certainly comes closer to relational fidelity. Orthogonality is good.

However, it is an awful lot of trouble to go to for a feature that is neither necessary nor desirable. Don't you agree? Received on Mon Aug 25 2003 - 20:19:07 CEST

Original text of this message