Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create the Henry Books Database and write queries to produce the following reports. Turn in SQL commands and related output for each query. These reports

Create the Henry Books Database and write queries to produce the following reports. Turn in SQL commands and related output for each query. These reports refer to the Henry Books database.

1. List the book code and title of every book whose type is FIC, MYS or ART in alphabetical order by title.

2. List the last name and first name of every author. Order the output by last name.

3. Calculate the average price of only paperback books.

4. Find the book code and title for every book whose price is over $5 or that was published in New York city.

5. Find the book code and title for every book whose price is over $5 but that was not published in New York city.

6. Change the book price of all books in the FICTION table by 12%. Do not execute a rollback.

7. Add to the FICTION table a new character column that is one character in length named BEST_SELLER. The default name for each column is N.

8. Define a view named HARDBACK. It consists of the book code, book title, publisher name and book price for every book is not available in paperback.

a. Write the view definition for HARDBACK.

b. Write a query to retrieve the book title and publisher name for every book in the HARDBACK view that is priced over $20.

c. Write the query that the DBMS actually executes.

d. Are there any problems created by updating the database through this view? If so, what are they? If not, why not?

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

Database Concepts

Authors: David Kroenke, David J. Auer

3rd Edition

0131986252, 978-0131986251

More Books

Students also viewed these Databases questions

Question

What is Change Control and how does it operate?

Answered: 1 week ago

Question

How do Data Requirements relate to Functional Requirements?

Answered: 1 week ago