What’s the best way to assign ID’s?

The “Name” issue isn’t that much different from the “SKU” issue. (SKU is short for Stock Keeping Unit, aka Part Number or Product Number). I have had to deal with this everywhere that has SKUs. No one does it well, but by slowing down and thinking about it, there’s almost always a decent solution. 

There are 2 ways to assign SKUs, sequentially (start with “1” and increment 1 for every new SKU) or not sequentially. I have never seen anyone do it sequentially. (Although some excellent systems keep 2 SKUs, one of which “is” sequential and is used as the primary key and for all indexing. This is the best way I’ve ever seen to handle SKUs that change, but that’s another story.)

Almost everyone wants a smart or semi-smart SKU. So that by simply looking at the SKU, anyone can tell what it is without reading the description. You know, the first digit is Commodity Code, 1 for shoes, 2 for pants, etc. Then another digit for color, another for size, etc. This works well until you have ten colors; then you need 2 digits or alphas. 

But wait, there’s more. Let’s put hyphens (or some other delimitter) between the product descriptors and the vendor data, manufacturer data, and customer data. 

So now you’ve covered any possible product with your super slick smart SKU naming system. 

Until something comes along that isn’t covered. (Now we have military items with 14 other considerations.) So we come up we a second totally different scheme. Then a third. Then a 4th, etc. So now you can tell anything about an item “if you know which scheme” it falls under. 

But wait, there’s more. You should be able to enter any SKU into a form field “regardless of Smart SKU scheme”. (If the first digit is “9”, then use Smart Scheme 3. If there’s a hyphen in position 3, then use Smart Scheme 8, etc.) Your form logic should be able to intelligently guide the user based on the rules of the template or scheme. 

I have built apps where users can design and build their own Smart SKU templates, which are then used to enforce compliance and guide operators. These have generally worked pretty well. 

Is there some way to do the same thing for human names? I dunno, but now you got me to thinking about it. A combination of standard templates and custom templates oughta cover most possibilities. Some basic logic with optional pop-up forms which uses the templates as parameters should work. Something to think about…