Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Individual Task Examine the following relation which are part of a database for a company selling horse accessories. The products sold by the company are

Individual Task

Examine the following relation which are part of a database for a company selling horse accessories. The products sold by the company are stored in Warehouses.

Product

Product No

(PK)

Description

Price

Warehouse No

P001

Riding Hat

50

W010

P002

Jodhpurs

20

W020

P003

Back Support

60

W015

P004

Riding Boots

100

W010

P005

Jacket

150

W025

The code to create the above table is given in the Product.sql file. Download the file and execute it.

You will be marked on the following GOALs:

These GOALs are all individual and worth 1 mark.

Answer the following:

I3.1. Explain what SQL is used for.

I3.2. Discuss, using examples, the difference between DDL and DML.

I3.3. Explain the syntax and purpose of the select command.

I3.4. Connect to MySQL Workbench and set up a new connection.

I3.5. Explain how to execute a sql file to create the table given above.

Use the product table to answer the following:

I3.6. Write a SQL query to List all product details.

I3.7. Write a SQL query to List the product number, description and price of each product.

I3.8. If the following SQL command was run, how would the resultant table differ from the answer for I3.7 above:

Select product_No, price, description from Product;

I3.9. Write a SQL query to List distinct product descriptions.

I3.10. Explain the resultant table, if the following SQL command was run:

Select distinct description, price from Product;

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

Beginning Databases With PostgreSQL From Novice To Professional

Authors: Richard Stones, Neil Matthew

2nd Edition

1590594789, 978-1590594780

More Books

Students also viewed these Databases questions

Question

Presentation Aids Practicing Your Speech?

Answered: 1 week ago