title: Is it okay to have non sequential ids as primary keys for a table in your database?
body: <p>I don't know enough about databases to find the right words to ask this question, so let me give an example to explain what I'm trying to do: Suppose I want the primary key for a table to be an ID I grab from an API, but the majority of those API requests result in 404 errors. As a result, my table would look like this:</p>
  
  <p>I also don't know how to format a table-like structure on Stack Overflow, so this is going to be a rough visual:</p>
  
  <pre><code>API_ID_PK | name
  ------------------
  1         | Billy
  5         | Timmy
  23        | Richard
  54        | Jobert
  104       | Broccoli
  </code></pre>
  
  <p>Is it okay for the ID's not to be sequentially separated by 1 digit? Or should I do this:</p>
  
  <pre><code>ID PK |  API_ID   | NAME
  ----------------------------------------
  1     |    1      | Billy
  2     |    5      | Timmy
  3     |    23     | Richard
  4     |    54     | Jobert
  5     |    104    | Broccoli
  </code></pre>
  
  <p>Would the second table be more efficient for indexing reasons? Or is the first table perfectly fine? Thanks!</p>