Scrivio Interview library
LeadershipPrincipal6 min read · updated 12 November 2026

SQL has been declared obsolete several times: by object databases, XML databases, NoSQL and now by LLM-generated queries. As a senior technical leader, why has SQL lasted, and what does that mean for how you invest in skills and tooling over the next ten years?

SQL has lasted because it is declarative: we say what result we want and the optimizer decides how to get it, so engines keep getting faster without applications being rewritten. The relational model plus a standard language gives portability, a huge talent pool and tooling, relational engines keep absorbing their rivals' features such as JSON, full-text search, vectors and partitioning, and most new systems end up adding a SQL interface. So I would invest in SQL literacy and data modelling as durable skills, treat ORMs and AI-generated queries as accelerators that still need review, and budget for query observability, because the cost of a bad query grows with scale.

Why this question is asked

Every few years a new technology is announced as the end of SQL, and every few years the new technology adds a SQL interface. At the most senior level, interviewers ask this not for history but for judgement: where should a technology organisation put its training budget, its tooling money and its hiring standards for the next decade, especially now that language models can write queries? In this answer, we will look at what makes SQL declarative and why that matters so much, how the relational world absorbed each rival, why new systems keep adding SQL, and what this means in practice for skills, tooling and the review of generated queries.

1What Declarative Means and Why It Matters

In an imperative language like Java, we tell the computer how to do something: loop over this list, check this field, add to that map. In a declarative language like SQL, we describe the result we want, and the database's optimizer, the component that turns a query into an execution plan, chooses how to produce it.

SQL
-- What we want: big customers in 2025
SELECT c.name, sum(o.total)
FROM customers c JOIN orders o ON o.customer_id = c.id
WHERE o.created_at >= '2025-01-01' AND o.created_at < '2026-01-01'
GROUP BY c.name
HAVING sum(o.total) > 10000;
-- How the engine may run it, chosen at runtime:
-- 2015: nested loop + index scan, single thread
-- 2026: parallel hash join + partition pruning + parallel aggregate
-- Same query text, no application change

This separation is the main reason SQL survives. The query written in 2010 still runs today, and it runs faster, because a decade of optimizer improvements, parallel execution, better indexes and faster storage were delivered underneath it. An application that encoded the access path itself, as object databases and early NoSQL APIs required, has to be rewritten to benefit from any of that.

2How the Relational World Absorbed Its Rivals

Each wave of challengers brought a real idea, and the mainstream relational engines adopted it. Object databases pushed rich types and object mapping; we got ORMs and user-defined types. XML databases arrived; SQL gained an XML type and XPath functions. Document stores showed the value of flexible schemas; PostgreSQL added jsonb with indexing, and MySQL added a JSON type. Scale-out stores showed horizontal scaling; we got native partitioning, logical replication, and distributed SQL databases. The current wave is vector search for AI; PostgreSQL has extensions such as pgvector, and several engines have added vector types.

Challengers and what SQL absorbed
WavePromiseWhat relational engines added
Object databases (1990s)store objects directlyORMs, user-defined types
XML databases (2000s)native XML documentsXML type, XPath and XQuery functions
NoSQL (2010s)flexible schema, scale-outjsonb, partitioning, distributed SQL
Streaming and lakesdata in motion, cheap filesstreaming SQL, SQL engines over Parquet
LLM-generated queries (2020s)no need to write queriesvectors in the database; SQL as the target
Each rival contributed an idea; the language that stayed was SQL.

3Why New Systems Keep Adding SQL

The pattern repeats: a new system launches with its own query API, then adds a SQL-like language, then full SQL. Distributed databases such as CockroachDB, YugabyteDB and Spanner speak SQL. Stream processors such as Flink and Kafka-based tools offer streaming SQL. Lakehouse engines such as Spark SQL, Trino and DuckDB put SQL over files in object storage. The reason is economic. Millions of engineers, analysts and tools already speak SQL, so a SQL interface instantly connects a new system to BI tools, JDBC drivers, existing skills and existing code. A proprietary API has to win all of that from zero.

Even LLM-based tools reinforce this. When a model generates a query from a question in plain English, its target language is almost always SQL, because SQL is precise, well documented and executable against every major engine. The model changes who writes the first draft, not the language.

4Investing in Skills: SQL Literacy and Data Modelling

For a technology leader, this means SQL literacy and data modelling are among the most durable skills we can build. Frameworks change every few years; a solid understanding of joins, grouping, NULL logic, transactions, isolation levels and indexes stays useful for an engineer's whole career. I would include SQL in hiring loops for backend roles, run internal training that goes beyond syntax into reading plans and modelling, and grow a small group of database specialists who review risky designs.

ORMs such as Hibernate, and query generators, including AI assistants, are accelerators for people who know what good SQL looks like. They are risky for people who do not, because they produce queries that are correct on small data and catastrophic at scale: N+1 query patterns, a function on an indexed column, a missing tiebreaker, a NOT IN on a nullable column. The skill to recognise these does not become obsolete when the first draft is generated; it becomes more important.

5Investing in Tooling: Observability and Review of Generated SQL

The cost of a bad query grows with data size and traffic. A query that takes 50 milliseconds on 1 million rows can take 50 seconds on 1 billion. So I would budget for query observability as platform infrastructure: pg_stat_statements or equivalent enabled everywhere, query-level metrics in the APM tool, slow query alerts tied to owning teams, and plan regression checks for critical queries in CI.

For generated SQL, from ORMs or AI tools, I would add review gates proportional to risk. Queries generated at runtime by an AI assistant for internal analytics run under a read-only role with statement timeouts and row limits. Queries generated during development go through code review like any other code, with EXPLAIN output attached for anything touching large tables. That way, we get the speed of generation without handing the database's health to a tool that cannot see production data volumes.

6Follow-up questions

Does this mean NoSQL databases were a mistake?

No. Key-value stores, document databases and wide-column stores solve real problems, such as very high write throughput, simple access patterns at enormous scale, or flexible documents, and they remain the right tool in those niches. The lesson is that they rarely replace relational databases as the default for business data, and that many of them eventually added SQL-like interfaces because users wanted ad-hoc queries.

Would you still hire engineers who do not know SQL well?

Yes, if they are strong otherwise, but I would make SQL and data modelling part of their growth plan and pair them with experienced reviewers. For roles that own data-heavy services, I would treat solid SQL as a requirement, because those engineers make decisions that are expensive to reverse.

7Conclusion

In this answer, we saw that SQL has lasted because its declarative nature lets engines improve without application rewrites, because the relational model and a standard language bring portability, talent and tools, and because relational engines absorbed each rival's best ideas while new systems kept adding SQL interfaces. For the next decade, that means investing in SQL literacy and data modelling, treating ORMs and AI-generated queries as accelerators that need review, and budgeting for query observability.

What to say in the interviewAbout 80 seconds aloud

Open with

I think SQL has lasted for three reasons. First, it's declarative: we describe the result, and the optimizer decides how to compute it. That means a query written fifteen years ago now runs on parallel plans, better indexes and faster storage without anyone rewriting it, while systems that made applications encode access paths had to be rewritten to improve.

Then, if they want more

Second, the relational model with a standard language gives portability, an enormous talent pool and a whole ecosystem of drivers and BI tools, so new systems like distributed SQL databases, streaming engines and lakehouse engines keep adding SQL interfaces to plug into that ecosystem. Third, relational engines absorbed each rival's best ideas: JSON, full-text search, partitioning, replication, and now vectors.

For the next ten years I'd invest in SQL literacy and data modelling as durable skills, including reading plans, NULL logic and transactions, in hiring and in training. I'd treat ORMs and AI-generated queries as accelerators that still need review, because they produce queries that are fine on small data and terrible at scale.

And I'd budget for query observability and review gates on generated SQL, with read-only roles, timeouts and row limits, because the cost of a bad query grows with scale.

About this answer

Last updated
12 November 2026
Checked
Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the documentation below. What the checks cover
Where the question comes from
Written by Scrivio for practice. It is not taken from an interview.
Report an issue with this answer

Copy the line below and send it to the author with what you found. It carries the address of this page.

Issue with "SQL has been declared obsolete several times: by object databases, XML databases, NoSQL...": https://scrivio-interview-library.netlify.app/databases/sql-fundamentals/4d6c623686/