Hi Gunnar,

Why don't you keep the key out of the business rule and create a column to 
identify the type of customer?

How are you going to handle the application when your business reaches more 
than 9999 vip customers???

This is an issue that can be avoided by creating a type column .

Siomara
PS: This is just a suggestion of someone that once got this issue.




>From: Gunnar von Boehn <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: [EMAIL PROTECTED]
>Subject: auto-increment & sequence question
>Date: Tue, 26 Jun 2001 13:49:33 +0200
>
>Hello everybody,
>
>
>I thing, that I have a problem that needs a sequence and that
>auto-increment can't do the job this time.
>
>I already consulted the manual and the mailarchive.
>I saw several different proposals, now I'm a bit confused and don't
>know exactly what the rigth way is to do it.
>
>Could somebody please clarify the following?
>
>
>We are using ISAM tables on mysql 3.22.32.
>
>We have an id-column but the id will be generated out of two different 
>ranges.
>Example: all VIP-customers will get an id from 1000-9999 and
>normal customers from 10000-9999999.
>
>So, I think the only way to solve this is a sequence table.
>
>Lets take a single row, integer value for holding the sequence:
>CREATE TABLE sequence(
>   id int4;
>);
>
>
>My question is this:
>Is this the best way to get and evalute the sequence?
>
>  LOCK TABLES sequence WRITE;
>  UPDATE sequence SET id=id+1;
>  SELECT id FROM sequence;
>  UNLOCK TABLES;
>
>
>
>Thanks
>Gunnar von Boehn
>
>---------------------------------------------------------------------
>Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
>
>To request this thread, e-mail <[EMAIL PROTECTED]>
>To unsubscribe, e-mail 
><[EMAIL PROTECTED]>
>Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to