title: Best practice for unique IDs in Neo4J and other databases?
body: <p>Currently in my Node.Js app running on Neo4J I use <code>node-uuid</code> module for giving unique IDs to my database objects. </p>
  
  <p>Using <code>uuid.v1()</code> function from that module I get something like </p>
  
  <pre><code>81a0b3d0-e4d0-11e3-ac56-73f5c88681be
  </code></pre>
  
  <p>Now, my requests are quite long, sometimes hundreds of nodes and edges in one query. So you can imagine they become huge, because every node and edge has to have a unique ID. </p>
  
  <p>Do you know if I could use a shorter ID system in order to not run into any problems after the number of my items grow? I mean I know I could get away with just the first 8 symbols (as there are <code>36^8 &gt; 2 Trl</code> combinations, but how well will it perform when they are randomly generated? As the number of my nodes increase, what is the chance that the randomly generated ID will not fall into the already existing ones?</p>
  
  <p>Another question - how to swap the current ID system to the new one? What would be the best way of regenerating the new, shorter IDs?</p>
  
  <p>Thank you!</p>