Not every datastore is relational. NoSQL systems (document, key-value, graph, column-family) trade strict table schemas for flexibility or scale patterns. Most production stacks still use SQL for transactional core data.
Relational (SQL) strengths
- ACID transactions for money, inventory, accounts
- Flexible ad-hoc queries with JOINs and aggregates
- Mature tooling: backups, replication, ORMs
- Strong integrity via constraints and foreign keys
NoSQL use cases
- Document stores for evolving JSON-shaped content
- Key-value caches (Redis) for sessions and rate limits
- Wide-column or time-series at massive ingest scale
- Graph DBs when relationships are the primary query pattern
Analytics pipelines often land in SQL warehouses even when apps write to diverse stores.
When teams pick SQL
-- Reporting still looks like SQL
SELECT status, COUNT(*) AS order_count
FROM orders
GROUP BY status;Data Science workflows frequently export CSVs into SQL or query warehouses with the same SELECT skills you learn here.
Important interview questions and answers
- Q: SQL vs NoSQL—binary choice?
A: No—polyglot persistence is common: Postgres for core data, Redis for cache, object storage for files. - Q: Can NoSQL replace JOINs?
A: Document embedding reduces JOINs but can duplicate data; SQL JOINs normalize related entities.
Self-check
- Name one workload where ACID transactions matter.
- Give one example of a NoSQL category (document, key-value, etc.).
Tip: Most teams use SQL for core transactional data even when NoSQL handles cache or documents.
Interview prep
- SQL strength?
ACID transactions, ad-hoc JOIN queries, mature integrity constraints.
- Polyglot persistence?
Using multiple store types (SQL, cache, object) where each fits best.