List the book code and book title of each book
Asked by wiki @ in Computers and Technology viewed by 118 People
1. Create a view named PenguinBooks. It consists of the book code, book title, book type, and book price for every book published by Penguin USA. Display the data in the view.
2. Create a view named Paperback. It consists of the book code, book title, publisher name, branch number, copy number, and price for every book copy that is available in paperback. Display the data in the view.
3. Create a view named BookAuthor. It consists of the book code, book title, book type, author number, first name, last name, and sequence number for each book. Display the data in the view.
4. Create the following indexes. If it is necessary to name the index in your DBMS, use the indicated name.
a. Create an index named BookIndex1 on the PublisherName field in the Publisher table.
b. Create an index named BookIndex2 on the Type field in the Book table.
c. Create an index named BookIndex3 on the BookCode and Type fields in the Book table and list the book codes in descending order.
5. Drop the BookIndex3 index.
6. Specify the integrity constraint that the price of any book must be less than $90.
7. Ensure that the following are foreign keys (that is, specify referential integrity) within the Henry Books database.
a. PublisherCode is a foreign key in the Book table.
b. BranchNum is a foreign key in the Inventory table.
c. AuthorNum is a foreign key in the Wrote table.
8. Add to the Book table a new character field named Classic that is one character in length.
9. Change the Classic field in the Book table to Y for the book titled The Grapes of Wrath.
10. Change the length of the Title field in the Book table to 60.
11. What command would you use to delete the Books table from the Henry Books database? (Do not delete the Book table.)
12. Write a stored procedure that will change the price of a book with a given book code and quality. How would you use this stored procedure to change the price of any copy of book 1351 whose quality is excellent to $22.95?