I was wondering how to use MySQL to handle an inventory system, easy enough when there is a simple count of the UPC for each item
I was wondering with electronics how to handle series numbers
clearly serial numbers are not useful as an index, while UPC is slightly more suitable
ideas?
work with an inventory, with some items having serial number
Moderator: General Moderators
work with an inventory, with some items having serial number
Hardcore Games™ Legendary is the Only Way to Play™
My site is powered by LAMP
My site is powered by LAMP
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: work with an inventory, with some items having serial nu
I would in general recommend an autoincrement INT for indexes. The product, serial, series, etc. numbers would be separate fields that can be indexed if they are to be searched in WHERE statements.
(#10850)
Re: work with an inventory, with some items having serial nu
That is more or less what I was figuring, more rows for those items with serial numbers.
products like iphone cables do not have a serial number, unlike the iphone itself
upc codes are abundant but imperfect
I was pondering 2 tables, one for the products and a bool then for those who have serial numbers,pull the data from another table which would simplify things a tad
products like iphone cables do not have a serial number, unlike the iphone itself
upc codes are abundant but imperfect
I was pondering 2 tables, one for the products and a bool then for those who have serial numbers,pull the data from another table which would simplify things a tad
Hardcore Games™ Legendary is the Only Way to Play™
My site is powered by LAMP
My site is powered by LAMP
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: work with an inventory, with some items having serial nu
Sounds like more work if there is just 1:1 relation -- just leave the serial number field empty if there isn't one. It's not like your disk will fill up with all those serial numbers.Vegan wrote:I was pondering 2 tables, one for the products and a bool then for those who have serial numbers,pull the data from another table which would simplify things a tad
(#10850)