title: What is the best practice creating Primary / Unique ID in a RDBMS table when both Candidate & Composite Key Options are possible?
body: <p><strong><em>Scenario</strong> :<br>
   - There are two departments namely 'Software' &amp; 'Hardware'.<br>
   - They have divisions like 'Cobol', 'Fortran', 'Pascal', 'QBasic' in Software department.<br>
   - And 'RAM', 'HardDisk', 'Monitor', 'CPU' in Hardware
     department.<br>
   - Below are the table formats for both the <strong>Department</strong> and
     <strong>Division</strong> tables.</em></p>
  
  <p>Database used : Oracle</p>
  
  <p><strong>Table 1 : Department Table</strong></p>
  
  <p><a href="https://i.stack.imgur.com/rEEO3.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rEEO3.jpg" alt="enter image description here"></a></p>
  
  <p><strong>Table 2 : Division Table for the above Departments (Format 1 - Primary Key / Unique Id Column = Div_id)</strong></p>
  
  <p><a href="https://i.stack.imgur.com/rEEO3.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/eVTSB.jpg" alt="enter image description here"></a></p>
  
  <p><strong>Table 2 : Division Table for the above Departments (Format 2 - Primary Key / Unique Id Column = Div_id + Dep_id)</strong></p>
  
  <p><a href="https://i.stack.imgur.com/eVTSB.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ilhY8.jpg" alt="enter image description here"></a></p>
  
  <p>In the above two division table formats, i can't able to find the pros &amp; cons. So in these formats, what is the best practice to create Primary / Unique ID. And why it is best?   </p>
  
  <p>Is there any performance difference between both formats when using select query?</p>