ID Best Practices for Databases [closed]
Solution 1:
You are confusing internal database functionality with external search criteria.
Auto-increment surrogate keys are useful for internal application use. Never pass those on to the user. Identifying business objects, whether it is a user or an invoice, are done with unique information about the object, like SSN, CCN or DOB. Use as much info as necessary to uniquely identify the object.
I highly recommend that if you must supply some newly invented ID value to each customer, that it NOT be the field you link all the customer data tables on.
Solution 2:
The best practice is to use an auto-increment integer. There's no real reason it shouldn't be used as an "innate identifier". It'll provide the most compact usage in foreign keys and fastest searches. Almost any other value can change and is inappropriate for use as a key.