Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

1|Page

Case Study 1 – E-Commerce Platform

An e-commerce platform stores data about products, categories, and customer orders in a
NoSQL database. Students need to retrieve a list of products with their corresponding category
names for a given customer's order history.

Strategy: Use denormalization by embedding category information within the product


documents or maintain a separate mapping table linking products to categories.

For the case study above, discuss these questions and propose a solution:

1. Product Retrieval:

- How would you retrieve a list of all products along with their prices and categories? [linking]

2. Order History:

- Given a customer's ID, can you retrieve their order history, including product details, order
dates, and total spending? [map reduce]

3. Category-Based Search:

- Suppose a user wants to see all products within a specific category. How would you design a
query to fetch this information efficiently? [denormalize]

4. Out-of-Stock Products:

- How would you identify and list all products that are currently out of stock or have a low
stock level? [map reduce]

5. Customer Recommendations:

- Can you create a query that suggests products to a customer based on their previous orders
or browsing history? [graph database]

6. Pricing Analysis:

- What query would you use to calculate the average price of products in each category?
[linking/embedding]

7. Data Maintenance:

- As new products and orders are added, what strategies would you employ to keep the
database's performance optimal? [embedding]
2|Page

Database 1: Product Data

Database 2: Order Data

You might also like