Re: Is mysql a RDBMS ?

From: Mikito Harakiri <mikharakiri_at_ywho.com>
Date: Mon, 25 Aug 2003 12:52:22 -0700
Message-ID: <7Wt2b.12$V06.109_at_news.oracle.com>


"Anith Sen" <anith_at_bizdatasolutions.com> wrote in message news:lYs2b.113530$0v4.8097266_at_bgtnsc04-news.ops.worldnet.att.net...
> My response to Morton was regarding the specifics of SQL standard not
being
> in line with the relational data model. Not to argue whether SQL is the
best
> data management language out there or not.
>
> >> What that Object Relational noise is all about, then? <<
>
> I am not sure how this is relevant to showing SQL supports relations or
not.

You wrote:
<quote>
-* SQL tables are not relations. A relation can be defined only by its named & typed attributes (done by domains) which follows that, -* SQL does not support relational domains. </quote>

A table in SQL is defined by named named & typed attributes (implemented by user-defined types) which follows that, SQL does support [SQL] domains.

> >> AFAIK, SQL allows to refer to column position in order by clause only.
> <<
>
> Read my post again, I said SQL associates positional value to columns, not
> about the usage of numeric column positions in the ORDER BY clause. I was
> referring to the significance of the left-to-right order of columns in an
> SQL table. For example, please explain, even with explicit data type
> specifications, why a statement like the following fails..
>
> SELECT id, name
> FROM tbl
> UNION
> SELECT name, id
> FROM tbl ;

Ah, this SQL syntactic quirk!

> Another example of duplicate columns with a SELF JOIN:
>
> SELECT t1.name, t2.name
> FROM tbl t1
> INNER JOIN tbl2 t2
> ON t1.id = t2.id
>
> How do you distinguish the two columns in the result set? By ordinal
> position only. By allowing duplicate column names in a SQL result set
simply
> violates the fundamental definition itself. Similarly SQL allows missing
> column names in result sets too. Well, you can use an alias, but see, it
is
> optional, just like the case of keys. You can see similar implications
with
> an INSERT statement too.

Yet another one.

OK, IMO this could be easily resolved if ANSI mandates aliasing in any selfjoin and union expressions.

From practical perspective, yet again, the issue is negligeable, as it doesn't require any outstanding user ability to figure out what is going on. For one thing, I never saw anybody on the usenet posting his confusion about this.

> For any further clarifications on the issue, I would direct you to Date's
> concise article, A Sweet Disconnect.

We obviously disagree on the importance of this disconnect.

> >> Does key based identification apply to base relations only, or to the
> views as well? <<
>
> Both. Why should they be any different?

OK.

> >> SQL is perfectly closed under operations it admits in the space of bags
> of nullable tuples. <<
>
> Not perfectly, though. SQL operations on tables without duplicate tuples,
> can generate result sets which contains duplicates. Similarly, operations
on
> tables with duplicates, can generate result sets which contain unique
> tuples. So how do you define this, set closure, bag closure or some
> arbitrary SQL closure? How do you apply nesting of relations in this case?

No. When we say that the field of complex numbers is algebraically closed we are not supposed to give an evidence that the subfield of reals is also algebraically closed just because reals are interesting from some other theory perspective.

Likewise, a subset of tables/views without duplicates and nulls is not interesting from SQL perspective. Otherwise, I'm not understanding your question.

I'm also not required to investigate any case beyond 1NF; nested relations included.

In general, yes, you are formally right, SQL is not quite The Best Relational Model Representative. But, everybody on this group is aware of that, and some may find that reiterating the same old arguments is just annoying. I'm including a brilliant post from David Cressey summarizing that idea:

<quote>
People have been saying that "real Christianity has never been tried" for two thousand years now.

People have been saying that "real communism has never been tried" for about a hundred and fifty years.

Don't expect people to stop saying that "A real relational system has never been implemented". You will just be disappointed. </quote> Received on Mon Aug 25 2003 - 21:52:22 CEST

Original text of this message