List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:July 31 2000 3:02am
Subject:RE: The meaning of "UNIQUE idx_user_id (user_id)"
View as plain text  
At 6:56 PM -0700 2000-07-30, henrydesiato@stripped wrote:
>Aha! Now that makes perfect sense! I think what you just wrote should go
>directly into the CREATE TABLE page. Thank you for all your help.

Actually, pretty much all of what he wrote, which is perfectly correct,
is basic database terminology.  What you have been demonstrating with
your posts, I suspect, is that you are a newcomer to databases, without
familiarity with the idea of, e.g.,  what an index is or what it is for.
That's not a criticism, just an observation.  Your experience (or lack of it,
if I'm correct) seems to be leading you to expect that the MySQL Reference
Manual should be a basic text on SQL and relational databases.  That is
not what it's for.  It's a reference manual.  It's not going to teach
you database basics.  For that, you should probably get a general text
that does purport to teach basic stuff.


>
>
>>  -----Original Message-----
>>  From: Nick Lindridge [mailto:nick@stripped]
>>  Sent: Sun, July 30, 2000 06:41 PM
>>  To: mysql@stripped
>>  Subject: Re: The meaning of "UNIQUE idx_user_id (user_id)"
>>
>>
>>  I promised byself that I wouldn't write anything else on this
>>  thead and it's
>>  nearly 2.20am and I should be asleep but I had to...
>>
>>  "OK, I think I'm beginning to understand. Defining an index with
>>  a new name
>>       for a single column really makes the new name an alias for
>>  the column for
>>       purposes that I'm sure I'll find out about as I experiment
>>  more with MySQL."
>>
>>  I've a feeling that you're still thinking of the concept in a slightly
>>  incorrect way.
>>
>>  I'm not happy with you saying that the new name is an alias for the column
>>  as indices and their names have nothing directly to do with columns.
>>
>>  If we think of some concepts.
>>
>>  1. Tables.  Tables are composed of named columns, with each column having
>>  an associated type, display format, and some miscellaneous attributes.
>>
>>  2. Indices. An index on a table is set of data that, based on a given
>>  KEY, allows efficient selection of the rows in the indexed table
>>  that match
>>  the key.  The key is specified in terms of columns in the indexed
>>  table, but
>>  the index has no bearing on the structure or naming of any aspect of the
>>  table.  As said before, the index may be named or else has a default name,
>>  which just happens to be the name of the first column in the
>>  index, but could
>>  just as well (although not quite as useful) been names of cartoon
>>  characters.
>>
>>  The structure of the table is not affected in any way the presence of any
>>  indices, other than that changes to the table may be rejected because an
>>  index constraint (uniqueness) is violated by an attempted change to the
>>  table.
>>
>>  The reverse is not true however as the index is updated each time a change
>>  occurs to the table to ensure integrity of the index.
>>
>>  Maybe this confuses things even more but I'm trying to get the
>>  point across
>>  that the name of an index is nothing more than just that. There is no
>>  special purpose to it, and it doesn't give you anything other than a way
>>  to identify a given index. Any resemblance to column names is purely
>  > coincidental from a functional perspective.


-- 
Paul DuBois, paul@stripped
Thread
The meaning of "UNIQUE idx_user_id (user_id)"henrydesiato30 Jul
  • Re: The meaning of "UNIQUE idx_user_id (user_id)"Paul DuBois30 Jul
    • RE: The meaning of "UNIQUE idx_user_id (user_id)"henrydesiato30 Jul
      • RE: The meaning of "UNIQUE idx_user_id (user_id)"indrek siitan30 Jul
        • RE: The meaning of "UNIQUE idx_user_id (user_id)"henrydesiato31 Jul
          • RE: The meaning of "UNIQUE idx_user_id (user_id)"indrek siitan31 Jul
  • Re: The meaning of "UNIQUE idx_user_id (user_id)"Paul DuBois30 Jul
  • RE: The meaning of "UNIQUE idx_user_id (user_id)"indrek siitan30 Jul
    • RE: The meaning of "UNIQUE idx_user_id (user_id)"henrydesiato31 Jul
Re: The meaning of "UNIQUE idx_user_id (user_id)"Nick Lindridge30 Jul
  • RE: The meaning of "UNIQUE idx_user_id (user_id)"henrydesiato30 Jul
Re: The meaning of "UNIQUE idx_user_id (user_id)"Nick Lindridge31 Jul
  • RE: The meaning of "UNIQUE idx_user_id (user_id)"henrydesiato31 Jul
    • RE: The meaning of "UNIQUE idx_user_id (user_id)"Paul DuBois31 Jul
      • RE: The meaning of "UNIQUE idx_user_id (user_id)"henrydesiato31 Jul
        • Re: The meaning of "UNIQUE idx_user_id (user_id)"Benjamin Pflugmann31 Jul
        • RE: The meaning of "UNIQUE idx_user_id (user_id)"Paul DuBois31 Jul
    • Re: The meaning of "UNIQUE idx_user_id (user_id)"Benjamin Pflugmann31 Jul
Re: The meaning of "UNIQUE idx_user_id (user_id)"Nick Lindridge31 Jul
  • RE: The meaning of "UNIQUE idx_user_id (user_id)"henrydesiato31 Jul
RE: The meaning of "UNIQUE idx_user_id (user_id)"henrydesiato31 Jul
  • RE: The meaning of "UNIQUE idx_user_id (user_id)"Paul DuBois31 Jul
Re: The meaning of "UNIQUE idx_user_id (user_id)"Nick Lindridge31 Jul
  • RE: The meaning of "UNIQUE idx_user_id (user_id)"henrydesiato31 Jul
    • RE: The meaning of "UNIQUE idx_user_id (user_id)"Paul DuBois31 Jul
    • Re: The meaning of "UNIQUE idx_user_id (user_id)"Mike Wexler31 Jul
      • Re: The meaning of "UNIQUE idx_user_id (user_id)"Paul DuBois31 Jul