Re: OO vs. RDB challenge

From: Alfredo Novoa (alfredo_novoa_at_hotmail.com)
Date: 03/15/05


Date: Tue, 15 Mar 2005 16:49:30 +0100

On Tue, 15 Mar 2005 14:40:16 GMT, Rich MacDonald
<rich@@clevercaboose.com> wrote:

>One good thing about "business logic" in the DBMS is that its declarative
>rather than procedural. And that's a really good thing. However, in
>practice its outweighed by the unfortunate fact that SQL is a piss-poor
>programming language

Agreed, although that is particular to relational based DBMS's.

> (VB for data)

IMO it would be more accurate to say that SQL is the COBOL for data.

> and the relational model hasn't bridged
>the gap between "beautiful theory" and "useful in practice".

I completely disagree. The implementations of the RM are fatally
flawed, but they are everywhere and controlling many aspects of our
everyday life.

> I wonder if
>this is due to short-sightedness (SQL gave us a partial step that's good
>for X% and useless for the remaining 100-X%, so accepting that X% made the
>100% impossible) or just that the relational mathematics needs a few more
>layers of "sugar" to overcome its cumbersome nature

If you study the matter with care you will see that it is the first.
The Relational Model is the best possible layer, although SQL is not
relational nor a well designed language.

> and make it (1)
>productive for the programmer and (2) fast for the computer. (Pure
>mathematics often has a ways to go before it can be useful to applied
>mathematics.)

Striking innovations often need a lot of time to be adopted. There are
many old dogs that are not able to learn new tricks.

The problem is that the partial step of SQL was so succesful that many
people forgot to implement the whole thing, and when the problems
arised people have forgotten that SQL was only a crappy partial
implementation and the blamed on the model.

>Graph "business logic complexity" on the x-axis and "implementation
>complexity" on the y-axis. SQL is an exponentially rising function. OO is
>less exponential.

What do you mean with OO?

Many people here identify OO with the file processing and the network
approaches which are exponential compared to SQL.

>Exponential of course but I can't say for sure how it really compares
>because its never been tried.

You can try it on the paper. Costin's challenge is one example.

I could post more complex challenges to show how the file processing
and network approaches have exponential implementation complexity
compared to the DBMS and relational approaches.

> I do know that I have some applications that
>would devolve into a single table of "objects" and a single table of
>associations in order to satisfy my business logic using the relational
>model. The matrix-inverse puzzle hinted at the issue, but went right over
>the head of Alredo. Hint: Where do you put the constraints between tuples?

I don't follow you here. I would put the constraints with the rest: in
the catalog, the constraints database.

Constraints are also data. It is not a good idea to hardcode them.

Regards



Relevant Pages

  • Re: OO vs. RDB challenge
    ... in practice its outweighed by the unfortunate fact that SQL ... > The Relational Model is the best possible layer, ... constraints of the RDBMS" is an attractive idea in theory, ... RDBMS in some other language and show its as easy as using an RDBMS". ...
    (comp.object)
  • Re: loop and recordset
    ... those members whose membership lapsed. ... Use the SQL language to return only the set of required ... This table obviously needs some constraints. ... ALTER TABLE enrollment_2 ADD ...
    (microsoft.public.access.modulesdaovba)
  • Re: loop and recordset
    ... there IS a missing period? ... Could your SQL approach be modified to deal with such a recordset? ... This table obviously needs some constraints. ... ALTER TABLE enrollment_2 ADD ...
    (microsoft.public.access.modulesdaovba)
  • Re: Help: Stored Procedure performance issue.
    ... Please post DDL, so that people do not have to guess what the keys, ... We do not use flags in SQL. ... are no more than n days apart) and other constraints are met (the cargo ...
    (comp.databases.ms-sqlserver)
  • Re: passing an array to stored procedure
    ... source, like VB, and turn it into a proper set. ... Another possiblility that might be good is to use XML. ... Pro SQL Server 2000 Database Design ... Remember to add constraints to the Numbers and Alphas tables, ...
    (microsoft.public.sqlserver.programming)