Re: Stored fields ordered left to right
Date: Mon, 12 Jan 2004 16:31:31 -0600
Message-ID: <slrnc06823.vjp.adrian_at_sixfingeredman.net>
Dawn M. Wolthuis <dwolt_at_tincat-group.com> schrieb:
> 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.
In that case, I will grant you that this approach is equally expressive, but I think that calling this a "function" is an abuse of the term. The range of this function, and therefore the function itself, in it's function-ness, is logically meaningless -- you're actually using the domain as a way to encode a list of tuples, a relation, in an obscure way.
A modelling tool should deliver a straightforward mapping between the parts of the model and the parts of the system we're modeling. With relations it is easy to make such a mapping by treating relations as logical predicates: "so-and-so LIVES AT such-and-such-a-place". I don't see how such a mapping would work in general for functions. In our above example, you can see that the null range of the function corresponds to nothing in our actual system, it is just there to satisfy the formalism. That's a bad sign.
> 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.
So my complaint is that calling relations functions is a bad idea. I think that if you tried to translate relational formalisms into terms of equivalent "functions from tuples to the null set" the result would be more complicated, harder to understand and apply. Which is why mathematicians created the concept of relations to begin with, so I'm surprised you disagree. Received on Mon Jan 12 2004 - 23:31:31 CET