Functions are not fundamental to databases. Realtion are.

From: Drago Ganic <drago.ganic_at_in2.hr>
Date: Sun, 17 Jul 2005 22:25:22 +0200
Message-ID: <dbeeri$jhl$1_at_sunce.iskon.hr>


Dawn,
functions and relations have in CS and mathematics two very important but different meanings:
  function ==> computation, action/transformation   relation ==> storage, state

The most fundamental objects in mathematics are functions and sets (=> relations).

Functions cannot be UPDATEed / DELETEed or MODIFYed ... those are done on data which are stored somewhere. Functions just SELECTs data i.e. gives/calculates value(s) FROM somewhere.

Where is the confusion? This newsgroup is about storage, hence sets. So sets (incl. relations) are a good staring point for teaching databases (also in kindergarten :-)

Greeting from Croatia,
Drago Ganic

"dawn" <dawnwolthuis_at_gmail.com> wrote in message news:1121198764.065448.194130_at_g44g2000cwa.googlegroups.com...
> Marshall Spight wrote:
>> dawn wrote:
>> > [a lot of stuff]
>>
>> Dawn,
>>
>> Uh, wow.
>
> Glad you enjoyed? :-)
>
>> I don't *want* to ditch the word relation; I don't have another
>> word that comes close. "Function" doesn't cut it.
>
> Because ... ? Granted, it is but one way to model data. I don't insist
> on a single way of viewing the subject. However, I can discuss the
> topic of data modeling quite thouroughly without ever using the term
> "relation" but not without using the term "function".
>
>> I also
>> don't see any particular conflict or even a difference between
>> mathematics and computer science; I consider CS to be a branch
>> of math, with some particular areas of emphasis, such as
>> how much work calculating a particular function is.
>
> So one might hope that CS would not take a solid, generally agreed
> upon, mathematical term and redefine it. But that does seem to be what
> has happened, unfortunately.
>
>> And what's wrong with "a subset of the product of sets?" That's
>> not all that complicated.
>
> I like it. I haven't seen a product of sets that has unordered
> "columns" however.
>
>> It's no more complicated than "a mapping
>> from one set to another."
>
> Functions are a subset of relations that is a little easier to teach,
> however. In kindergarten the students match an item on the left hand
> side of the page to exactly one on the right before any exercises that
> permit the more generalized form of a relation, allowing an item on the
> left to have a line to more than one item. So, I would argue that
> there is some slight advantage to introducing the concept of a function
> and then generalizing instead of starting with relations and then
> narrowing it down.
>
>>
>> > > It doesn't have to be required, it usually follows from the fact that
>> > > the relation is a set.
>> >
>> > You lost me here. How do you define a candidate key in mathematics so
>> > that every set must have one?
>>
>> A "set" is a collection of *unique* members. Because of that word
>> "unique" there has to be a candidate key.
>
> OK, I'm with you and willing to hit my forehead and say "duh". Saying
> that because something is a set it must be a function is not accurate,
> but, yes, there is a function that can be associated with any set. If
> no subset of the element/tuple variable is a candidate key, then the
> entire element would be. Sorry I missed the point. --dawn

>
Received on Sun Jul 17 2005 - 22:25:22 CEST

Original text of this message