MongoDB e-Commerce Database Querying
In Chapter 7 we developed a MongoDB database model for an e-commerce application. Now we’ll write the necessary queries for using the database and see how to perform common tasks for an e-commerce platform, including:
- Display categories of products.
- Display promotional products.
- Display products from a category (with pagination).
- Search for a product by name (or by the words in the name).
- Find a customer (for login, editing the profile, saving orders, and so on).
- Save an order for synchronizing the shopping cart with the database.
- Check the inventory for a certain product and quantity.
- Restore the ...