Re: Stored fields ordered left to right

From: Dawn M. Wolthuis <dwolt_at_tincat-group.com>
Date: Mon, 12 Jan 2004 04:28:56 -0600
Message-ID: <bttstc$mda$1_at_news.netins.net>


"Adrian Kubala" <adrian_at_sixfingeredman.net> wrote in message news:slrnc04g10.qpa.adrian_at_sixfingeredman.net...
> Dawn M. Wolthuis <dwolt_at_tincat-group.com> schrieb:
> > Every relation where each tuple has a unique identifier or candidate key
can
> > also be represented as a function. Can you give an example of a set of
> > propositions that can be modeled as relations but not as functions?
>
> {<1, 1> <1, 2> <2, 1>}

Yeah, thanks Adrian, but I've got the mathematics part down on the difference between a function and a relation. I can graph such. But when it comes to what we once called data processing using a computer, is it feasible to have a pure relational implementation (no, I'm not confusing implementations with the model -- stick with me) using a database without actually ending up with a function? In the relational model, how do you implement this without either a) an identifier tagged on by the database which could be kept out of the model or b) a candidate key?

The function this would correspond to in the model I work with is one where either the designer would implement it with a random or sequential key, such as:

ID: 1
INFO: <1 ,1>

ID: 2
INFO: <1, 2>

ID: 3
INFO: <2, 1>

Or perhaps:

ID: 1
INFO-A: 1
INFO-B: 1 ID: 2
INFO-A: 1
INFO-B: 2 ID: 3
INFO-A: 2
INFO-B:1 You can see the function outright in the above design. Or the designer could add it without such a key, by making the entire tuple a "candidate key" by implementing it as

ID:<1,1>
ID:<1,2>
ID<2,1>

In this design, the function maps each of these IDs to the null set.

Whether one chooses to reflect that it is actually a function that gets implemented in a database or opts to leave out that information and treat the function logically as a relation (which it also is) by removing any unique identifier or candidate keys from the implementation (can you really implement this in an RDBMS without any candidate keys?), another model could just as accurately reflect the fact that this is a function within the model.

I might have said that poorly -- did that make sense? Thanks a bunch -- I truly do want to understand and be corrected if I have this wrong. --dawn In Received on Mon Jan 12 2004 - 11:28:56 CET

Original text of this message