[SOLVED] CS 432: Databases   Assignment 2: Advanced SQL and Formal Relational Query Languages

35.00 $

Programming resource
Digital learning resource
Category:
✓ Practical programming resource
✓ Suitable for guided study and reference
✓ Tutor guidance available when needed

Description

5/5 - (1 vote)

Question 1 carries 20 marks with each query given equal weightage (1 mark). Question 2 carries 5 marks with each query given equal weightage (1 mark). No​ partial marks for any questions.

 

  1. Implement the backend connectors (some references: [1​ ],​ ​[2 ])​ for the E-Commerce database created in Assignmen​ t 1.​ Ensure that inpu​ t sanitization (reference: [3​ ])​ checks are performed before the query is executed on the database. Submit a method definition for Questions 1-20​ of the SQL queries implemented in Assignment 1.​
  2. Write the tuple relational calculus and the domain relational calculus queries for the following:
    1. List all electronics products in the price range 10k-20k.
    2. Find email addresses of all the users who reside in the city ‘Mumbai’ and have made a total purchase greater than or equal to Rs. 5000 in the past.
    3. List all books published after 2001.
    4. List all products that were added to the database after 27/07/2019.
    5. List all retailer ids whose products, userid = 55 has purchased.
Resource details

Understand the Task Before You Use the Resource

Review the requirements, identify the programming concepts involved, study the implementation and test your understanding with your own examples and modifications.