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: Karl & Betty Schendel <schendel_at_kbcomputer.com>
Date: 1998/01/28
Message-ID: <34cf2984.2460559@news.fyi.net>#1/1

On 27 Jan 1998 19:11:11 GMT, "Richard Ronteltap" <rontltap_at_euronet.nl> wrote:

>>>I think a database programming language should be capable to to
>>>all of the work.
>>In principle I do agree, and theoretically SQL is capable of this.
>
>No. SQL is *theoretically* incapable to do all the work because it
>is no computationally complete. (Has to do with Turing machines).
>
>For example: Tell me the SQL statement that gives the top 100
>most expensive products in a product table with name and price
>attributes.

Bzzt! Wrong challenge. You can do that one in SQL, although it will probably run like frozen dogshit.
select product from prod_table p1
where 100 <= (select count(*) from prod_table p2

    where p2.price > p1.price)

What you can't do (without defining a bunch of auxilliary views) is stuff like aggregation with different restrictions on each column.

Karl Received on Wed Jan 28 1998 - 00:00:00 CST

Original text of this message

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