Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This is to be written in SQL for MS Access. Questions) 1, 2, 3, 4, 5, 6, 8, 9, 10, 11, 12 I keep getting

This is to be written in SQL for MS Access.

Questions) 1, 2, 3, 4, 5, 6, 8, 9, 10, 11, 12

I keep getting syntax errors and I cannot figure out why.

image text in transcribed

1. Create a view named PenguinBooks. It consists of the book code, book title, book type, and book price for to take 2. Create a view named Paperback. It consists of the book code, book tile, publisher name, branch number 3. Create a view named BookAuthor. It consists of the book code, book title, book type, 4. Create the following indexes. If it is necessary to name the index in your DBMS, use the indicate very book published by Penguin USA. Display the data in the view number, and price for every book copy that is available in paperback. Display the data in the view last name, and sequence number for each book. Display the data in the view a. Create an index named Booklndex1 on the PublisherName field in the Publisher table author number, first name Create an index named Booklndex2 on the Type field in the Book table Create an index named Booklndex3 on the BookCod codes in descending order b. e and Type fields in the Book table and list the book 5. Drop the Booklndex3 index. 6. Specify the integrity constraint that the price of any book must be less than $90 Ensure that the following are foreign keys (that is, specify referential integrity) within the Henry Books database 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 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 no Book table.) Writ you use this stored procedure to change the price of any copy of book 1351 whose quali $22.95? How would stored procedure that will change the price of a book with a given book code and quality ty is excellent t 13. Assume the Branch table contains a column called TotalValue that rep resents the total price for all books at that branch. Following the style shown in the text, write the code for the following triggers When inserting a row in the Copy table, add the price to the total value for the appropriate branch. When updating a row in the Copy table, add the difference between the new price and the old price to t total value for the appropriate branch When deleting a row from the Copy table, subtract the price on the recor for the appropriate branch he b. being deleted from the total value 14. If you are using Access 2010, complete the following steps Add the TotalValue field to the Branch table. Create and run a query on the Copy table to determine the appropriate values for this field, and then update the Branch table with these values Create a data macro associated with Step 13a. Test the data macro by adding a record to the Copy table and ensuring that the corresponding branch's total value is updated correctly b. the After Insert event for the Copy table to implement the trigger in

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Database Foundations Technology Fundamentals For IT Success

Authors: Bob Bryla

1st Edition

0782143725, 9780782143720

More Books

Students also viewed these Databases questions

Question

Define centroid.

Answered: 1 week ago