LLD - Design — Food Delivery SystemWhich data model is most suitable to store a user's rating and textual review for a product?AA list of product names onlyBA boolean flag indicating if a product is reviewedCA single integer representing total reviewsDA record with fields: user_id, product_id, rating, review_text, timestampCheck Answer
Step-by-Step SolutionSolution:Step 1: Determine required data for each reviewEach review needs user ID, product ID, rating value, review text, and time.Step 2: Match data model to these fieldsA record with these fields stores all needed info clearly.Final Answer:A record with fields: user_id, product_id, rating, review_text, timestamp -> Option DQuick Check:Review data model = Detailed record [OK]Quick Trick: Store all review details in one structured record [OK]Common Mistakes:MISTAKESUsing only product names without review dataStoring just total counts loses detailsUsing boolean flags cannot hold review text
Master "Design — Food Delivery System" in LLD9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepArchTryChallengeDesignRecallScale
More LLD Quizzes Advanced LLD Concepts - Domain-Driven Design basics - Quiz 2easy Advanced LLD Concepts - Dependency injection framework - Quiz 14medium Design — Chess Game - Special moves (castling, en passant) - Quiz 4medium Design — Food Delivery System - Order tracking state machine - Quiz 15hard Design — Food Delivery System - Restaurant, Menu, Order classes - Quiz 10hard Design — Online Shopping Cart - Pricing strategy (discounts, coupons) - Quiz 8hard Design — Online Shopping Cart - Payment strategy pattern - Quiz 12easy Design — Online Shopping Cart - Pricing strategy (discounts, coupons) - Quiz 14medium Design — Splitwise (Expense Sharing) - Balance calculation algorithm - Quiz 7medium Design — Splitwise (Expense Sharing) - Split strategies (equal, exact, percentage) - Quiz 9hard