Database Selection and Trade-offs Questions
Choosing the right database and data platform for a workload: relational versus NoSQL versus specialized stores, managed versus self-hosted, and matching technology to consistency, scale, cost, and query or access-pattern needs. Covers OLTP versus OLAP and transactional-versus-analytical workload splits, polyglot persistence across multiple data stores, structuring an ambiguous selection prompt, naming trade-offs, and defending a recommendation to stakeholders.
Design a hybrid OLTP/OLAP (HTAP) schema to support fast transactional operations (order placement) and low-latency analytics (live dashboards) on the same system. Discuss schema choices (normalized vs denormalized), indexing, how to protect transactional latency under analytic load, consistency models, and whether to use a purpose-built HTAP DB (TiDB, SingleStore) or maintain separate systems with CDC.
Sample Answer
Direct answer
Normalize the transactional core (orders, order items, payments) for correctness, so a checkout can never drift into a partially-updated state, and add a deliberately denormalized, separately-maintained analytic layer, rollup tables or a columnar replica, for the live dashboard, rather than denormalizing the transactional schema itself to serve both. Protect transactional latency by structurally separating where the analytic query executes: a replica, a columnar engine, or an isolated resource pool inside an HTAP database, never the same buffer pool and lock manager checkout writes to.
Structured elaboration
Normalized vs denormalized
Order placement needs a normalized schema (orders one-to-many order_items, a foreign key to payments) so a single update can't leave line items and totals inconsistent. The live dashboard wants pre-aggregated, denormalized rollups (orders per minute by region, say) because recomputing that aggregation from the normalized tables on every refresh means repeatedly scanning the same tables checkout is writing to.
Indexing
The transactional side wants few, narrow, high-selectivity indexes (indexes on columns with enough distinct values that a lookup quickly narrows to a small number of rows, instead of scanning a large chunk of the table) tuned for point lookups and inserts, because every extra index is write amplification (each index has to be updated too, so one logical write turns into several physical writes) on every insert and update. Analytic queries want either a columnar representation, compressed and scanned by column, or purpose-built aggregate tables. That is a fundamentally different access pattern than a small set of B-tree indexes (a sorted tree structure most relational databases use by default, good at point lookups and range scans over rows) can serve well at both ends.
Protecting transactional latency
Resource isolation is the core requirement: (a) a physically separate replica so analytic scans never share a buffer pool (the in-memory cache of recently used data pages) or lock manager (the component that tracks which rows are locked by in-progress transactions) with checkout writes, (b) if using a genuinely HTAP engine, isolate at the engine level (TiDB pairs a transactional row store, TiKV, with a separate columnar replica, TiFlash, and routes analytic queries to TiFlash's nodes so they don't consume TiKV's transactional resources; SingleStore's unified storage still benefits from routing heavy scans to dedicated compute), and (c) query timeouts and resource governors so a runaway dashboard query gets killed rather than starving checkout.
Consistency models
Dashboard reads are usually fine as read-committed (each query only sees data that has already been committed, though two steps of the same query can still see slightly different snapshots, unlike a stricter isolation level), or even bounded-staleness against a replica (orders 5 to 30 seconds old is normal for a live dashboard). Order placement needs full ACID within the checkout transaction: an order and its payment record commit together or not at all. Naming this distinction explicitly in the design, which paths get which guarantee, prevents someone downstream from assuming the whole system is uniformly strongly consistent.
HTAP database vs separate systems with CDC
Choose a purpose-built HTAP database when the dashboard needs to reflect committed writes within single-digit seconds and you want to operate one system instead of two. Choose CDC (change data capture: streaming each committed row change out of the database as an event) into a separate analytic system when the team already runs a mature analytics stack, when tens of seconds to a couple of minutes of dashboard staleness is acceptable, or when the transactional engine is fixed by other constraints (an existing investment, a compliance requirement) and swapping it isn't realistic.
Worked example
-- Transactional core (normalized)
CREATE TABLE orders (
order_id BIGSERIAL PRIMARY KEY,
customer_id BIGINT NOT NULL,
region TEXT NOT NULL,
status TEXT NOT NULL,
placed_at TIMESTAMPTZ NOT NULL DEFAULT now()
);
CREATE TABLE order_items (
order_item_id BIGSERIAL PRIMARY KEY,
order_id BIGINT NOT NULL REFERENCES orders(order_id),
sku TEXT NOT NULL,
qty INT NOT NULL,
unit_price_cents BIGINT NOT NULL
);
CREATE INDEX idx_orders_customer ON orders(customer_id);
-- Analytic rollup, maintained out of band (CDC or a scheduled job), never read by checkout
CREATE TABLE orders_per_minute_by_region (
minute_bucket TIMESTAMPTZ NOT NULL,
region TEXT NOT NULL,
order_count BIGINT NOT NULL,
revenue_cents BIGINT NOT NULL,
PRIMARY KEY (minute_bucket, region)
);
The dashboard queries orders_per_minute_by_region, a handful of rows per screen refresh, instead of aggregating the full orders table, so its query cost stays roughly constant as orders grows, and checkout writes only ever touch orders and order_items, never contending with the dashboard's aggregation.
Trade-offs & pitfalls
Over-denormalizing the transactional side itself, embedding computed aggregates directly into orders, trades write-path correctness for read convenience and reintroduces the anomalies normalization exists to prevent. Under-isolating, letting the dashboard query the live orders table "just for now", is the single most common way this design degrades in production: a query that was fine at low volume becomes a lock-contention or cache-eviction problem once order volume climbs. On the HTAP side, only the specific tables the dashboard reads need dual row and columnar treatment; forcing every table in the schema onto the HTAP engine's more constrained feature set buys nothing.
Create a decision matrix to choose between PostgreSQL and a NoSQL store (Cassandra/DynamoDB) for a system requiring complex ad-hoc analytics and occasional huge write bursts. List criteria (consistency, query complexity, write bursts, cost, operational overhead) and propose a hybrid architecture if appropriate with benefits and trade-offs.
Sample Answer
Direct answer
Neither Postgres alone nor Cassandra/DynamoDB alone cleanly satisfies both requirements at once: complex ad-hoc analytics needs a flexible SQL query planner and joins, which Postgres has and Cassandra/DynamoDB don't; huge write bursts need a log-structured merge-tree-style write path that absorbs spikes without falling over, which Cassandra/DynamoDB have and a single Postgres instance struggles with. Recommend a hybrid: Cassandra or DynamoDB as the write-absorbing operational store for the bursty ingestion path, streamed via change-data-capture (CDC) into a warehouse for the ad-hoc analytics, rather than forcing one engine to do both jobs.
Structured elaboration
Decision matrix.
| Criterion | PostgreSQL (single instance) | Cassandra / DynamoDB |
|---|---|---|
| Query complexity (ad-hoc joins, filters, aggregations) | Strong: full SQL planner, joins, indexes on any column | Weak: no joins; queries must match the modeled partition/sort key or a maintained secondary index, and an ad-hoc question nobody modeled for requires a full scan |
| Write bursts | Weak at single-instance scale: a B-tree index (the sorted, tree-shaped index structure most relational databases use) has to jump to a different, scattered spot on disk for each row it updates, known as random I/O; that scattering is slower than writing to one continuous location, and sustained burst writes add lock contention and storage bloat on top of it, with only one write node to absorb the spike | Strong: an LSM-tree write path (Cassandra: log-structured merge-tree, a design that appends every write sequentially to one continuous location instead of jumping around the disk, then periodically merges those append files together in the background, a process called compaction) or automatic partitioning with elastic on-demand capacity (DynamoDB) is built to absorb high write rates by design |
| Consistency | Strong: full ACID transactions | Tunable per-request (Cassandra) or an eventual/strong per-read choice (DynamoDB), but no general-purpose cross-partition, multi-row ACID transaction |
| Cost | Predictable instance and storage cost, scaling by adding read replicas or a bigger instance | Cassandra: node-count cost, scales horizontally; DynamoDB: pay-per-request or capacity, scales automatically but cost rises directly with burst volume |
| Operational overhead | Lower for a single well-understood engine, until write bursts force sharding it manually | Cassandra: real ops burden (repair, compaction tuning); DynamoDB: near-zero ops, but the least query flexibility of the three |
Why the hybrid, not a single choice. Complex ad-hoc analytics and huge write bursts are, in effect, two different service-level expectations on the same data: the write path wants "accept everything fast, don't block," the analytics path wants "let me ask anything, take your time." Forcing one engine to do both means it is either throttling writes to protect query flexibility (Postgres under burst load) or throttling query flexibility to protect write throughput (Cassandra/DynamoDB's whole reason for existing). The hybrid keeps each engine doing only the job it is built for: writes land in Cassandra or DynamoDB, absorbing the burst, with no ad-hoc query capability needed there because nothing queries it directly for analytics; a CDC stream (a Cassandra connector reading the commit log, or DynamoDB Streams) continuously copies the data into a warehouse or an analytics-shaped Postgres replica; the ad-hoc analytics workload runs entirely against THAT copy, never touching the write-absorbing store.
flowchart LR
B[Burst writes] --> O[(Cassandra / DynamoDB: operational store)]
O -- CDC stream --> W[(Warehouse: ad-hoc SQL / BI)]
A[Analyst: ad-hoc query] --> W
Worked example
Framed generically, since no concrete rate is given in the question: a promotional event drives a short-lived spike, for example 50 times the baseline write rate, over a narrow window. The operational store's LSM-tree or auto-partitioned write path absorbs the spike without any schema or capacity redesign, while the SEPARATE analytics copy lags by however long the CDC pipeline's batch or stream latency is, typically minutes. That lag is an acceptable trade because ad-hoc analytics, unlike the live write path, was never claiming to reflect the last few seconds of data.
Trade-offs & pitfalls
The hybrid's real cost is keeping TWO schemas and a pipeline between them in sync as the data model evolves: a new field added to the operational store needs a corresponding change in the CDC mapping and the analytics schema, or it silently fails to show up in reports. Teams sometimes skip the CDC hop and instead run scheduled batch exports, a legitimate, simpler alternative when "minutes of staleness" tolerance can stretch to "hours," at lower pipeline-operational cost than a continuous stream.
You must choose between a NoSQL wide-column store (Cassandra) and a cloud key-value store (DynamoDB) for a shopping-cart service that stores per-user cart state with heavy reads and occasional writes. Compare design considerations: data modeling, consistency options, TTL/expiry patterns, hotspots, repair/compaction, and operational burden. Provide decision criteria for mid-sized vs enterprise deployments.
Sample Answer
Direct answer
Add a third, often-overlooked option to this comparison: PostgreSQL with read replicas, which is the right call for a mid-sized team below a real, statable throughput threshold, since it avoids adding a second datastore entirely. Above that threshold, DynamoDB is the right default for most teams, mid-sized or enterprise, because it is fully managed (no repair or compaction to operate) and has native, built-in item expiry (time-to-live, TTL) that maps directly onto an abandoned-cart use case. Reserve Cassandra for a team that already operates a Cassandra fleet at real scale, or that specifically needs active-active writes across many regions with fine-grained, per-operation consistency tuning, or that needs to avoid single-cloud lock-in.
Structured elaboration
Decision matrix.
| Criterion | PostgreSQL + read replicas | DynamoDB | Cassandra |
|---|---|---|---|
| Best fit team / ops maturity | Small to mid-sized, already relational | Any size, comfortable with managed NoSQL data modeling | Team already running Cassandra at scale, or with dedicated distributed-systems operations capability |
| Existing infrastructure fit | Reuses an existing relational stack | Clean fit if already on AWS | Fits a multi-cloud or on-premises strategy |
| Write pattern needs | Single-region, single-writer is fine | Single- or multi-region (Global Tables) | Best for genuine multi-region active-active writes |
| Read-QPS threshold | Comfortable up to a moderate, well-indexed load (see worked example) | Scales past what a single relational primary and replica set can comfortably absorb | Scales similarly to DynamoDB, with more manual tuning |
| Cost model | Fixed instance and replica cost | Pay-per-request (on-demand) or provisioned capacity | Fixed cluster infrastructure cost, self-managed or via a vendor |
| Operational burden | Low, standard managed relational operations | Low, fully managed | High: repair and compaction must be actively operated |
| Native TTL / expiry | None; needs a scheduled job | Native, per-item, background-swept | Native, per-column or per-row |
| Vendor lock-in | Low (standard SQL, portable) | Higher (AWS-specific API) | Low (open-source, multi-cloud) |
Data modeling. All three model a cart the same conceptual way: one record per user_id (or cart_id), holding the current set of line items. DynamoDB embeds the line items as a list or map attribute on the item; Cassandra holds them as a collection type or as clustering-column rows under the same partition key; PostgreSQL stores them either as a JSONB column on the cart row or as a normalized cart_items child table, the more natural relational choice if line items ever need to be queried or joined independently (for example, for inventory reconciliation).
Consistency options. DynamoDB defaults to eventually consistent reads, with strongly consistent reads available per request, a good match for "read your own cart" if the read immediately follows the write on the same request path. Cassandra exposes consistency as a tunable per query (from ONE, a single replica, up to QUORUM, a majority of the replicas, or ALL, every replica), giving fine control at the cost of a decision the team has to make deliberately and correctly for every query pattern. PostgreSQL is trivially consistent on the single writer; its read replicas are asynchronous, so a cart view routed to a stale replica immediately after a write can show outdated data, a real and easy-to-miss bug unless the write path is designed to read its own write from the primary.
TTL and expiry, a genuine differentiator. DynamoDB and Cassandra both sweep and remove expired items automatically, in the background, at no query-time cost, a strong fit for "clear out abandoned carts after N days." PostgreSQL has no native equivalent; expiry has to be implemented as a scheduled job (a cron-triggered DELETE ... WHERE last_updated < now() - interval), which is a small but real, ongoing piece of operational surface that does not exist on the other two.
Hotspots. A common misconception is that a shopping-cart service hotspots on popular items during a flash sale. It does not, in any of the three designs above, because the partition or primary key is user_id, not item_id; cart writes are naturally spread across users, not concentrated on whatever product is trending. A real hotspot risk would only appear from a different, poor key choice, for example partitioning by store_id for a platform with one dominant retailer, which none of these three designs do here.
Repair and compaction, Cassandra's real operational cost. Cassandra requires operator-scheduled anti-entropy repair (reconciling replicas that have drifted, commonly run via nodetool repair on a regular cadence, before deleted data's tombstone markers expire past gc_grace_seconds and could resurface) and ongoing compaction-strategy tuning (choosing and tuning between strategies like size-tiered and leveled compaction for the actual write and read pattern). Both are genuine, continuous SRE work that DynamoDB and managed PostgreSQL (for example, Amazon RDS) simply do not require, since that maintenance is the vendor's responsibility in both of those options.
Worked example
Size DynamoDB's cost at a stated cart volume, and use it to reason about where the mid-sized-versus-enterprise threshold plausibly sits.
# DynamoDB on-demand monthly cost for a shopping-cart service.
carts = 2_000_000
reads_per_cart_per_day = 8
writes_per_cart_per_day = 3
monthly_reads = carts * reads_per_cart_per_day * 30
monthly_writes = carts * writes_per_cart_per_day * 30
price_per_million_read_eventual = 0.0625
price_per_million_write = 0.625
read_cost = monthly_reads / 1_000_000 * price_per_million_read_eventual
write_cost = monthly_writes / 1_000_000 * price_per_million_write
total = read_cost + write_cost
print(f"monthly reads = {monthly_reads:,}, monthly writes = {monthly_writes:,}")
print(f"DynamoDB on-demand monthly cost = ${total:,.2f} (${read_cost:,.2f} read + ${write_cost:,.2f} write)")
# monthly reads = 480,000,000, monthly writes = 180,000,000
# DynamoDB on-demand monthly cost = $142.50 ($30.00 read + $112.50 write)
At two million carts, DynamoDB's monthly cost is genuinely small, well within range of what a single well-provisioned PostgreSQL primary with a couple of read replicas would cost to run for the same load. This is the concrete basis for the "threshold" in the decision matrix: at this scale, the deciding factor is not cost, it is whether the team wants to operate a relational instance and its own expiry job (PostgreSQL) or hand that operational surface to a managed store (DynamoDB). The threshold shifts meaningfully once cart volume grows another order or two of magnitude, at which point a single relational primary's connection and write-throughput ceiling becomes the real constraint, not cost.
Trade-offs & pitfalls
- Assuming a NoSQL store is required "at scale" without checking whether PostgreSQL's actual ceiling has been reached. The worked example shows a mid-sized deployment can comfortably stay relational well past what feels like "real" scale.
- Believing shopping carts hotspot on popular items. They hotspot on users, not items, in a correctly keyed design; this misconception has led to unnecessary key-sharding work on systems that never needed it.
- Skipping Cassandra's repair schedule because the cluster "seems fine." Deferred repair risks deleted data resurfacing after
gc_grace_secondsexpires on a replica that missed a delete, a subtle and unpleasant correctness bug specific to Cassandra's eventually consistent deletion model. - Building a custom expiry job for PostgreSQL and letting it silently fail. Without alerting on the job's own health, an abandoned-cart cleanup job that stops running is invisible until storage or query performance visibly degrades.
- Choosing Cassandra for its consistency tunability without the operational maturity to actually operate repair and compaction correctly. The flexibility is only a genuine advantage in the hands of a team equipped to run it; otherwise it is pure added operational risk.
Explain the CAP theorem and its practical implications when selecting a distributed database. Give concrete examples of systems that prioritize different trade-offs (for example Cassandra, PostgreSQL clusters, DynamoDB Global Tables) and describe how those choices affect availability and consistency during network partitions.
Sample Answer
Direct answer
The CAP theorem says that during a network partition (a period where some nodes can't communicate with others), a distributed system can keep serving strong consistency (every read reflects the latest committed write) or availability (every request gets a non-error response), but not both at once; it has to choose. Since networks will partition eventually regardless of design, the real, practical question a database selection has to answer is not "CP or AP in the abstract" but "when this system splits, which side loses service, and for how long, and does that match what this workload can tolerate."
Structured elaboration
- Cassandra: availability-favoring (AP) by default. During a partition, each side keeps accepting reads and writes, with per-query tunable consistency levels (for example
ONEorQUORUM, how many replicas must acknowledge before a request succeeds). Replicas that fell out of sync heal afterward through mechanisms like hinted handoff (a reachable node temporarily stores a write meant for an unreachable replica and forwards it once that replica comes back) and anti-entropy repair (a background process that compares replicas against each other and reconciles any differences it finds). The trade is that a client can observe stale or conflicting data during and shortly after a partition, in exchange for both sides of the split continuing to serve traffic. - Postgres clusters (a primary with synchronous or semi-synchronous streaming replication, typically managed by an orchestrator like Patroni): consistency-favoring (CP) by design. A synchronous-replication setup will block or fail a write rather than let the primary and a replica silently diverge, and failover tooling generally fences off a partitioned-away node instead of letting it keep accepting writes as a second primary, which would risk split-brain (two nodes both believing they are the authoritative writer). That fencing is what makes it CP: the minority side of a partition becomes unavailable rather than inconsistent.
- DynamoDB Global Tables: has shipped both trade-off points as explicit, named modes. The original design, multi-Region eventual consistency, is AP: each region accepts writes independently, replication catches up asynchronously, and a region cut off by a partition keeps serving local reads and writes, resolving conflicting updates from different regions with a last-writer-wins rule. As of June 2025, AWS added multi-Region strong consistency (MRSC) as an opt-in mode: a write is synchronously replicated to at least one other of exactly three configured regions before it acknowledges, and reads return the latest version, moving that table's behavior toward CP (a write needs a reachable quorum of regions, so an isolated region alone can't accept writes), and giving up the transaction application programming interfaces (APIs) as the cost of that stronger guarantee. This is a clean, current illustration that CAP behavior is a configuration choice a specific product exposes, not a fixed label stuck to a product name.
Worked example
A three-region Cassandra ring loses connectivity between one region and the other two for several minutes. Application writes hitting the isolated region with a local quorum (a majority of that region's own replicas) keep succeeding, because Cassandra is AP: it doesn't require agreement from the unreachable regions. A client reading from one of the other two regions during that window may not yet see the isolated region's writes, and won't until the partition heals and repair mechanisms replay the missed updates, an inconsistency window bounded by however long the partition actually lasts, not by any fixed number the system guarantees in advance.
Trade-offs & pitfalls
"AP" does not mean "no consistency guarantees ever"; it means consistency is negotiated per operation or achieved eventually, rather than enforced synchronously on every write. "CP" systems are not unavailable in normal operation; they are only unavailable specifically to the minority side of an active partition. A common pitfall is treating CAP as a complete design theory: it says nothing about the latency cost of staying consistent during ordinary, non-partitioned operation, which is a separate and often more frequently relevant trade-off (the PACELC framework extends CAP to cover exactly this: even without a partition, a system still has to choose between lower latency and stronger consistency on every single request, a trade-off CAP alone is silent on).
Explain polyglot persistence: when it is valuable, common architecture patterns that combine multiple data stores, and the operational and developer pitfalls to avoid. Then sketch a minimal architecture for a product that needs transactional order writes, flexible per-user profile data, and fast product-lookup search: which store would you put each responsibility in, and why?
Sample Answer
Direct answer
Polyglot persistence means deliberately using different data stores for different parts of one system, each chosen for the access pattern it actually serves, rather than forcing a single database to be good at everything. It earns its complexity when a system has genuinely different workloads coexisting, a transactional write path alongside a search path alongside a flexible-schema read path, exactly the shape in this question, and it is overreach when adopted reflexively for a system whose workloads are actually similar enough that one well-run database would have handled all of them.
Structured elaboration
When it is valuable. Distinct access patterns with genuinely different optimal storage shapes coexisting in one product: transactional writes needing atomicity, consistency, isolation, and durability (ACID) for orders and payments; free-text or faceted search needing an inverted index for product search; flexible per-entity documents needing schema freedom for user profiles with varying optional fields. Serving all three from one relational database usually means either a mediocre search implementation bolted onto SQL, or forcing profile data into a rigid schema that fights its natural shape.
Common architecture patterns. A system of record plus derived read models, where one store owns the truth and others are kept in sync as read-optimized projections via change data capture (CDC) or an outbox pattern (writing the event to an outbox table in the same transaction as the actual data change, so a separate process can publish it reliably afterward instead of risking the change and the notification getting out of sync), is the dominant, safest pattern because it keeps a single, unambiguous source of truth. Split ownership by bounded context, where each service genuinely owns and is the sole writer of its own store, and other services reach it only through that service's API, never by reading its database directly, is the complementary organizational pattern.
Operational and developer pitfalls to avoid. Multiple sources of truth for the same fact, for example both an order service and a search index both treating themselves as authoritative for "is this in stock," which drifts apart over time; always designate exactly one owner per fact. Synchronization lag surprising a caller that expects same-store consistency it does not actually have; design explicitly for which paths tolerate propagation delay and which cannot. Operational sprawl, where N stores means N backup strategies, N monitoring setups, and N sets of on-call runbooks and access controls to maintain correctly, a real, recurring cost that should be weighed against the workload-fit benefit, not assumed free. Treating cross-store atomicity as routine, since there is no shared transaction manager spanning, say, a relational database and a search index, so the architecture must be built around synchronization that is eventual (the two stores agree after a short delay, not instantly), idempotent (applying the same update twice has the same effect as applying it once, so a duplicate message causes no harm), and replayable (past events can be reprocessed from history to rebuild or repair a store) rather than an illusion of atomic writes across stores.
Worked example
flowchart LR
Client -->|checkout| OrderSvc[Order service]
Client -->|profile edit| ProfileSvc[Profile service]
Client -->|search| SearchSvc[Search service]
OrderSvc -->|ACID writes| OrdersDB[(Relational DB: orders)]
ProfileSvc -->|flexible per-user documents| ProfileDB[(Document store: profiles)]
ProductSvc[Product service] -->|source of truth| ProductDB[(Relational DB: products)]
ProductDB -->|CDC or outbox| SearchIndex[(Search index: product lookup)]
SearchSvc -->|query| SearchIndex
Transactional order writes go to a relational database, ACID across order lines, payment status, and stock decrement in one commit. Flexible per-user profile data goes to a document store, each user's profile a self-contained record with optional fields that vary per user, fetched whole by identifier, with no cross-user joins needed. Fast product-lookup search goes to a dedicated search index, fed by CDC or an outbox from the product service's own relational store of record, because free-text and faceted search is exactly what an inverted-index engine is built for and a basic relational text match is not.
Trade-offs and pitfalls
Running three stores for a system this size is only worth it once product search genuinely needs facets, free text, and ranking beyond a few relational indexes, and profile data genuinely varies enough per user that a rigid schema would fight it. A smaller version of this same product, few users, simple structured profile fields, simple catalog search, is better served by one relational database with good indexing, and splitting into three stores too early is the overreach pitfall materializing in practice.
What would flip the recommendation: at a small enough scale, collapse profile and search into the same relational database as orders, profiles as a nullable-column or JSONB-augmented table, search via a basic full-text index, until a measured need, search relevance complaints, or profile schema churn causing frequent migrations, actually justifies splitting out a dedicated store.
Unlock Full Question Bank
Get access to all Database Selection and Trade-offs interview questions and detailed answers.
Sign in to ContinueJoin thousands of developers preparing for their dream job.