List advantages and disadvantages of NosSQL and RDBMS.
Difficulty: 5/10
data modeling, consistency, scalability
Scenario Questions
0-2 years experience
1You need to store user profiles that have optional fields like social links and preferences. How would you decide whether to keep them in a MongoDB collection or a relational table?
2If you insert a document missing a required field into a MongoDB collection with schema validation, what happens and how does that compare to a NOT NULL constraint in MySQL?
3Your small e‑commerce app currently uses MySQL, but you want to add a flexible product catalog. What steps would you take to introduce a MongoDB collection, and what immediate trade‑offs should you watch for?
2-5 years experience
1Your team added a MongoDB cache in front of a PostgreSQL service to speed up reads, but you’re seeing occasional stale data. Why does this inconsistency occur and how would you mitigate it?
2A new microservice writes order events to both MongoDB and a relational DB. After deployment you notice duplicate orders in the relational DB. What could cause this and how would you debug it?
3You need to implement a search that filters products by dynamic attributes. Explain why you might choose MongoDB's flexible schema over a normalized relational schema, and what performance concerns you’d keep in mind.
5-8 years experience
1Design a storage strategy for a high‑traffic IoT platform ingesting millions of sensor readings per minute. Compare MongoDB sharding to traditional RDBMS partitioning in terms of write throughput, query latency, and consistency guarantees.
2Your company is migrating a legacy billing system from Oracle to MongoDB. Identify three major risks related to ACID guarantees and referential integrity, and propose mitigation patterns.
3Explain how you would handle a multi‑region deployment where some services need strong consistency (e.g., financial transactions) while others can tolerate eventual consistency (e.g., activity logs). How does the choice between NoSQL and RDBMS affect that design?
8+ years experience
1At a large e‑commerce platform you’re evaluating replacing the product‑catalog RDBMS with MongoDB. Outline the long‑term architectural impacts on data governance, schema evolution, and cross‑team data contracts.
2Your organization wants a unified analytics pipeline pulling data from both MongoDB and a relational warehouse. Discuss the trade‑offs of a polyglot‑persistence approach versus consolidating into a single store, considering operational overhead and future scalability.
3A legacy monolith stores user sessions in a relational DB with row‑level locks, causing contention under load. Propose a migration plan to a NoSQL store, detailing how you’d ensure data integrity during cut‑over and what monitoring you’d put in place.
Follow-up Questions
Can you walk me through a concrete case where MongoDB's lack of joins caused a problem?
How would you monitor and detect data drift when you have data duplicated across MongoDB and a relational store?
If the read‑write ratio of your workload flipped, would your choice of storage change?
Sharethis question
Share via WhatsApp, X, Facebook, LinkedIn or copy link. Open Graph preview enabled.