I have a relational schema as follows:
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 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:
SELECT title FROM INVENTORY,BOOK,DVD WHERE INVENTORY.inventoryID = BOOK.inventoryID AND INVENTORY.inventoryID = DVD.inventoryID This doesn't display the titles of the items though. How can I add that? Thanks!