title: What is the best practice for creating user ID in the system?
body: <p>I have created a new application. For this project, I built a login page. In the table storing user's information, I'm looking for one column that will keep user ID. This ID should be unique for each user in the system. While looking around on the internet, I found a few suggestions but each of them had different problems.</p>
  <p>In my project, I am using ColdFusion 2016 and Microsoft SQL 2008. Originally I was going to use <code>NEWID()</code> in SQL to generate the key for each user, but there are a few things that I do not like about this solution.</p>
  <ul>
  <li><p>First, the ID is way too long and I wouldn't want my users to have to enter such a long value when they search.</p>
  </li>
  <li><p>Second, I read that this can affect the performance of the query and slow down my database.</p>
  </li>
  </ul>
  <p>Then I was thinking about using <code>auto-increment id</code>. This solution is too simple for system ID in my opinion and maybe will cause some conflicts in the future.</p>
  <p>For example, if the table has to be recreated I'm not sure that the ID's will remain the same. So I'm wondering what is the best practice to create unique ids for the system? Should I use ColdFusion <code>CreateUUID()</code>? Again this is way too long in my opinion.</p>
  <p>If anyone knows the best practice or have any examples of how this can be achieved please let me know.</p>