[plug] auto-increment in mysql

Arie Hol arie99 at ozemail.com.au
Thu Jan 2 01:06:09 WST 2003


Hey Leon,

thanks for that great explanation, I'm sure that your extra effort will well
and truly have enlightened our curious friend, but like I said 'there are
many schools of thought on this subject' - which is why I did not elaborate
in the first place.

At 12:44 AM 02-01-2003 +0800, you wrote:

>I can think of lots of uses for a non-unique index. Software to plan courier 
>routes would probably like to start by looking up addresses in postcode 
>order, for example.
>
>You can also allow for prohibit UNIQUEness even in the absence of indeces 
>(PostgreSQL will silently create nameless indeces if necessary in order to 
>fulfil contraint checking requirements), for individual columns or groups of 
>columns. PRIMARY KEY for PostgreSQL is almost a synonym for UNIQUE NOT NULL. 
>And then there is the CHECK constraint if you really want to be sure, and the 
>handy REFERENCES contraint if you have a set of possible values tucked away 
>in another table somewhere.
>
>I wouldn't have to head-scratch for long to find uses for multiple 
>auto-incrementing fields either, BoC in PostgreSQL you can attach a function 
>to the field and auto-square or auto-add-Pi to it or whatever lights up your 
>beacon when a new record arrives. Or when the record is updated, deleted, 
>name it, per column or per table. And I'm sure that if you wanted to grow old 
>reading Oracle manuals, you'd find even more tricks in there.
>
>Cheers; Leon
>
>
Regards Arie

>--------------------------------------------<

For the concert of life, nobody has a program.

>--------------------------------------------<



More information about the plug mailing list