Practice Assignment Writing SQL Queries Bookorama Db

Practice Assignment Writing SQL Queries Bookorama Db

<p>Practice assignment – Writing SQL queries – Bookorama db</p><p>For each of the following, write the query that will accomplish the assigned task. Items listed as DDL are schemaupdates and DDM are data manipulation. Use the Chapter 6 material as reference. The following website will also give you some reference for the MySQL specific syntax. http://dev.mysql.com/doc/refman/5.1/en/tutorial.html.</p><p>Save your query in a text document and put on the drop box for review on Thursday. When you build your query, some will be single statement queries and some will require more than one query statement.</p><p>DDM Queries – Basic</p><p>1. Write a query that will insert a new row into the Customer table. (Make yourself a customer). 2. Write a query that will display a list of all Books that cost less than $30.00. 3. Write a query that will display a list of all Books that have a Review. 4. Write a query that will display a list of all Books and for those that have a review, list the review. 5. Write a query to insert a new Order. (Orders consist of an Order row and one or more Order_Items.) Choose an existing customer and book. 6. Write a query to display all Books in ascending order by price. 7. Write a query to display all of the information about an order. This will include the customer, books, price, etc. Do not include any of the key fields in your display.</p><p>DDL Queries</p><p>1. Write a query that will insert a new table, onlineCustomer. This table is a subtype of the customer table and will contain the e-mail address (text 50), a shipping address, and last update date. You should set the customerId as the primary key and should have an index built on the e-mail address. E-mail id may not be null, but the shipping address may be. It should have a constraint that requires a row in the customer table for every row in the onlineCustomer table. 2. Write a query that will put two new customers in the Customer table and also into the onlineCustomer table.</p><p>DDM Queries – More Advanced 1. Write a query that will return the highest price of all of the Books. 2. Write a query that returns the sum of the prices of all of the Books.</p>

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    1 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us