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

Home -> Community -> Usenet -> comp.databases.theory -> Re: The Practical Benefits of the Relational Model

Re: The Practical Benefits of the Relational Model

From: Paul <pbrazier_at_cosmos-uk.co.uk>
Date: 25 Oct 2002 04:50:27 -0700
Message-ID: <51d64140.0210250350.638232bf@posting.google.com>


"Paul Vernon" <paul.vernon_at_ukk.ibmm.comm> wrote in message news:<ap6fms$ora$1_at_sp15at20.hursley.ibm.com>...
> Date & McGovern allow two relvars in a database to have the same type, thereby
> rasing the problem of 'orthogonal design'.
>
> I am suggesting that we do not allow two *real* relvars in a database to have
> the same type, thereby avoiding the 'orthogonal design' problem.

You have the convention (enforced rule?) that attribute name and attribute domain are the same, but isn't it a useful abstraction layer to have them different? So if you have several attributes of the same domain you only have to define the domain once.

> The question I have is; is my restriction on real relvars in a database
> acceptable? I have failed to think of a reason why it would not be acceptable.

I don't see how enforcing attributes to be uniquely named is any different to just referring to them by their "fully qualified" name (i.e. "table.column") which is unique.

So in the loves-hates example you have four separate domains called LOVER, LOVEE, HATER, HATEE but they are all essentially the same; the corresponding columns only differ in that they are used in different contexts in the underlying predicates which is more a property of the table than the domain I'd say.  

Why not just call the columns Loves.Person1, Loves.Person2, Hates.Person1, Hates.Person2 (all with the same domain) instead of Lover, Lovee, Hater, Hatee?

Hmm, just thinking: are you saying that a "domain" should not only specify the *values* an attribute can have but also the *context* in which it can be used in a predicate? If so might it be an idea to split these two concepts out so you have a "value-domain" which specify the values an attribute can have, and a "context-domain" which specifies how the attribute can be used in a predicate. But isn't this just a different way of looking at what we have already, so domain="value-domain" and tablename.columnname="context-domain"?

> P.S. my restriction means that relvar names are not considered to hold any
> meaning, they are just shorthands for a relation type.

I'm not too sure on the distinction between "type" and "domain" (type is like a domain for relations?) or are they synonyms? Could you not think of the Loves and Hates tables as both being of type "Binary person relationships" or something and the names just distinguish between the two (as with columns)? It would be up to the database owner to decide whether "a hates b" and "a loves b" are incompatible and thus forbidden via some sort of constraint.

Paul. Received on Fri Oct 25 2002 - 06:50:27 CDT

Original text of this message

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