Fauna Inc., the serverless database developer, has released a custom query language optimized for its cloud-delivered document-relational database management system. This new language, called Fauna Query Language (FQL), is designed to enhance performance, collaboration, and efficiency for developers.
FQL draws inspiration from TypeScript, a programming language based on JavaScript, and incorporates a similar type system. The language allows developers to express declarative queries and functional business logic in strongly consistent transactions. Unlike imperative queries that specify exactly what information the database should retrieve, declarative queries describe the information, leaving the machine to determine how to find and deliver it.
According to Fauna, FQL will be familiar to developers with experience in modern programming languages like TypeScript or Python. It enables the creation of relational queries across semistructured data through strictly serialized transactions. Additionally, FQL supports business logic and dynamically constructs result shapes in JavaScript Object Notation format that align with the requirements of the application.
The introduction of FQL addresses the challenge of predicting database schemas for semi-structured data, commonly found in modern data lakes and lakehouses. By offering gradual typing, which allows developers to start building with unstructured data and gradually apply structure as the data takes shape, FQL provides flexibility while ensuring application behavior remains intact.
Tyson Trautmann, Fauna’s Vice President of Engineering, emphasized that FQL bridges the gap between the static nature and limitations of the ubiquitous SQL language and the requirements of modern serverless models. While SQL performs well in static data scenarios, it can be inflexible and complex in hybrid operational/online transaction processing situations. FQL eliminates these limitations, enabling developers to work more effectively and efficiently without the need for labor-intensive tasks like schema migrations.
In addition to the language release, Fauna also unveiled new development capabilities and a declarative database schema. The developer experience enhancements include a dashboard that allows easy access to resources alongside the code editor, a web shell for quick query experimentation, and an intelligent code completion feature. These updates aim to minimize context switching and improve overall productivity for developers.
By releasing FQL and enhancing its development capabilities, Fauna aims to provide developers with a powerful toolset for building scalable and performant applications. The combination of a custom query language, a flexible schema, and an intuitive developer experience sets the stage for faster collaboration, improved performance, and enhanced security.