Matt Smolic wrote:
Does anyone know where I can get some info on creating customer
account numbers, part numbers and such. In other words what the logic is
behind their creation. I am not looking for code, just how they go about it.
I don't want to use something like a phone number or anything else that
may change over time. Any info would be greatly appreciated.
Thanks Matt
You will need some incremental counter portion of the number. You can
begin with some type of identifying sequence, such as branch number or
year, and then an incremental sequence to make sure you don't have
duplicates. I have some people who liked specifying the month the
client record was created (format mmy or mmyy) or just the year (yyyy
or yy) or the date (yymmdd). On your counter, make sure you have
enough digits to ensure room for growth. A 5 digit counter will allow
for 100,000 customers where 6 digits will handle 1,000,000 records.
That counter can count up separately for each branch/year/whatever, or
you can use a system-wide pool of numbers.
You do NOT want to use this customer ID as the primary key, since the
customer numbers WILL at some point change. (They will, just count on
it.) Indexed and no duplicates is fine, but the PK should be invisible
to the average user since they always find a "good" reason that a
different number should be assigned.
Part numbers. I would probably want some portion of that number to
reflect the vendor I purchase the parts from, maybe another portion if
you have a department or function that uses the part (exhaust system,
a/c system, general use?) and then some incremental counter. Again,
don't use this part number as the primary key as somebody somewhere
will want to change it.