Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Can someone help me create the database on SQL based on the images above? You are encouraged to use the views to simplify the queries

Can someone help me create the database on SQL based on the images above?

image text in transcribed

image text in transcribed

You are encouraged to use the views to simplify the queries which follow You can use a view in a SELECT statement in exactly the same way as you can use a table, often avoiding the need to write the same joins and calculations over and over. When writing a view, it is easiest to write the SELECT statement first, and only add the CREATE VIEW statement to the beginning once you have confirmed that the SELECT statement is working correctly. If you wish to create additional views to use in the queries which follow, include them in this file.

Product View Create a view which shows the following details of all products: - The Product Name - Type name - Price (example partial output of the Product View - your data may vary, example illustrates structure only) Favourite Drinks View Create a view which shows the Product ID number, Product Name and Customer email, of all drinks that are in a customer's favourite order. (example partial output of the Favourite Drinks View - your data may vary, example illustrates structure only) Order View Create a view which shows the following details of all deliveries and ordered products. - The Order Id - The Driver Name - The Delivery Date - The Vehicle Make/Model - The ordered product ID number, product name and quantity. - The delivery address. - Any discount percentages (If the order took place during a special event). - The cost of the products (Take into account quantity and discounts)

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

Database Management An Organizational Perspective

Authors: Richard T. Watson

1st Edition

0471305340, 978-0471305347

Students also viewed these Databases questions

Question

Evaluating Group Performance?

Answered: 1 week ago