Question: Postgresql 1. This is still to be done in Postgres, using your name-based schema. 2. The topic this time is to support comparison shopping, seeing
Postgresql
1. This is still to be done in Postgres, using your name-based schema.
2. The topic this time is to support comparison shopping, seeing which store or website offers the same product(s) for the lowest price
----2.1. You have a lot more freedom in your design this time
--------a). You can choose the tables and attributes you want
--------b). You can choose the specific data to represent
--------c). Do be more careful about collaboration, as this is an individual assignment. The details of the first homework meant everyones submission would look nearly identical, but this one should not. Merely changing the topic of your database and some names and type details like lengths of strings would not be a meaningful difference.
----2.2 Products should be identifiable by manufacturer name and model
----2.3. You may also want to shop for a type of product. The idea here is that if you need, say a battery, you might just want one that works rather than one made by a specific company
3. Again, define the database using a series of .sql files to create the database design, insert data, and query the database
----3.1. I will still be executing the scripts, so make sure they run as is once connected to a database.
----3.2. Keep statements separated by semi-colons to make sure the whole file runs as is. If you are copying-and-pasting statements from one place to another, this is especially something to be careful about.
4. Here are the queries to support in query.sql:
----4.1. List the names of all stores that offer a specific product, as defined by manufacturer and model
4.2. List the store that offers a specific product for the lowest price (include the price in the result). If there is a tie here, list all options
4.3. List your options for a type of product, as defined above. Include the store, manufacturer, model, and price
4.4. Create a temporary table for a shopping list which has one attribute, the product type, with one row for each type of product you want to buy. Now find all stores that offer all of these products.
-----4.4.1. The motivation is to be able to do one-stop shopping
-----4.4.2. This is an example of a relational division operation.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
