Re: The Practical Benefits of the Relational Model

From: Paul Vernon <paul.vernon_at_ukk.ibmm.comm>
Date: Fri, 18 Oct 2002 19:37:59 +0100
Message-ID: <aopkfj$g3i$1_at_sp15at20.hursley.ibm.com>


I'll just answer one point for the moment

"Leandro Guimarães Faria Corsetti Dutra" <lgcdutra_at_terra.com.br> wrote in message news:aop8p1$ojl84$1_at_ID-148886.news.dfncis.de...
> > In the article, Chris & David suggest that they are trying to insert
tuples
> > that have no attibute names into the database. This is wrong. What they
> > should be inserting are tuples such as:
> > <LOVER: Romeo, LOVEE: Juilet>
> >
> > then with sensible relvar attribute names, e.g. (LOVER & LOVEE) and
(HATER &
> > HATEE), there is not need to talk about external meanings that are not
known
> > to the DBMS.
>
> Remember the article is old, therefore they used SQL notation. But I
> agree that sensible relvar attribute names are a big part of the
> solution for the meaning problem, *for the user*. But the focus of the
> article is on the meaning *for the system*.
>
> BTW, the system knows nothing about the user-intended meaning of LOVER,
> LOVEE, HATER, HATEE. Probably the article should be revised to make all
> that clearer.

My point was that Chris & Daivd suggest that they are trying to insert a tuple into the database (rather than a tuple into a relvar of the database). If they want such an ability, then it seems sensiable to me to match on attribute names (rather like a natural join). In this case, the tables would look like:

CREATE DOMAIN PERSONS ... ; CREATE BASE TABLE LOVES
( LOVER DOMAIN ( PERSONS ),
LOVEE DOMAIN ( PERSONS ) ... ) ; CREATE BASE TABLE HATES
( HATER DOMAIN ( PERSONS ),
HATEE DOMAIN ( PERSONS ) ... ) ; Then the hyptheical: INSERT INTO database VALUES tuple would look like

INSERT INTO db VALUES <LOVER: Romeo, LOVEE: Juilet>

if the true fact that you want in the DB is "Romeo loves Juliet" or

INSERT INTO db VALUES <HATER: Romeo, HATEE: Juilet>

if the true fact that you want in the DB is "Romeo hates Juliet"

if you try
INSERT INTO db VALUES <X: Romeo, Y: Juilet>

then this would fail unless there existed a (base) relvar with two attributes named X & Y (of type person)

So in conclusion, barring fluency and depth, the meaning for the system is the same as the meaning for the users.

Regards
Paul Vernon
Business Intelligence, IBM Global Services Received on Fri Oct 18 2002 - 20:37:59 CEST

Original text of this message