Re: Is relational theory irrelevant? (was Re: Dreaming About Redesigning SQL)

From: Bruce <brennie_at_dcsi.net.au>
Date: 9 Nov 2003 02:13:44 -0800
Message-ID: <64ea97cf.0311090213.38942cc_at_posting.google.com>


Greetings agin Mike,

michael_at_preece.net (Mike Preece) wrote in message [[Stuff removed]]
>
> Not really, to be honest. From what I've read I'm pretty sure we've
> had a much better way of doing this in Pick for more than 30 years -
> with multivalued attributes. I wonder where Date & Darwen got the
> idea.

The relational model requires a paradigm shift (which most people, even those using SQL databases, don't appear to have made). The relational model is about making the database data-centric and not application-centric. In other words, making the database available to all applications with the same "ease of use" as to the general user community generating adhoc data queries.

The model is about simplicity not complexity, the complexity is in the "behind the scenes" implementation of the RDBMS, that is, the physical implementation is to have no influence on the logical design of your database - implementor is able to perform any and all optimisations that he wants without the designer/user of the database ever being aware of what is done physically.

The RVA idea is actually a specific example of the realational models domains. The logical consequence of the domain idea is that any definable domain, no matter how complex it may be internally, is viewed in exactly the same way by the RDBMS. Any attribute of any relation can be of any domain. The theory makes no distinctions on the basis of how complex a domain may be. In other words, the domain of an attribute of a relation can be anything at all, the relational algebra will work the same - because it doesn't look inside the domain.
>
> > read The Third Manifesto by C J
> > Date and H Darwen. I haven't got it with me and to be honest, I can't
> > remember why. I think it is more a case of accepting it as not
> > subverting the relational model rather than advocating doing it.
>
> I wonder how many more things they and others will come to accept in
> time to come. I guess it might just help someone to come up with the
> first "true" relational database. "It's relational Jim - just not as
> we know it".

There are aspects that have not yet been considered in the model - as with any model. However, even with the proposed changes made by Date and Darwen in "The Third Manifesto" (a copy of which is sitting beside me), they have not moved much from the original proposal. They are still using relational algebra and first order predicate logic. I don't necessarily agree with all that they have proposed in their book - I have had some communication with them over a number of aspects that I disagree with. But the fundemantal basics I believe are very relevant.

[[Stuff removed]]

> > > Someone says we can use RVAs.
> > > Someone else says they don't actually exist - and that they would
> > > complicate things too much.
> > The theory exists. Most well-known SQL products do something like them,
> > but probably not in a way that meets the full requirements of the theory
> > (as usual!)
>
> And yet the theory is rock solid right? Well, I guess all of the
> people that have attempted to implement it must just have been
> downright incompetent.

Not at all, it can be simply that they have not made the necessary paradigm shift. One area I have looked at on a number of occasions is Denotational Semantics - a fascinating subject if you can get the paradign shift. Because I don't look at it regularly, it can take me a couple of weeks to get my head around it. It all falls into place and the ideas are very simple and easy to understand. But try to implement a system that uses it (with lambda calculus) and it may take you some time and a considerable amount of work. Marketing departments and most companies are not going to be interested in getting it right - they want to make money (as is their job).

How many systems have ever gone out perfect or even in a reasonable state. I don't think you will find too many. Companies that produce SQL DBMS's are no different. I can think of many language compilers that took the easy way out instead of doing the hard slog to make it easy for the programmer to do his job, and there are so many other systems as well.

>
> > In fact, they were adding their "OO" extensions that are
> > somewhat like RVAs probably before the theory was published.
>
> That's no surprise here. People were using Pick before the rules were
> made up too. Now we get beaten over the head because Pick appears to
> break the rules. It doesn't matter though really. The theory will
> catch up with reality on day. Maybe.

Or maybe the implementations will catch up with the theory. People will use the garbage that is available if it is marketed to them in the appropriate way. Sedxy and glitzy sell an awful lot of stuff (how much of it was worth what was paid for it).

>
> > > What? We're trying to get someone's phone number here guys!
> > > It's simple. Pick does it simply. Someone said earlier in this thread
> > > that "perfection" is important to relational database people. Is it
> > > really?
> > If all you want is a phone number you can use a notepad. I should
> > bloody hope Pick does it simply! So does relational; how could it not?
>
> It depends whose number I'm interested in. I have a notepad, sure. In
> it I have a single entry for a person's (or organisation's) name with
> all of their phone numbers (home, work, mobile, fax) listed against
> that single entry. If the number I want isn't in there I'll probably
> use a telephone directory. They also have a single entry for a name
> with multiple phone numbers. I also have Pick running on my computer
> which allows me to store things in exactly the same way. Maybe it's
> wrong for Pick to store things that way because it's both logical and
> physical and apparently that's wrong(?). Anyway, it does allow me to
> type in something like:
>
> List Persons "Mike" Name PhoneNumber PhoneType PhoneUsage
>
> and get the information I want just about as efficiently as possible.
> I just can't think how that could be improved upon - it couldn't be
> much simpler and I can't think how you could design a DBMS that gets
> this data more efficiently than a single direct read of a 2k frame
> from disk (irrespective of the size of the Phones file). Oh I get it -
> Bob's 8-fold improvement jiggery pokery trick? Ha. Haha. Ha. Hmmm... I
> guess my sense of humour must be different to his. Seriously though -
> what is the equivalent SQL statement to get the same information?
> Would the statement be identical whether the data is coming from the
> PersonsPhones table or from RVAs in the Persons file? I'm a bit
> confused now too - according to Bob perfection doesn't seem to be all
> that important after all. Bob is an authority you folks all look up to
> and respect isn't he?

"User Mode"

But why would I as a user of a database need to be concerned about how it is implemented. I just want the info. It is your job/task to provide me with a system that I as a non-technical person can use to obtain the information in whatever way I want it without me going through hoops and loops to get it or even needing to understand anything about how it is stored. As a user, I just don't care, that's your responsibility.

"End User Mode"

It goes back to providing a system that is data-centric and is easy to use no matter who I am. When the logical and physical get mixed, that makes life harder for the "d..b user" out there. Relational thaery is about getting the information out of the system in an easy and logical manner.

There is an example in this news group from some time ago, where someone used the D4 language (based on Date and Darwen, by Alphora in their Dataphor product) to build a query directly from the user requested query. It was beautiful, I would like to see how you as a PICK programmer would design the same database and answer the same question - as I don't know PICK, so I can't answer the question myself. The SQL formulation, I believe, would be considerably longer and much obtuse. If I recall correctly, it arose out of an argument over whether SQL was/wasn't truly relational. A one page formaulation including the design of the database.

I am currently in the process of building a programming system based on the work of David Harland et al - a beautifully simple set of concepts, but I can tell you that the implementation is not simple but the system will make many of my programming problems simple to solve because the facilities to do the work are in the solution space.

You seem to be an enquiring mind - just don't get caught up the "silliness" sometimes exhibited by various persons in this newsgroup.

regards

Bruce Rennie
(God's Own Land Down Under) Received on Sun Nov 09 2003 - 11:13:44 CET

Original text of this message