Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

QUESTION 4 Consider the following relational schema for an Online book store database: Product ( BookID , Bookname UnitPrice, Author ID ) Customer order (

QUESTION 4
Consider the following relational schema for an Online book store database:
Product (BookID, Bookname UnitPrice, Author ID)
Customer order(Order ID.CustomerID Quantity Ordered,Order Date)
Author(Author-II Auther name, Author description)
The primary keys are underlined.
Write SQL queries to answer the following:
(a) Create Customer, Customer and Order tables from the relational schema described above. Select appropriate data types for each attribute. Remember to set the primary and foreign keys.
(b) List the Customers Orders if the book quantity is more than 5 copies.
(c) List the book ID and Book name for all books and sort the books by the Author's name alphabetically.
(c) Write the statement to update the unit prices of all books by 50 cent.
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_2

Step: 3

blur-text-image_3

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

More Books

Students also viewed these Databases questions