Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

We want to make sure that the title's first letter is capitalized. a . The upper function takes one parameter, the string that you want

We want to make sure that the title's first letter is capitalized.
a. The upper function takes one parameter, the string that you
want to convert to upper case, and it returns the upper case
version of that string.
b. The SQL substring function takes three arguments: the string that
you want to retrieve a part of, the location of the first character
(starting at 1) and the number of characters to extract.
c. If the first character = the UPPER of that first character, then the
string in question starts with an upper-case letter.
The printing press was invented in 1436. Make sure that no book is ever
published before that year.
Use Vertabelo to generate the SQL for your model and run it in DataGrip
to create the three tables corresponding to the three classes modeled
above.
a. Be sure to follow all applicable naming standards.
b. Make sure that your default schema is the one named after your
CSULB ID. This is the same schema that you are using for your
SQLAlchemy homework assignment. You will not be able to
create these tables in the "Classic Models" schema since that one
is read only.
Write the insert statements and run them to capture the following books.
In each case, make sure that you have inserted the proper genre into the
genres table, and the proper publisher into the publishers table before
inserting into the books table.
a. Be careful to include the column names in your insert
statements. Without the column names, your insert statements
are error-prone (it's possible to accidentally put the phone
number where the address ought to go, for instance) and hard to
maintain.
b. The Great Gatsby was published in 1925 with an ISBN of
9780333791035 by Charles Scribner's Sons located at 153-157
Fifth Avenue, New York City. Genre was 'Tragedy'.
i. Note that when you input a text string with an embedded
single quote, you need to put in two single quotes. For
instance, the string "that's mine" would need to be
written 'that's mine' in order to get that embedded
quote mark in.
c. The Sun Also Rises was first published in 1926 by Charles
Scribner's Sons with an ISBN of 9781435172371. Genre was
'Adventure'.
d. Stephen Hero was published in 1944 by New Directions
Publishing Corporation located at 808th Ave, New York, NY. The
ISBN is 0-8112-0074-4. The genre is 'Autobiography'. e. Create a row for Morgan Freeman Publishing at 387 Delta
Avenue, Clarksdale, MS 38614.
Write delete statements and run them:
a. Delete the Morgan Freeman publisher.
b. Delete the Charles Scribner's Sons publisher.
c. Delete the book, Stephen Hero.
d. Delete the New Directions Publishing Corporation.
e. One of these should give you an error. Do not try to fix it. Simply
report the result.
Come up with your own insert statements to demonstrate that the check
constraints that you wrote actually work and run those insert statement
to demonstrate the check constraints.
When you run the above statements, copy/paste your statement and the
console output to a file for uploading.
image text in transcribed

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

Students also viewed these Databases questions

Question

List noteworthy changes that were implemented in DSM-5.

Answered: 1 week ago

Question

The importance of self-awareness for professional life

Answered: 1 week ago