Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write queries using operations of relational algebra for the questions listed below. Make sure to combine operators together to create more advanced queries to retrieve

Write queries using operations of relational algebra for the questions listed below. Make sure to combine operators together to create more advanced queries to retrieve data. Please clearly mark your answers for each problem.
You may copy and paste the following relational algebra operators in your solution:
\sigma ,\pi ,\rho , x,,,,,\cap ,\cup ,-,-:,
Use the Subscript option available in the menu when needed.
Given database:
CUSTOMER (CUST_ID (PK), CUST_LAST, CUST_FIRST, CUST_PHONE, CUST_EMAIL, CUST_ADDRESS, CUST_CITY, CUST_ZIP, CUST_STATE)
ORDERS (ORDER_NUMBER (PK), CUST_ID (FK), PROD_ID (FK), ORDER_DATE, ORDER_TOTAL)
PRODUCT (PROD_ID (PK), PROD_DESCRIPTION, PROD_CATEGORY, PROD_PRICE)
1. Retrieve City and Email for the customer whose name is John Smith.
2. Retrieve Name and Address of all customers who live in Florida.
3. Retrieve Product Description and Price for the products in the Computer category that cost more than $100.
4. Retrieve Product Description and Price for the products in either the Computer or Game category.
5. Retrieve Name and Address of the customers who placed orders on 01-01-2016. Note: the CUSTOMER and ORDERS tables are linked through the CUST_ID column.
6. Retrieve Product Description and Price for the products that were purchased on 01-01-2016. Note: PRODUCT and ORDERS tables are linked through the PROD_ID column.
7. Retrieve Name and Address of all customers who live in Florida, who purchased product TV.
8,9,10. Write three more complex queries to retrieve data from these tables. Queries must include multiple conditions and incorporate at least one join, one rename, and one aggregate function operations. All queries must be different. Provide a clear explanation of what each query is intended to do.

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

Pro PowerShell For Database Developers

Authors: Bryan P Cafferky

1st Edition

1484205413, 9781484205419

More Books

Students also viewed these Databases questions

Question

Did you add the logo at correct size and proportion?

Answered: 1 week ago