Path: dp-news.maxwell.syr.edu!spool.maxwell.syr.edu!drn.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.vmunix.org!newsfeed.cw.net!news-FFM2.ecrc.de!feed.news.schlund.de!schlund.de!news.online.de!not-for-mail
From: Martin Zapf <Martin_Zapf@gmx.net>
Newsgroups: comp.databases.theory
Subject: Re: RM and definition of relations/tuples
Date: Wed, 23 Nov 2005 20:28:40 +0100
Organization: 1&1 Internet AG
Lines: 40
Message-ID: <dm2ft7$3cp$1@online.de>
References: <dm1qq0$utl$1@online.de>
NNTP-Posting-Host: p54b59991.dip0.t-ipconnect.de
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: online.de 1132774119 3481 84.181.153.145 (23 Nov 2005 19:28:39 GMT)
X-Complaints-To: abuse@einsundeins.com
NNTP-Posting-Date: Wed, 23 Nov 2005 19:28:39 +0000 (UTC)
User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)
X-Accept-Language: en-us, en
In-Reply-To: <dm1qq0$utl$1@online.de>
Xref: dp-news.maxwell.syr.edu comp.databases.theory:34595

Martin Zapf wrote:
> I have a question to the Relational Model and the definition of 
> relations and tuples.
> 
> 
> I learned the following definitions:
> 
> A relation schema R is a set of Attributes R={A_1,A_2,...,A_n}
> Each Attribute A has a domain dom(A)
> 
> Here comes the problem, there are two definitions for relations/tuples
> 
> 1. defintion:
>     
>     A relation r for schema R is a mathematical relation (cartesian
>     product) over the
>     domains from the attributes of R.
>     So r:=dom(A_1)xdom(A_2)x...xdom(A_n)
          ^^^^^ this is a typo, actually r
is defined as subset of dom(A_1)xdom(A_2)x...xdom(A_n)

>     A tuple is an element of r.
> 
> 2. definition
> 
>     A relation r for schem R is a set of tuples.
>     A tuple t is a function
>     t: R -> Union (dom(A_1),dom(A_2),...,dom(A_1))
>     t maps each Attribute of R to an value of its domain.
>     So a relation is a set of functions, which are called tuples.
> 
> 
> I noticed, that the difference between this two definition is that 
> definition 1 forces a certain order for the Attributes and the values 
> for them in the tuples.
> The 2. definition doesnt need any order for the attributes.
> 
> 
> Im quite confussed, is there a "better" definition or should you always 
> use both?
