I’m attempting to create an order number for customers to use. I will have multiple machines that do not have access to the same database (so can’t use primary keys and generate a unique ID).
I will have a unique string that I could use for a seed for some algorithm that will generate a unique looking alphanumeric ID # for the order number. I do not want to use this unique string as the order # because its contents would not be appropriate in appearance for a customer to use for order #.
Would it be possible to combine the use of a GUID & my unique string with some algorithm to create a unique order #?
Open to any suggestions.
If you have a relatively small number of machines and each one can have it’s own configuration file or setting, you can assign a letter to each machine (A,B,C…) and then append the letter onto the order number, which could just be an auto-incrementing integer in each DB.
i.e.
Your order table in each database would have an ID column (integer) and “machine” identifier (character A,B,C…) so in case you ever needed to combine DBs into one, each order would still be unique.