title: Number VS Varchar(2) Primary Keys
body: <p>I'm now to this point of my project that I need to design my database (Oracle).
  Usually for the status and countries tables I don’t use a numeric primary key, for example</p>
  
  <pre><code>STATUS (max 6)
  AC --&gt; Active
  DE --&gt; Deleted
  
  COUNTRIES (total 30)
  UK --&gt; United Kingdom
  IT --&gt; Italy
  GR --&gt; Greece
  </code></pre>
  
  <p>These tables are static, not updated through the application and it's not foreseen to be change in the future so there is no chance having update problems in tables that will use these values as foreign keys.</p>
  
  <p>The main table of the application will use status and country (more than once e.g. origin country, destination country) and it is foreseen that 600000 rows will be added per year</p>
  
  <p>So my question is, will these VARCHAR(2) keys will have an impact in the performance when querying the join of there 3 tables.
  Will the first be significantly slower than the second?</p>
  
  <pre><code>SELECT m.*,
         s.status_name,
         c.country_name
    FROM main m, status s, countries c
   WHERE m.status_cd = s.status_cd
     AND m.country_cd = c.country_cd
     AND m.status_cd = 'AC'
     AND m.country_cd = 'UK'
  
  SELECT m.*,
         s.status_name,
         c.country_name
    FROM main m, status s, countries c
   WHERE m.status_cd = s.status_cd
     AND m.country_cd = c.country_cd
     AND m.status_cd = 1
     AND m.country_cd = 2
  </code></pre>
  
  <hr>
  
  <p>Clarification:</p>
  
  <p>Status is not binary ("max 6" next to the table name). The values will probably be:</p>
  
  <pre><code>* active
  * deleted
  * draft
  * send
  * replaced
  </code></pre>
  
  <p>and we need to display the decoded values to the user, so we need the names.</p>