# Re: Is a function a relation?

Date: Tue, 23 Jun 2009 15:32:12 -0400

Message-ID: <05a0m.266$8r.2_at_nlpi064.nbdc.sbc.com>

"Brian Selzer" <brian_at_selzer-software.com> wrote in message
news:Im70m.1622$Wj7.1075_at_nlpi065.nbdc.sbc.com...

*>
*

> "Brian Selzer" <brian_at_selzer-software.com> wrote in message

*> news:PX30m.509$kA.392_at_nlpi068.nbdc.sbc.com...
**>>
**>> "David BL" <davidbl_at_iinet.net.au> wrote in message
**>> news:09f7bd9a-76f9-47c3-a4fd-8ef4556c2036_at_m19g2000yqk.googlegroups.com...
**>>> On Jun 23, 1:09 pm, Keith H Duggar <dug..._at_alum.mit.edu> wrote:
**>>>>
**>>>> You considered the wrong relation values having the wrong
**>>>> attribute names. Here are the correct values
**>>>>
**>>>> f(x) = x+1 -> { (domain,range) | range = domain + 1 }
**>>>> g(y) = y+1 -> { (domain,range) | range = domain - 1 }
**>>>>
**>>>> corresponding to the f(x) and g(y) you gave.
**>>>
**>>> So you're suggesting that a function is a relation where a special
**>>> convention has been followed in the choice of attribute names? Yes
**>>> that's one way of looking at it. That would in fact suggest the
**>>> interesting idea that one can use the RA to define functions. E.g.
**>>> start with some n-ary relation and use projection to get a binary
**>>> relation, and rename as required according to this special naming
**>>> convention.
**>>
**>> I think that it is not names but roles. Instead of domain and range,
**>> think determinant and dependent. A function is a relation that has
**>> defined in its schema at least one dependent attribute that does not
**>> belong to all determinants. Put it another way: a function is a relation
**>> that satisfies at least one nontrivial functional dependency.
**>
**> After thinking about this for a moment, I realized that I neglected to
**> consider pathological cases, such as relations that are not at least in
**> 3NF. So, with that qualification: a function is a 3NF relation that has
**> defined in its schema at least one dependent attribute that does not
**> belong to all determinants; a function is a 3NF relation that satisfies at
**> least one nontrivial functional dependency.
*

Scratch that. Due to the augmentation inference rule for functional dependencies, even pathological relations are functions whenever they each satisfy at least one nontrivial functional dependency. I'm really finding it difficult to state that without using the term 'functional' and without rehashing the definition of a functional dependency, but I should hope that by now you get the gist of what I'm saying. Received on Tue Jun 23 2009 - 21:32:12 CEST