Consider a MongoDB database managing e-commerce product data. The database has a collection named products with documents containing the fields product_id, category, price, and reviews. Each reviews field is an array of subdocuments with fields user_id, rating, and comment. You are tasked with optimizing a query that retrieves all products within a specific category that have an average rating higher than 4. The query is frequently used, and performance is critical. Which indexing strategy would best optimize this query?
You are designing a MongoDB schema for an e-commerce platform. The platform has three main collections: Products, Orders, and Users.Products Collection: Contains information about each product, such as its name, price, and description.Orders Collection: Contains details about each order, including the userId (referencing the Users collection), an array of productIds (referencing the Products collection), and the total order amount.Users Collection: Contains user details, such as name, email, and address.Which of the following data modeling approaches represents an anti-pattern in MongoDB?