Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Assume the following relations: Customer (* Cust ID, LName, FName, Address, CardType, CreditCardNo, Expiration Date, Security Code) Cust_ID LName FName Address Card Type Credit Card
Assume the following relations: Customer (* Cust ID, LName, FName, Address, CardType, CreditCardNo, Expiration Date, Security Code) Cust_ID LName FName Address Card Type Credit Card No Expiration Date 1000 1001 1002 1003 Thomas Trump Smith Flint Abayomi Alejandro Susan Stone Address 1 1 Address 3 Address 4 Address 2 DSIC AMEX VISA AMEX 6000 7465 9985 8334 7382 8324 9937 8438 7488 4738 2323 4323 Jan, 2019 Nov, 2020 July, 2021 April, 2022 Security Code 873 210 347 773 Product(*Prod ID, Prod_Name, Current_Price) Prod_ID PRD_75 PRD 12 PRD_14 PRD_09 Prod Name Hair Gel Shampoo Notebook Olive Oil Current Price 7.25 4.99 52.95 11.49 Purchases (*Date, * Cust ID, *Prod ID, Price) Date Cust_ID 7/11/2010 1003 2/19/2015 1003 4/04/2004 1001 5/09/2016 1003 3/05/2015 1001 Prod_ID PRD_09 PRD_09 PRD_12 PRD_09 PRD_75 Price 8.99 9.45 2.99 10.99 7.45 Using only the relational algebra operators (Select, Project, Cartesian Product, Union, Intersect) answer the following queries. Query 4) Write a relational algebra query that shows which products have a current price that is lower than their previous purchase price. WRITE THE RELATIONAL ALGEBRA STATEMENT: Query 5) Write a relational algebra query that shows the product-id, name, and price of those products that have never been purchased by anyone. Can this be done without the "difference" operator? (note that this operator is not included in the set of operators you can use. See page 1.) WRITE THE RELATIONAL ALGEBRA STATEMENT
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started