Welcome to dbFreaks.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Relation Definition

 
Goto page 1, 2
   Database Help (Home) -> Technology and Theory RSS
Next:  Pleae help with Mysql, mysql control center &..  
Author Message
Dawn M. Wolthuis2

External


Since: Jun 30, 2004
Posts: 33



(Msg. 1) Posted: Wed Feb 16, 2005 8:00 pm
Post subject: Relation Definition
Archived from groups: comp>databases>theory (more info?)

I'll try this another way (persistence is my middle name?). I use a precise
definition of "relation" from mathematics. It is in the glossary mAsterdam
collected that I sent out a few days ago. However, it seems that most folks
here use some other definition(s) of the term. When I try to get precision
with this other definition, I find as many different definitions as there
are writers. These are often not just other ways of saying the same thing,
but really different definitions of what a "relation" is. I would like to
know which ones are typically used by practitioners and/or theorists. It
would be great if there were some general agreement on the definition, but
I'd settle for having to work with 2-3 if needed.

Is this one from Date the best in the industry? Can anyone suggest a better
one?

Date, C. "An Introduction to Database Systems", Addison Wesley 2004, p. 146

" A relation value (relation for short), r say, consists of a heading and a
body[4], where:

--The heading of r is a tuple heading as defined in Section 6.2. Relation r
has the same attributes (and hence the same attribute names and types) and
the same degree as that heading does.

--The body of r is a set of tuples, all having that same heading; the
cardinality of that set is said to be the cardinality of r. (In general,
the cardinality of a set is the number of elements in the set.)"

Note: definitions of "relation type" and "relation type name" follow this
definition.
This definition relies on the definition of "tuple" and "tuple heading".
Since his definition of "tuple" is also not the definition of a mathematical
tuple, we also need to understand that from the below definition:

p. 141 "Given a collection of types Ti (i=1, 2, ..., n), not necessarily all
distinct, a tuple value (tuple for short) on those types--t, say--is a set
of ordered triples of the form <Ai,Ti,vi>, where Ai is an attribute name, Ti
is a type name, and vi is a value of type Ti, and:
--The value n is the degree or arity of t
--The ordered triple <Ai,Ti,vi> is a component of t.
--The ordered pair <Ai,Ti> is an attribute of t, and it is uniquely
identified by the attribute name Ai (attribute names Ai and Aj are the same
only if i=j). The value vi is the attribute value for attribute Ai of t [1]
The type Ti is the corresponding attribute type.
--The complete set of attributes is the heading of t.
--The tuple type of t is determined by the heading of t, and the heading and
that tuple type both have the same attributes (and hence the same attribute
names and types) and the same degree as t does."

I'm thinking that def must be done at this point, and "tuple type name" is
defined immediately following this quotation.
This definition (of tuple) depends at least on the definition of "type" and
it wasn't so easy to zero in on a definition from the text, so I'll quote
what I think is the best I can find in this book:

p. 111 "The data type concept (type for short) is fundamental; every value,
every variable, every parameter, every read-only operator, and in particular
every relational attribute is of some type. So what is a type? Among other
things, it is a set of values.
....
"We are trying to be reasonably precise in this part of the book.
Therefore, instead of saying that, for example, type INTEGER is the set of
all integers, we ought really to say that it is the set of all integers that
are capable of representation in the computer system under consideration...

Any given type is either system-defined (i.e., built in) or user-defined.
.... Any type whatsoever, regardless of whether it is system- or
user-defined, can be used as the basis for declaring relational
attributes..."

Since I haven't found where the rest of any such definition is in this book,
I think perhaps we can just use the definition that a type is a set of
values. The rest of this is descriptive and we would not want the term
"relational" in the definition so we avoid a circular definitions.

You can perhaps see why I work with the definition of a mathematical
relation & mathematical tuples instead, but I really would like to know what
database folks mean by these terms. If I want a very precise definition of
relation as database relational theorists use the term, is this the best
that the discipline has to offer?

Thanks in advance. --dawn

 >> Stay informed about: Relation Definition 
Back to top
Login to vote
frankhamersley

External


Since: Nov 27, 2004
Posts: 2



(Msg. 2) Posted: Thu Feb 17, 2005 7:40 am
Post subject: Re: Relation Definition [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Dawn M. Wolthuis" wrote
 > I'll try this another way (persistence is my middle name?). I use a
 > precise definition of "relation" from mathematics. It is in the glossary
 > mAsterdam collected that I sent out a few days ago. However, it seems
 > that most folks here use some other definition(s) of the term. When I try
 > to get precision with this other definition, I find as many different
 > definitions as there are writers. These are often not just other ways of
 > saying the same thing, but really different definitions of what a
 > "relation" is. I would like to know which ones are typically used by
 > practitioners and/or theorists. It would be great if there were some
 > general agreement on the definition, but I'd settle for having to work
 > with 2-3 if needed.
 >
 > Is this one from Date the best in the industry? Can anyone suggest a
 > better one?
 >
 > Date, C. "An Introduction to Database Systems", Addison Wesley 2004, p.
 > 146
 >
 > " A relation value (relation for short), r say, consists of a heading and
 > a body[4], where:
 >
 > --The heading of r is a tuple heading as defined in Section 6.2. Relation
 > r has the same attributes (and hence the same attribute names and types)
 > and the same degree as that heading does.
 >
 > --The body of r is a set of tuples, all having that same heading; the
 > cardinality of that set is said to be the cardinality of r. (In general,
 > the cardinality of a set is the number of elements in the set.)"
 >
 > Note: definitions of "relation type" and "relation type name" follow this
 > definition.
 > This definition relies on the definition of "tuple" and "tuple heading".
 > Since his definition of "tuple" is also not the definition of a
 > mathematical tuple, we also need to understand that from the below
 > definition:
 >
 > p. 141 "Given a collection of types Ti (i=1, 2, ..., n), not necessarily
 > all distinct, a tuple value (tuple for short) on those types--t, say--is a
 > set of ordered triples of the form <Ai,Ti,vi>, where Ai is an attribute
 > name, Ti is a type name, and vi is a value of type Ti, and:
 > --The value n is the degree or arity of t
 > --The ordered triple <Ai,Ti,vi> is a component of t.
 > --The ordered pair <Ai,Ti> is an attribute of t, and it is uniquely
 > identified by the attribute name Ai (attribute names Ai and Aj are the
 > same only if i=j). The value vi is the attribute value for attribute Ai
 > of t [1] The type Ti is the corresponding attribute type.
 > --The complete set of attributes is the heading of t.
 > --The tuple type of t is determined by the heading of t, and the heading
 > and that tuple type both have the same attributes (and hence the same
 > attribute names and types) and the same degree as t does."
 >
 > I'm thinking that def must be done at this point, and "tuple type name" is
 > defined immediately following this quotation.
 > This definition (of tuple) depends at least on the definition of "type"
 > and it wasn't so easy to zero in on a definition from the text, so I'll
 > quote what I think is the best I can find in this book:
 >
 > p. 111 "The data type concept (type for short) is fundamental; every
 > value, every variable, every parameter, every read-only operator, and in
 > particular every relational attribute is of some type. So what is a type?
 > Among other things, it is a set of values.
 > ...
 > "We are trying to be reasonably precise in this part of the book.
 > Therefore, instead of saying that, for example, type INTEGER is the set of
 > all integers, we ought really to say that it is the set of all integers
 > that are capable of representation in the computer system under
 > consideration...
 >
 > Any given type is either system-defined (i.e., built in) or user-defined.
 > ... Any type whatsoever, regardless of whether it is system- or
 > user-defined, can be used as the basis for declaring relational
 > attributes..."
 >
 > Since I haven't found where the rest of any such definition is in this
 > book, I think perhaps we can just use the definition that a type is a set
 > of values. The rest of this is descriptive and we would not want the term
 > "relational" in the definition so we avoid a circular definitions.
 >
 > You can perhaps see why I work with the definition of a mathematical
 > relation & mathematical tuples instead, but I really would like to know
 > what database folks mean by these terms. If I want a very precise
 > definition of relation as database relational theorists use the term, is
 > this the best that the discipline has to offer?
 >
 > Thanks in advance. --dawn

This is not directed at you Dawn - but whatever happened to the KISS
principle. Personally I usually suspect elaborate definitions (for a
concept that would appear to me to be simple) as coming from high church
adherents. My two bob's worth. Frank<!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: Relation Definition 
Back to top
Login to vote
Dawn M. Wolthuis2

External


Since: Jun 30, 2004
Posts: 33



(Msg. 3) Posted: Thu Feb 17, 2005 8:20 am
Post subject: Re: Relation Definition [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Frank Hamersley" <FrankHamersley RemoveThis @hotmail.com> wrote in message
news:8E%Qd.164624$K7.145353@news-server.bigpond.net.au...
 > "Dawn M. Wolthuis" wrote
<snip>
 > This is not directed at you Dawn - but whatever happened to the KISS
 > principle. Personally I usually suspect elaborate definitions (for a
 > concept that would appear to me to be simple) as coming from high church
 > adherents. My two bob's worth. Frank

Yes, agreed. I started laughing as I went in search of the full definition
of the term "relation" from Date's latest book, and I figured if I did not
type it all in, then others would not be able to appreciate it in the same
way. (apologies to Date whose precision I often truly do appreciate)

What I contributed to the dictionary a while back as the defininition of
relation was what I thought a relation to be:

"1. A relation is a subset of the set of ordered
tuples (A1, A2, ... Am) formed by the Cartesian
cross-product of sets S1 x ... x Sm where each
An is an element of Sn."

Someone else contributed the note below it in the glossary and then
mAsterdam simply put a "2..." for the definition that I'm trying to find
now -- the one employed by database folks. Given that many on this list
consider themselves from the relational theory school, it sure seems it
would be helpful to know what we mean when we use the term "relation". I
know what I mean by it (above), but then Alfredo and others attack, so I've
been on a search for one I can work with.

If others don't like Date's definition either, then what precise definition
of relation works for you? Thanks a bunch! --dawn<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Relation Definition 
Back to top
Login to vote
dwolt

External


Since: Feb 03, 2005
Posts: 1



(Msg. 4) Posted: Thu Feb 17, 2005 5:27 pm
Post subject: Re: Relation Definition [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Jan Hidders wrote:
 > Dawn M. Wolthuis wrote:
  > >
  > > Is this one from Date the best in the industry?
 >
 > No. Of all the formal definitions of the relational model I have seen

 > his is probably the clumsiest. For the authorative ones that real
 > database theorists use see the definitions in the Alice book:
 >
<font color=purple> > <a style='text-decoration: underline;' href="http://portal.acm.org/citation.cfm?id=551350</font" target="_blank">http://portal.acm.org/citation.cfm?id=551350</font</a>>
 >
 > To summarize, when it is sufficient the "subset of cartesian product"

 > definition is used, and when the names of the columns are relevant
for
 > the discussion at hand the definition goes roughly something like the

 > following:
 >
 > Def. [Tuple] A *tuple* is a partial function that maps column names
to
 > domain values and is defined for a finite set of column names which
is
 > called its *header*.
 >
 > Def. [Relation] A *relation* is a set of tuples that all have the
same
 > header.
 >
 > There, that wasn't so hard now, was it? Smile

By no means - this is much improved! Do you mind if I add these to the
glossary? I will have to read Alice.

I can guess what "domain" means here (a set), but would like that to be
spelled out too at some point. There seem to be differences on what
get tossed into the domain set -- does it have operators, for example?


I am very pleased to hear that one may simply use the mathematical
definition of relation in database circles when column header names are
not relevant, however, then I'm even more confused on why I get barked
at when I use that definition. Ah well ...

Thanks once again for your help! --dawn
 >
 > -- Jan Hidders<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Relation Definition 
Back to top
Login to vote
Jan Hidders1

External


Since: Sep 22, 2003
Posts: 29



(Msg. 5) Posted: Thu Feb 17, 2005 5:40 pm
Post subject: Re: Relation Definition [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Dawn M. Wolthuis wrote:
 >
 > Is this one from Date the best in the industry?

No. Of all the formal definitions of the relational model I have seen
his is probably the clumsiest. For the authorative ones that real
database theorists use see the definitions in the Alice book:

<a style='text-decoration: underline;' href="http://portal.acm.org/citation.cfm?id=551350" target="_blank">http://portal.acm.org/citation.cfm?id=551350</a>

To summarize, when it is sufficient the "subset of cartesian product"
definition is used, and when the names of the columns are relevant for
the discussion at hand the definition goes roughly something like the
following:

Def. [Tuple] A *tuple* is a partial function that maps column names to
domain values and is defined for a finite set of column names which is
called its *header*.

Def. [Relation] A *relation* is a set of tuples that all have the same
header.

There, that wasn't so hard now, was it? Smile

-- Jan Hidders<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Relation Definition 
Back to top
Login to vote
Alfredo Novoa

External


Since: Feb 04, 2005
Posts: 19



(Msg. 6) Posted: Fri Feb 18, 2005 4:40 am
Post subject: Re: Relation Definition [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Thu, 17 Feb 2005 22:02:43 GMT, Jan Hidders
<jan.hidders.DeleteThis@REMOVETHIS.pandora.be> wrote:

 >Def. [Tuple] A *tuple* is a partial function that maps column names to
 >domain values and is defined for a finite set of column names which is
 >called its *header*.

In which way is "columnar" a tuple "column"?


Regards<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Relation Definition 
Back to top
Login to vote
Jan Hidders1

External


Since: Sep 22, 2003
Posts: 29



(Msg. 7) Posted: Fri Feb 18, 2005 10:33 pm
Post subject: Re: Relation Definition [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Alfredo Novoa wrote:
 > On Thu, 17 Feb 2005 22:02:43 GMT, Jan Hidders
 > <jan.hidders.RemoveThis@REMOVETHIS.pandora.be> wrote:
 >
 >
  >>Def. [Tuple] A *tuple* is a partial function that maps column names to
  >>domain values and is defined for a finite set of column names which is
  >>called its *header*.
 >
 > In which way is "columnar" a tuple "column"?

You mean, why did I say "column name" and not just "field name"? Because
the field names in these tuples must be valid column names.

-- Jan Hidders<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Relation Definition 
Back to top
Login to vote
Jan Hidders1

External


Since: Sep 22, 2003
Posts: 29



(Msg. 8) Posted: Fri Feb 18, 2005 11:13 pm
Post subject: Re: Relation Definition [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

dwolt wrote:
 >
 > By no means - this is much improved! Do you mind if I add these to the
 > glossary?

By all means.

 > I can guess what "domain" means here (a set), but would like that to be
 > spelled out too at some point. There seem to be differences on what
 > get tossed into the domain set -- does it have operators, for example?

The exact terminology varies a little. Strictly speaking a domain is a
set of values where (1) these values must have a readable representation
and (2) an equivalence relation is defined over these representations
that says when they denote the same value. Next to that there may be
predicates and operations defined over these domains such as a linear
order or arithmetic operations. These operations are usually not seen as
part of a domain since they may have different input domains and yet
another output domain, but predicates over the domain such as the
equality and order are sometimes seen as part of the domain itself. It's
not really essential whether you do or not.

-- Jan Hidders<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Relation Definition 
Back to top
Login to vote
Anith Sen

External


Since: Feb 17, 2004
Posts: 310



(Msg. 9) Posted: Sun Feb 20, 2005 12:17 am
Post subject: Re: Relation Definition [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Jan,

  >> For the authorative ones that real database theorists use see the
  >> definitions in the Alice book:

I apologize if I missed the obvious. But where in the Alice book did you
find the definition you just stated?

  >> No. Of all the formal definitions of the relational model I have seen his
  >> is probably the clumsiest.

In what way does your definition any less clumsy than what is in Date's
book? 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.

Offering formalism for relations based on infinite disjoint sets of
symbols -- attributes, constants, variables and relation names by themselves
offer no practical use unless a real world interpretation is assumed. Thus
in the simplest possible terms, rows represent real world entities, column
values represent their properties and relational operations answer the
questions about them. Given Date has an entire career explaining how theory
can be practical and his explanations occasionally informal, I see nothing
clumsy in his definition.

What does your definition additionally offer w.r.t Date's definition?
Meanwhile, I can see you ignored the typed perspective altogether though.

--
Anith<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Relation Definition 
Back to top
Login to vote
Jan Hidders1

External


Since: Sep 22, 2003
Posts: 29



(Msg. 10) Posted: Sun Feb 20, 2005 7:40 am
Post subject: Re: Relation Definition [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Anith Sen wrote:
 > Jan,
 >
   >>>For the authorative ones that real database theorists use see the
   >>>definitions in the Alice book:
 >
 > I apologize if I missed the obvious. But where in the Alice book did you
 > find the definition you just stated?

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. Note, btw, that I
used the words "goes roughly something like" and not "appears verbatim
in". But I'm pretty confident that Serge Abiteboul et al. would approve
of my rephrasing of their definition.

   >>>No. Of all the formal definitions of the relational model I have seen his
   >>>is probably the clumsiest.
 >
 > In what way does your definition any less clumsy than what is in Date's
 > book?

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.

 > 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"? Is it a set of attribut names
together with a function that associates them with types? Or is it just
a set of attribute names and is their association with types postulated
before this definition? The difference matters. (2) The notion of
n-dimensional tuple is usually reserved for ordered tuples which is not
appropriate here. (3) It is not made precise what "corresponds to" means
in the final sentence. One would expect that the definition is extended
with a function that maps the numbers 1 through n to an attribute in the
header such the i'th dimensional value of the tupel is of the type that
is associated with it in the header.

 > [...] Given Date has an entire career explaining how theory
 > can be practical and his explanations occasionally informal, I see nothing
 > clumsy in his definition.

You're entitle to your opinion. Chris Date is truly excellent when it
comes to explaining stuff at undergraduate level, but I wouldn't dream
of using his books for advanced database theory courses.

 > Meanwhile, I can see you ignored the typed perspective altogether though.

Indeed. That is by design. This should not be defined in the notion of
relation but in the notions of relation types and the relationship them
and relations:

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.

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.

-- Jan Hidders<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Relation Definition 
Back to top
Login to vote
Anith Sen

External


Since: Feb 17, 2004
Posts: 310



(Msg. 11) Posted: Mon Feb 21, 2005 1:40 am
Post subject: Re: Relation Definition [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

  >> 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.

Reading down to the bottom of your post it seems to me like you are defining
a relation value while Date's definition refers to a relvar, or a relation
variable. If so, you can ignore the above since it makes sense to avoid the
reference to typed attributes when talking about the instance of a tuple
without a mapping function.

If it is not, then, how is the definition of a relation variable any useful,
if one ignores the relevancy of type of an attribute value while defining
it? At the practical level, isn't this an impetus for accommodating
type-less markers as attribute values in a relation?

  >> (1) What is exactly a "set of named typed attributes"?

Precisely, a set of attribute-type pair with a name. One might *loosely*
view an attribute as a "named substitute" of a type in a relation header.
Ignoring the reference to types in the relation header, one can even define
an n-ary relation simply as a set of n-tuples, which is more or less
equivalent to the mathematical definition.

  >> (2) The notion of n-dimensional tuple is usually reserved for ordered
  >> tuples which is not appropriate here.

Not sure in which context you are talking about dimensions here (vector
space? N-space? ). Loosely, a tuple is n-dimensional if it has n attributes
where n is finite. One might have a 0-dimensional tuple in a 0-ary or
nullary relation, 1-dimensional tuple in an unary relation and so on.

Can you post a reference which suggests the relevance of the n-dimensional
tuples is usually reserved for ordered tuples?

  >> (3) It is not made precise what "corresponds to" means in the final
  >> sentence.

Yes, I can see that & it was my mistake in paraphrasing the definition.

--
Anith<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Relation Definition 
Back to top
Login to vote
Alfredo Novoa

External


Since: Feb 04, 2005
Posts: 19



(Msg. 12) Posted: Mon Feb 21, 2005 11:41 am
Post subject: Re: Relation Definition [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Mon, 21 Feb 2005 16:15:07 +0100, Alfredo Novoa
<alfredo_novoa.DeleteThis@hotmail.com> wrote:

 >This is a relation, thus Tuple1 and Tuple2 "have" the same header. But
 >what "have" means here?

Sorry, I meant:

Tuple1 and Tuple2 have the "same" header. But what "same" means here?


Regards<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Relation Definition 
Back to top
Login to vote
Alfredo Novoa

External


Since: Feb 04, 2005
Posts: 19



(Msg. 13) Posted: Mon Feb 21, 2005 11:41 am
Post subject: Re: Relation Definition [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Fri, 18 Feb 2005 21:33:50 GMT, Jan Hidders
<jan.hidders.TakeThisOut@REMOVETHIS.pandora.be> wrote:

   >>>Def. [Tuple] A *tuple* is a partial function that maps column names to
   >>>domain values and is defined for a finite set of column names which is
   >>>called its *header*.
  >>
  >> In which way is "columnar" a tuple "column"?
 >
 >You mean, why did I say "column name" and not just "field name"?

Yes. Or just "attribute name".

 > Because
 > the field names in these tuples must be valid column names.

But tuples don't have columns, and you have not defined what a column
is.

BTW a header is not a set of column or attribute names, it is a set of
name and domain pairs.


Regards<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Relation Definition 
Back to top
Login to vote
Alfredo Novoa

External


Since: Feb 04, 2005
Posts: 19



(Msg. 14) Posted: Mon Feb 21, 2005 11:41 am
Post subject: Re: Relation Definition [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Sun, 20 Feb 2005 11:22:29 GMT, Jan Hidders
<jan.hidders DeleteThis @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"?

A set of name and type pairs.

 >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<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Relation Definition 
Back to top
Login to vote
Jan Hidders1

External


Since: Sep 22, 2003
Posts: 29



(Msg. 15) Posted: Mon Feb 21, 2005 6:40 pm
Post subject: Re: Relation Definition [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Alfredo Novoa wrote:
 > On Sun, 20 Feb 2005 11:22:29 GMT, Jan Hidders
 > <jan.hidders.RemoveThis@REMOVETHIS.pandora.be> wrote:
  >>
  >>That definition is problematic for several reasons: (1) What is exactly
  >>a "set of named typed attributes"?
 >
 > A set of name and type pairs.

That definition would allow two pairs with the same name.

  >>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.

Of course. I didn't say his definition is incorrect.

  >>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.

The definition doesn't define what an instance is, it defines the
instance-of relationship between relations and relation types.

  >>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.

No we don't. It means their headers, as defined earlier on, are the same.

-- Jan Hidders<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Relation Definition 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Towards a definition of atomic - AFAIK the conventional wisdom is that no absolute definition of atomic exists for domain types. Throwing caution to the wind, in this post I wish to conjecture a definition of atomic that, perhaps with some more effort at its formalisation, can provide....

parent-child relation with two children... - I have something like: entity (id, live_version_id NULL, preview_version_id NULL) version (id, parent_entity_id) where version.parent_entity_id must be a valid entity.id, and that entity must have the version.id in either live/preview version_id. Is ....

Functional Dependency to constrain a relation to exactly o.. - It's easy enough to describe a functional dependency that will constrain a relation to having at most one row; it is any functional dependency for which the determinant set is empty. In other words, for any relation R with set-of-attributes A, if you..

Cardinality of relation with empty set of attributes is 1 - Proof: MVFD with empty antecedent, for example {} -> {X} | {Y,Z} claims that cardinality of the XYZ relation is the product of cardinalities of its projection onto the sets X and YZ of attributes. Take {X} to be an empty set, then: {} -> {} | {X...

predicate, constraints, header, relvar, and relation - I've been reading a lot of CJ Date's work, and I have some fairly general (but fundamental) questions. Does a predicate apply to a relvar or a relation? It makes sense to me that you could have one relation that exists in two separate variables with two...
   Database Help (Home) -> Technology and Theory All times are: Pacific Time (US & Canada) (change)
Goto page 1, 2
Page 1 of 2

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]