If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > General > Database Concepts & Design > Semi Automatic Serial (Autoincrement)

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-16-08, 15:44
Lanny Lanny is offline
Registered User
 
Join Date: Mar 2008
Posts: 2
Semi Automatic Serial (Autoincrement)

I am stuck with this design requirement:

In an inventory of tens of thousands of items, we designed the unique ID of each item to be auto-increment (MySQL) - serial in Informix. The requirements have been extended to be able to also assign the ID from a batches of reserved numbers. This is a valid user requirement allowing the use of pre-printed labels on some items.

You can, of course, enter and ID into an auto-increment field, providing it does not exist, but it alters the next auto increment value. That, in turn, causes "strange" sequencing in the database.

Our ID is integer.

Anyone with any experience in doing this?

Thanx
Reply With Quote
  #2 (permalink)  
Old 03-19-08, 06:14
gvee gvee is offline
www.gvee.co.uk
 
Join Date: Jan 2007
Location: UK
Posts: 10,156
My experience always says: auto incrementing primary keys have no values. Therefore it should not matter a toss if there are "gaps" in your sequencing
__________________
George
Twitter | Blog
Reply With Quote
  #3 (permalink)  
Old 03-19-08, 08:25
Lanny Lanny is offline
Registered User
 
Join Date: Mar 2008
Posts: 2
Quote:
Originally Posted by georgev
My experience always says: auto incrementing primary keys have no values. Therefore it should not matter a toss if there are "gaps" in your sequencing
Yes, that is a valid concept. Would you then suggest we have a separate field for the actual inventory number or just number inventory in a random-incremental fashion?
Reply With Quote
  #4 (permalink)  
Old 03-19-08, 08:35
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,524
i would just number inventory items in a unique fashion

__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On