Most databases use SQL as the interface to access relational data. Because of that, we associate SQL to be the language of relational algebra. But its affinity with the English language and unclear and inconsistent semantics leave a lot of space for improvements. A deep dive into the language highlights many examples of convoluted or confusing language design, which we just got used to.
The solution we propose is PRQL, which does away with all but the relation data model. It uses a minimal set of syntactic features to construct pipelines of functions. These functions transform relations from the tables where they are stored into the desired result. This simplifies the mental model needed to wrangle with data, while improving the ergonomics of writing code with features of modern programming languages.
This new language can be compiled to most SQL dialects, which makes it portable and reusable, important factors of OLAP. Decoupling the language from the database also increases the speed of the development cycle by failing early and providing clear error messages.
Aljaž Mur Eržen
Compiler Developer @EdgeDB & PRQL Maintainer
Aljaž is a compiler developer at EdgeDB and a core contributor of the PRQL project, with a background of mathematics and data science. He is working on making data languages more predictable, easier to reason about and improve the developer experience.