Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Define a view named Pocket. This view should contain the book code, book title, book type, and book price for every book published by

image text in transcribed

1. Define a view named Pocket. This view should contain the book code, book title, book type, and book price for every book published by Pocket Books (code = PB) you should have 11 ecords. Using the Pocket view, write a query to retrieve the book code, book title, and book price for books with a price under $10.00 you should have 8 records.

2. Define a view named Paperback. This view should contain the book code, book title, publisher name, and book price for every book that is available in paperback you should have 24 records. Using the Paperback view, write a query to retrieve the book title and publisher name for every book that is priced higher than $10.00. The book titles should be all uppercase. You should have 8 records. After the view is defined, define a new view named OnHand. This view should consist of branch number and a total number of all books on hand (in stock) for each branch. Use a column alias. 6. Using the OnHand view, write a query to display all the records.

3. Write and execute the statement to create a stored procedure named spBookType. This procedure should give a list of all the different Book Types in the Book table. Each book_type should be listed only once. Execute the spBookType stored procedure.

4. Write and execute the statement to create a stored procedure named spPublisher that will give a listing of Publishers (Name and City) listed in a specified state. The specific state will be provided in the call statement (hint: use a variable). Use appropriate column labels. Execute the spPublisher procedure using the state value of NY. You should have 10 rows. You can try it again using the state MA for a return of 2 rows. Trying it a third time with the state NE should return an empty set, as there are no matching records.

BRANCH INVENTORY BOOK WROTE PUBLISHER Author Number Author 1515 First Author Last Insert the following record to the AUTHOR table: Your first name Your last name insert into author (author_number, author first, author_last) values ('1515','YourFirst', Yourlast')

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_2

Step: 3

blur-text-image_3

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

Database Reliability Engineering Designing And Operating Resilient Database Systems

Authors: Laine Campbell, Charity Majors

1st Edition

978-1491925942

More Books

Students also viewed these Databases questions

Question

2. How were various roles filled?

Answered: 1 week ago