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: Little question for RDM theoristes

Re: Little question for RDM theoristes

From: J M Davitt <jdavitt_at_aeneas.net>
Date: Fri, 16 Jun 2006 16:16:12 GMT
Message-ID: <gPAkg.71272$YI5.4205@tornado.ohiordc.rr.com>


U-gene wrote:
> Two relations (relvalues) exists. These relations have different
> headers (schemas). Are these relvalues the values of different types?

Precisely stated, a relation consists of a *heading* and a body. The mere fact that two relations have different names distinguishes them. Whether two relations, differing only in name (i.e., having identical headings) should exist in a database is a question of properly orthogonal design. But would two such relations be of the same type? Yes, they are the same relation type.

The *relvars* (relation values) of these constitute the bodies of the relations.

> IMHO all relvalues have the same type and the headers is just data. May
> be it is special kind of data which is different from rel.bodies' data.

This is going to get confusing; type is an over-used term. On the one hand, the RM stores and manipulates data stored as scalar types, possibly held in tuple types, and possibly held in relation types.

These are the general types defined in the RM described by Date. The question then becomes, "What type of data may be stored in a scalar type?" (See how 'type' crept in there twice?) The answer would be, "There are boolean scalar types and user-defined scalar types. The user-defined types of scalar types probably include integers, rationals, and characters."

> . But persons exist who think in other way - if relvalues have
> different headers they are values of different types. So I'll glag to
> hear your opinions.

Yes - and no. All relations are of the same type simply because they are all of relation type: they all have a heading and a body. Whether two relations - or relation expressions - are union-compatible depends on whether or not they have the same heading. In other words, if they have the same heading, the types of relation type are the same.

This isn't really much of a stretch: For example, two scalar type variables must be of the same type if we wish to do arithmetic with them. Limiting ourselves to integers for this discussion, both scalar variable types must hold data of integer types.

I realize this doesn't completely clarify things but type, on the one hand, describes the form in which data are held and, on the other, describes the values of the data.

Other languages have similar difficulties: the choice of the words 'type' and 'class' in C, for example, seems arbitrary. So too the use of words like 'declare' and 'define:' in C and assembler, they seem to have each other's meanings. And in the world of algorithms, the giants Knuth and Sedgewick use 'pre-order' and 'post-order' to describe the opposite of what the other means. Received on Fri Jun 16 2006 - 11:16:12 CDT

Original text of this message

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