Currently, the contents of the Category column in the BOOKS table are the actual name for each
Question:
category. This structure presents a problem if one user enters COMPUTER for the Computer
category and another user enters COMPUTERS. To avoid this and other problems that might
occur, the database designers have decided to create a CATEGORY table containing a code and
description for each category. The structure for the CATEGORY table should be as follows:
The data for the CATEGORY table is as follows:
Required:
¢ Create the CATEGORY table and populate it with the given data. Save the changes permanently.
¢ Add a column to the BOOKS table called Catcode.
¢ Add a FOREIGN KEY constraint that requires all category codes entered in the BOOKS table to already exist in the CATEGORY table. Set the Catcode values for the existing rows in the BOOKS table, based on each books current Category value.
¢ Verify that the correct categories have been assigned in the BOOKS table, and save the changes permanently.
¢ Delete the Category column from the BOOKS table.
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Related Book For
Question Posted: