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

Home -> Community -> Usenet -> c.d.o.server -> Re: Relationals vs. Objects Databases I

Re: Relationals vs. Objects Databases I

From: Kazimierz Subieta <subieta_at_ipipan.waw.pl>
Date: 1998/01/28
Message-ID: <34CF015E.176A@ipipan.waw.pl>#1/1

Jeremy Rickard wrote:
>
> In article <6albgf$gio_at_news3.euro.net>, Richard Ronteltap
> <rontltap_at_euronet.nl> writes
 

> >No. SQL is *theoretically* incapable to do all the work because it
> >is no computationally complete. (Has to do with Turing machines).

Funny. SQL probably _is_ computionally complete in the sense of Turing machines. Very little is required to have computational completeness. E.g. Turing machines are equivalent to Rabin-Scott machines with a stack. You can organize a stack as a temporary table and use "insert" and "delete" to push and pop it. It will be very exciting to apply SQL in this mode. The major advantage: we will have a lot of time waiting for the result. :)

This is of course a joke. The disadvantage of SQL is lack of _pragmatic_ completness. The pragmatic completness cannot be defined in mathematical terms. It is defined as "everything that the programmers expect from the language". Actually, programmers expect a lot. Some imagination about what the programmers expect presents the specification of SQL3: ca. 1500 pages. (I am not sure if programmers really expect all this stuff, this is the view of ANSI X3H2.)

> >For example: Tell me the SQL statement that gives the top 100
> >most expensive products in a product table with name and price
> >attributes.
>
> SELECT
> A.price,
> A.product
> FROM
> product AS A
> WHERE
> (
> SELECT
> COUNT(*)
> FROM
> product AS B
> WHERE
> B.price < A.price
> ) < 100
> ORDER BY
> A.price DESC
>
> ... would be along the right lines.

Sorry, your example is wrong. It violates the intention of
the original Richard's query. The standard SQL has no
possibility to accomplish it. There were extensions (proposed
and accomplished by IBM in Heilderberg, Germany) provided for this kind of queries, but they are not the part of the actual SQL standard. (I am not sure if they are the part of SQL3.) Of course, you can use embedded SQL and cursors, but this is just the argument that SQL is incomplete.

Regards
Kaz Received on Wed Jan 28 1998 - 00:00:00 CST

Original text of this message

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