Re: Relation Definition
Date: Mon, 21 Feb 2005 16:15:07 +0100
Message-ID: <rjuj11pndvqsfnuithrks2rdfs8rh01pg8_at_4ax.com>
On Sun, 20 Feb 2005 11:22:29 GMT, Jan Hidders <jan.hidders_at_REMOVETHIS.pandora.be> wrote:
>Their definition of an instance of a header in the named perspective is
>equivalent with mine in the sense that every instance of a database
>schema is a relation as I defined it and vice versa.
Each instance of a database schema (or type) is a database value.
Each instance of a relation schema is a relation (value).
>It is simpeler. Date includes the typing information, the header, in the
>value, the relation, that the type is supposed to describe. That makes
>things unnecessarily complicated. Unless you are describing a system
>with run-time typing there is no real need to includes types in values.
I agree, but IMO Date's definition does not pretend to be very formal, but easy to understand by the neophytes.
>> Date defines a relation as having a header consisting of a set of n
>> named, typed attributes and set of n-dimensional tuples where each dimension
>> value of the tuple corresponds to a named, typed attribute.
>
>That definition is problematic for several reasons: (1) What is exactly
>a "set of named typed attributes"?
>Def. [Relation type] A *relation type* is a partial function that maps
>column names to domains and is defined for a finite set of column names.
OK. But it is equivalent to Date's definition.
>Def. [Instance] A *relation is an instance of a relation type* if it
>holds for all tuples in the relation that (1) they are defined for the
>same set of column names as the relation type and (2) they associate
>column names with an element of the domain that the relation type
>associates it with.
Instance is the same as relation so this is another (and more complex) relation definition.
>Def. [Relation] A *relation* is a set of tuples that all have the same
>header.
The problem here is that we need to define what "to have the same header" means.
For instance
Tuple1: tuple { a 'Hello' }
Tuple2: tuple { a true }
relation
{
tuple { a 'Hello' }, tuple { a true }
}
This is a relation, thus Tuple1 and Tuple2 "have" the same header. But what "have" means here?
What about this?
Def. [Relation] A *relation* is a set of tuples that all have the same
attribute names.
Regards Received on Mon Feb 21 2005 - 16:15:07 CET