title: Type Inheritance vs Table Inheritance
body: <p>I am reading about object-based databases from Silberschatz book. It explains Type Inheritance with the following example:</p>
  
  <pre><code>create type Person
  (
      name varchar(20),
      address varchar(20)
  );
  </code></pre>
  
  <p>Now we can use type inheritance like:</p>
  
  <pre><code>create type Student under Person 
  (
      degree varchar(20),
      department varchar(20)
  );
  </code></pre>
  
  <p>I think I understood upto this point. Now I create a table of type Person as:</p>
  
  <pre><code>create table people of Person;
  </code></pre>
  
  <p>But now if I want to create a table of type student. Should I do this:</p>
  
  <pre><code>create table students of Student;
  </code></pre>
  
  <p>OR</p>
  
  <pre><code>create table students of Student under people;
  /*which is described in the book as table inheritance*/
  </code></pre>
  
  <p>What is the difference between the above two? Since we already inherited Person while defining type Student is it necessary to inherit a table of type Person (person) while creating a table of type Student?</p>
  
  <p>If someone could explain this with an example it will be a lot clearer.</p>