intermediateNoSQL Fundamentals — CAP, BASE & Eventual Consistency
You're designing a global e-commerce platform. The product catalog needs flexible schemas (different attributes per product type). Orders must be ACID-compliant. The recommendation engine needs to query relationships between users and products. What databases do you choose?
Polyglot persistence solution: 1) Product Catalog → MongoDB: flexible BSON documents handle varying product attributes (laptop: {ram, cpu, storage}; shirt: {size, color, material}). Schema-less accommodates new product categories without migration. 2) Orders → PostgreSQL: ACID transactions are non-negotiable for payments. ORDER and PAYMENT must be atomic. 3) Recommendations → Neo4j: user→purchased
Ready to master this question?
Generate a complete walkthrough — background, the full answer in plain language, a working code example explained line by line, a real-world scenario, common mistakes, and how this same question gets asked in different ways.
Sign in to generate a response