title: I do not know what data type to choose for Microsoft SQL Server IDs
body: <p>I am creating a database in SQL Server hosted on AWS RDS (I want to use the  2016 or 2017 version).</p>
  
  <p>My question is about the creation of IDs for the tables that I suspect will have many of rows (that's true that probably my database will not have a lot of rows, but I want to learn how to do correctly my work). I do not know what data type is better to choose.</p>
  
  <p>The structure of my id is going to be: </p>
  
  <pre><code>[Two items for schema][Three items for tables][Five items for rows]
  </code></pre>
  
  <p>Example that I have been considering:</p>
  
  <pre><code>Data type and length | Example    | Storage (bytes)
  ---------------------+------------+---------------
  VARCHAR(10)          | S1TA100001 |   10 bytes 
  NUMBER(10,0)         | 0100100001 |    9 bytes
  BIGINT               | 100100001  |    8 bytes
  </code></pre>
  
  <p>If I use <code>VARCHAR</code>, I have more range (0-9 and A-Z -38-) so maybe I can reduce de ID ([Schema one][Table-one][Row-(tree|four)] that is 5 or 6 bytes that's suppose 54.872 or 2.085.136 rows. But I guess that translates into computing cost.</p>
  
  <p>If I use NUMBER I only have the range (0-9) that is supposed 100.000 rows.</p>
  
  <p>If I use <code>BIGINT</code> which has a range of -2^63 (-9,223,372,036,854,775,808) to 2^63-1 (9,223,372,036,854,775,807). I only use a few of them, but I do not if the computing cost is relevant.</p>
  
  <p>Thank you very much!</p>