I want to create a running list of alphanumeric IDs that are 12 characters long. I have the algorithm to create the IDs. But what is the best method of ensuring the IDs are immutable and never be duplicated. These IDs will be barcodded and used as labels in shipping boxes. So I dont want my generator to duplicate an ID.
The poorest way is to create a formula in excel and execute the cell everytime I want a new ID to be created. But this can be prone to accidental deletion of the previous cell. Ideally getting the generated IDs into a database should work, I could write a python script to generate the IDs and insert it into a SQL database. But Im not a DBA and I dont know what checks I should keep in place to ensure a newly inserted ID is not a duplicate of a previous one.
And suggestions or direction would be greatly appreciated. Thanks in advance.