Re: The naive test for equality

From: paul c <toledobythesea_at_oohay.ac>
Date: Mon, 01 Aug 2005 00:22:19 GMT
Message-ID: <%WdHe.76187$s54.28208_at_pd7tw2no>


DBMS_Plumber wrote:
> You define equality either a) by declaring an equal() relation and
> populating it with equality mappings (no one does this), or else b) by
> incorporating into the engine a module of non-declarative code which
> returns 'true' or 'false'.
>
> For consistency, you might try adding a module 'compare()', instead of
> 'equal()', because that will get you the set of comparison operators to
> boot. Most Object-Relational DBMS products adopt this practice.
>
> Numerous other practical problems arise:
>
> a) You need to incorporate the comparison in the engine's
> infrastructure: sorts, indices, grouping, etc.
>
> b) For some sort algorithms (radix) and other physical operations (hash
> joins, bloom filters, mapping tuples to partitioning schemes) the
> bit-wise representation of the value needs to be consistent with the
> logical operations (or you need to write code to convert your
> representation to something that's bit-wise consistent)
>
> c) Nothing on the whole green earth can help you if you decide to
> change the definition of these functions in an operational system, or
> try to do a database restore with different functions. You have to
> unload the DBMS, and re-load it again, or else engage in huge amounts
> of conversion jiggery pokery (this factor heavily influences the design
> of type extensions)
>
> d) Support for distributed computing needs care, because of
> byte-orderings, etc.
>
> All of these trade-offs and questions were thoroughly explored in the
> systems research literature a decade ago. Most SQL DBMS products
> provide the functionality to some degree.
>

heh (that's a 'heh' on the 2nd glass of plonk). i'd say that everything you say is true within the scope of implementation which is fair enough, given your moniker, although i'd also say that how "You define equality" if it were turned into a question is kind of impossible outside of politically correct circles where people try to do all kinds of impossible things. my thrust was admittedly philosophical (which may explain my choice of moniker), or what i remember Hugh Darwen calling 'mystical'. i was trying in my clumsy way to say that equality is an elusive quality and 'sameness' is easier for me to deal with. admittedly, a philosopher could ask, "if they are the same thing, how could we compare them in the first place?". maybe that's why people make up axioms.

cheers,
p Received on Mon Aug 01 2005 - 02:22:19 CEST

Original text of this message