↓ Skip to main content
What Goes Around Comes Around... And Around (Andy Pavlo, CWI 2024)
  1. Archive/

What Goes Around Comes Around... And Around (Andy Pavlo, CWI 2024)

Author
AI Assistant
Curated for Pradithya Aria Pura · AI-written summary of the source material

In 2005 Michael Stonebraker and Joe Hellerstein wrote “What Goes Around Comes Around”, a survey of four decades of data models (hierarchical, network, object-oriented, XML and others) that concluded the relational model with an extensible type system had beaten all of them. In 2024 Stonebraker and Andy Pavlo published the sequel in SIGMOD Record, covering the twenty years since. This 35-minute talk is Pavlo presenting it at CWI in Amsterdam, at the event where Marcin Żukowski received CWI’s Dijkstra award. It’s a fast, opinionated tour of every “SQL is dead” movement since 2005, and it makes a short, well-sourced case that any new database idea should start by asking what SQL already does.

The cycle
#

Slide: the cycle; SQL is great, then SQL is bad (slow, old, awkward, inconsistent, not web scale), then new startups and lots of money, then SQL adopts new features

Pavlo’s claim is that the relational model plus a declarative language should be the default for any new application, and that it has dominated since the 1980s. Roughly every decade someone says SQL is slow, old, inconsistent or “not web scale”, VCs fund a wave of startups to replace it, the replacements fail to deliver on real applications, and SQL absorbs their good ideas. Then everyone’s back where they started. The current wave, he says, is people claiming LLMs will replace SQL, and he opens with tweets saying so from people selling vector databases.

Slide: the 2024 SIGMOD Record paper “What Goes Around Comes Around… And Around…” by Michael Stonebraker and Andrew Pavlo

The 2005 paper divided history at Codd: everything before the relational model was an early prototype, and almost everything after is a variation on it. Stonebraker had called object-relational (Postgres) the winner because it was extensible; Pavlo just counts that as relational. The talk sticks to data models and query languages, bringing in implementations only when they explain why something lost.

Key-value stores and MapReduce
#

Slide: some distributed KV stores realized that expressive APIs are important and evolved into document stores; better to start with a relational DBMS

Key-value stores map a key to an opaque byte array. They come in two kinds. Distributed ones like Memcached, Aerospike and early DynamoDB give up secondary indexes and value introspection in exchange for scalable, predictable performance. Embedded ones like RocksDB and LevelDB are libraries you build larger systems on. Pavlo has no complaint about the second kind (CockroachDB started on RocksDB) or about using the first kind for caches and session data. The problem is applications that start on a KV store and then find they need to look inside the values for indexes or aggregations, and end up writing that logic themselves. The distributed KV stores responded by turning into document stores. His advice: a key-value store is a two-column table, so start with a relational system and keep the option to use SQL later.

Slide: MapReduce systems; people remembered that procedural query languages are (usually) a bad idea, MR vendors put SQL engines on top of Hadoop, and the Hadoop market crashed

MapReduce wasn’t really a data model, since the schema lived inside the user’s map and reduce functions. Pavlo was personally involved in the 2008–2009 argument, co-authoring a comparison with Stonebraker, DeWitt and others that said MapReduce was reinventing parallel databases from the 1980s. “Turns out we were right.” The Hadoop vendors bolted SQL engines on top (Hive and others), which added a translation step on top of an inefficient execution model, and the market collapsed: MapR is gone, Hortonworks merged into Cloudera, and Cloudera went private. Google said in 2014 it had dropped MapReduce internally.

What survived was implementation, not model. HDFS’s cheap append-only distributed storage is effectively S3, and separating compute from storage is now standard. The shuffle phase shows up in BigQuery. Pavlo also credits the honoree: Snowflake, which Żukowski co-founded, started with SQL from day one and was waiting when people decided they wanted SQL back.

Document and wide-column databases
#

Slide: almost every major NoSQL DBMS relearned most of the lessons from the 1970s; SQL APIs, schemas and integrity constraints, transactions, and logical/physical data independence are good ideas

The NoSQL movement defined itself by what it lacked: no SQL, often no transactions, no joins. Its proponents, he says, were repeating the arguments of the XML databases of the 1990s and the object-oriented databases of the 1980s (Versant, O2, ObjectStore), including denormalising data into one document per entity to avoid joins. Then almost every NoSQL system relearned the 1970s. SQL APIs came back under other names, like PartiQL and CQL. Schemas, integrity constraints and transactions came back. Pavlo’s favourite anecdote: on a 2015 visit to MongoDB, a co-founder told him the product would never support SQL, “mark my words”. That person left, and MongoDB added SQL.

SQL moved toward them too, adding JSON operators in 2016 and a JSON type in 2023 (Postgres and Oracle had both for a decade before). He expects document and relational systems to become indistinguishable soon. Wide-column stores (HBase, Cassandra) are document databases limited to one level of nesting, and existed mainly because people copied Google’s Bigtable paper. Bigtable itself now supports SQL.

Graph databases
#

Slide: the graph model is the same as the CODASYL network model from the 1970s with the same issues; worst-case optimal joins, vectorized execution and factorized query processing will diminish the advantage of specialized graph DBMSs

Property graphs, with Neo4j the best known, are in his view the CODASYL network model again, with the same problem of writing traversal algorithms into application code. The specialised systems’ real advantage was running traversals server-side, and SQL:2023 took that away by adding SQL/PGQ property-graph queries. He cites CWI’s DuckPGQ work, which on an earlier DuckDB beat Neo4j by about 10x without the optimisations on his slide (worst-case optimal joins, vectorized execution, factorized query processing). He also restates a public bet: if graph databases overtake relational databases in market size by the end of 2030, he’ll wear an “I love graph databases” shirt for the rest of his life.

Text search and arrays
#

Full-text search goes back to Cornell’s SMART project in the 1960s, and today Lucene and the systems built on it (Elasticsearch, Solr) dominate. Every major relational system has full-text indexes, and Pavlo says adoption is held back by non-model reasons: non-standard SQL syntax and weaker libraries than the specialised tools. Running a separate system just for text search is a bad idea, he says, but people will keep doing it.

Array databases are the exception he promised at the start. Vectors, matrices and tensors are traversed along paths that don’t follow rows or columns, so a specialised engine can make sense. First-class arrays violate Codd’s original requirement that values be scalar, but SQL added multi-dimensional arrays in 2023 anyway, which Pavlo calls a good example of the relational model evolving. SciDB has fizzled, and TileDB doesn’t emphasise that it’s an array database, putting a relational interface on top.

Vector databases
#

Slide: the vector model is not a substantial deviation from existing models that requires new DBMS architectures; vector DBMSs offer better integration with AI tooling; every major DBMS will provide native vector indexes

Vector databases (Pinecone, Weaviate, Milvus, Qdrant) are document stores with an approximate nearest-neighbour index. They do integrate better with AI frameworks such as OpenAI and LangChain, and Pavlo grants that. His evidence that they aren’t a new model is timing. JSON took relational systems four or five years to adopt after MongoDB appeared, and the standard took until 2016. Vector search went from “ChatGPT buzz” in Q4 2022 to announced support in nearly every major relational system by Q3 2023. Something that can be added that fast is a new index type and operator, not a new architecture. He predicts vector databases will either add SQL and converge with relational systems, as document databases did, or settle into the Elasticsearch role: a side index you query alongside the database of record, never the database of record itself.

Where relational falls short
#

Slide: relational is not perfect; many non-relational DBMSs provide a better out-of-the-box experience, relational developers should make their systems easier to use and adaptive, DuckDB is very good at this

He isn’t claiming relational systems or SQL are flawless. MongoDB’s first five minutes are better: start it and throw JSON at it. Pandas and Jupyter are still more popular for analysis. DuckDB is the relational system that gets this right (point a FROM clause at a CSV and go), and he’d like Postgres, MySQL and SQLite to learn from it. SQL’s problems have been documented since Date and Darwen’s Third Manifesto, and replacements like Neumann and Leis’s CIDR proposal or Google’s pipe syntax exist. But SQL’s problem is inertia, not technology. There’s no IBM left to impose a new language, and the de facto standard is the Postgres parser that everyone embeds. One survey he shows has students ranking SQL above Python as the language they’ll need for their careers.

Slide: parting thoughts; people will continue to make the same mistakes in future DBMS projects, category lines will blur as specialized systems expand, and the relational model and declarative queries promote better data engineering

He closes by placing each movement on the cycle: document databases have come back to SQL, graph databases are on their way, vector databases are still near the “lots of money” stage. Something new will claim to replace SQL by 2030, and he doesn’t know what it will be. He names DuckDB as the next Snowflake, the SQL system that will be in place when local data science decides pandas is too slow.

Key takeaways
#

  1. Every post-2005 challenger to SQL (key-value, MapReduce, document, wide-column, graph, vector) has either converged back on relational and SQL or settled into a niche.
  2. A key-value store is a two-column table. Starting with a relational system avoids a migration when you later need to query inside values.
  3. What MapReduce left behind was implementation, not a data model: cheap distributed storage, compute separated from storage, shuffle-based execution.
  4. NoSQL systems re-adopted SQL-like APIs, schemas, constraints, transactions and data independence, all of which were 1970s ideas.
  5. Graph databases are the CODASYL network model again. SQL/PGQ plus modern join algorithms remove the main reason to run a separate graph system.
  6. Relational vendors added vector search within about a year of demand appearing, and that speed is the evidence that vectors aren’t a new data model.
  7. Arrays are the one case where a specialised engine still makes sense, even though SQL now has multi-dimensional arrays.
  8. Relational systems lose on out-of-the-box experience, not on the model. DuckDB is the example of fixing that.

Source
#

  • Talk: “What Goes Around Comes Around… And Around…”
  • Speaker: Andy Pavlo, Carnegie Mellon University
  • Event: Dutch Seminar on Data Systems Design (DSDSD), CWI Amsterdam, November 2024, at the Dijkstra award event for Marcin Żukowski
  • Paper: Michael Stonebraker and Andrew Pavlo, “What Goes Around Comes Around… And Around…”, SIGMOD Record 53(2), June 2024 (https://cmudb.io/wga24)
  • Duration: 35 minutes
  • Video: https://www.youtube.com/watch?v=8Woy5I511L8

Related