Question: 18.5 Write SQL queries for the books database (discussed in Section 18.3) that perform each of the following tasks: Select all authors from the Authors

18.5Write SQL queries for the books database (discussed in Section 18.3) that perform each of the following tasks:

Select all authors from theAuthorstable with the columns in the orderlastName,firstName, andauthorID.

Select a specific author and list all books for that author. Include thetitle,year, andISBNnumber. Order the information alphabetically bytitle.

Add a new author to theAuthorstable

Add a new title for an author (remember that the book must have an entry in theAuthorISBNtable).

18.6Fill in the blanks in each of the following statements:

The _____ states that every column in a primary key must have a value, and the value of the primary key must be unique.

The ____ states that every foreign-key value must appear as another table's primary-key value.

A(n) _____ in a pattern indicates that a string matching the pattern can have zero or more characters at the percent character's location in the pattern.

Java DB is the Oracle branded version of _____.

A(n) _____ in a LIKE pattern string indicates a single character at that position in the pattern.

There's a(n) _____ relationship between a primary key and its corresponding foreign key.

SQL uses ____ as the delimiter for strings.

18.7Correct each of the following SQL statements that refer to thebooksdatabase.

SELECT firstName FROM author WHERE authorID = 3

SELECT isbn, title FROM Titles ORDER WITH title DESC

INSERT INTO Authors ( authorID, firstName, lastName ) VALUES ( "2", "Jane", "Doe" )

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!