× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



On Wed, Jun 14, 2017 at 9:46 AM, Steve Needles
<Stephen.Needles@xxxxxxxxxxx> wrote:
As mathematics has proven time and again,

a + b = b + a

Well, this holds for common "lay person" arithmetic on numbers. It
doesn't *necessarily* hold for all "addition" operations on all sets.

A simple counterexample is when '+' is defined as the concatenation of
strings (and this is just as much a mathematics thing as it is a
computer science thing; it could be and has been argued that computer
science is merely a branch of mathematics anyway).

The need for 2 unique keys to be defined as mirrors of one another is beyond my comprehension this early in the morning. You know...because a + b = b + a...right?

Um, unnecessary, yes. Because of commutativity, no. If anything, a
compound key involves concatenation, which is not commutative. What
makes one of the uniqueness constraints redundant is that there is a
one-to-one and onto mapping from one set of elements to the other.

But the question isn't about whether both constraints are needed. OP
already said he realizes one of them is redundant. The question is
whether keeping both has any negative consequences. It has been
suggested that the SQL engine *might be* sophisticated enough that
there is no discernible performance penalty. But no one has yet stated
that they know for sure one way or the other. Which isn't at all
surprising, given the engine's complexity.

The only way to know for sure is to measure performance with and
without the second uniqueness constraint.

John Y.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.