Description of this paper

Loading

The publisher with code LB has decreased the price of its fiction-(Answered)

Description

Step-by-step Instant Solution


Question

The publisher with code LB has decreased the price of its fiction books by four percent. Update the prices in the FICTION table accordingly.



Assignment 3 ? Chapter 6

 

Instructions: Add your SQL statement and results (using screen captures) to each question. Do NOT

 

remove any existing content or images from this file.

 


 

1.

 


 

Create a FICTION table with structure shown in Figure 6-29.

 


 

FIGURE 6-29:

 


 

FICTION table layout

 


 

Hint: The FICTION table is similar to the BOOK table that is part of the Henry

 

Books database. The SQL statement used to create the BOOK table is shown

 

below. Model your ?CREATE TABLE FICTION? SQL command after it.

 

Differences between the BOOK and FICTION tables are:

 

The PUBLISHER_CODE attribute for the FICTION table is CHAR(3)

 

There is no TYPE attribute and there is no PAPERBACK attribute in the

 

FICTION table.

 


 

Put your SQL command and results here:

 


 

2.

 

Insert into the FICTION table the book code, book title, publisher code,

 

and price from the BOOK table for only those books having type FIC.

 


 

Put your SQL command and results here:

 


 

3.

 

The publisher with code LB has decreased the price of its fiction books

 

by four percent. Update the prices in the FICTION table accordingly.

 


 

Put your SQL command and results here:

 


 

4.

 

Insert a new book into the FICTION table. The book code is 9946, the

 

title is Cannery Row, the publisher is PE, and the price is 11.95.

 


 

Put your SQL command and results here:

 


 

5.

 


 

Delete the book in the FICTION table having the book code 9883.

 


 

Put your SQL command and results here:

 


 

6.

 

The price of the book entitled To Kill a Mockingbird has been increased

 

to an unknown amount. Change the value in the FICTION table to reflect this

 

change.

 


 

Put your SQL command and results here:

 


 

7.

 

Add to the FICTION table a new character column named BEST_SELLER

 

that is one character in length. Then set the default value for all columns to

 

N.

 


 

Put your SQL command and results here:

 


 

8.

 

Change the BEST_SELLER column in the FICTION table to Y for the book

 

entitled Song of Solomon.

 


 

Put your SQL command and results here:

 


 

9.

 

Change the length of the TITLE column in the FICTION table to 50

 

characters.

 


 

Put your SQL command and results here:

 


 

10.

 


 

Change the BEST_SELLER column in the FICTION table to reject nulls.

 


 

Put your SQL command and results here:

 


 

11.

 


 

Delete the FICTION table from the database.

 


 

Put your SQL command and results here:

 


 

 

Paper#9256297 | Written in 27-Jul-2016

Price : $16
SiteLock