Skip to content
Interview rounds

Databases & caching · Trade-off defence

A relational database or a wide-column store?

How do you choose between a relational database and a wide-column store for a new workload?

BackendSenior12 min
Interview-style scenarioLast reviewed: Checked against official documentation

Trade-off defence · storage for the device-readings serviceIllustrative scenario, not a real incident

A new store is needed for device readings, and the team is split on what kind

Two million devices will each send one reading every ten seconds, day and night. A reading is written once and never changed. Readings arrive through a durable queue, so a slow store shows up as a backlog.

The product reads them in one way: the readings of one device over a time range, newest first. Device and customer records stay in the existing PostgreSQL database, which the team knows well.

What the dashboards and logs show

Write rate
200,000 readings a second, steady
Read pattern
one device, a time range, newest first; about 2,000 a second
Retention
90 days, then deleted
Transactions
none across devices; a reading is never updated

Take a side · neither is wrong, and your defence is what is scored

Before you decide, argue one side. Which will you defend?

Your rubric score, the model answer, the follow-up questions and the related lessons appear once you have answered the last step.