How can I classify the contents in 2 groups based on their values in SQL?
<p>I have a relational schema as follows: </p>

<pre><code>INVENTORY(inventoryID,title,wholesale,markup,qtyinStock,discount)
Primary-Key: inventoryID

BOOK(coverType,inventoryID)
Primary-Key: inventoryID
Foreign-Key: inventoryID

DVD(classification,ReleaseYear,StarRating)
Primary-Key: inventoryID
Foreign-Key: inventoryID
</code></pre>

<p>BOOK and DVD are basically the subtypes of Inventory. They are inheriting from INVENTORY. Now, I want to display all the items in the inventory as either a book or a DVD depending upon the items presence in the table. I did the following but I am not sure if this is right:</p>

<pre><code>SELECT title FROM INVENTORY,BOOK,DVD
WHERE INVENTORY.inventoryID = BOOK.inventoryID AND INVENTORY.inventoryID = DVD.inventoryID
</code></pre>

<p>This doesn't display the titles of the items though. How can I add that? Thanks!</p>