Mangle is a new programming language developed by Google, officially launched on August 22, 2025, designed for deductive database programming — a paradigm focused on reasoning over complex data sets. It builds on Datalog, a logic programming language, but adds powerful features to make querying and analyzing large, interconnected datasets easier and more expressive.
Aggregation Support Easily compute sums, averages, and counts within queries — no need for manual joins or data stitching.
Function Calls Inside Queries Embed custom logic directly into queries for dynamic calculations and business rules.
Optional Type Checking Enforce data consistency when needed, or skip it for flexibility.
Recursive Rules Enable queries that refer to themselves — ideal for graph traversal, hierarchy analysis, and network pathfinding.
Cross-Database Querying Seamlessly query multiple databases without worrying about compatibility.
Complex Reasoning Handle ontologies and knowledge graphs with built-in support for advanced inference and relationship mapping.
SQL: Great for structured queries, but struggles with recursion and reasoning over complex relationships.
Python: Flexible, but imperative — requires more code to express logic.
Mangle: Combines declarative syntax, recursion, aggregation, and multi-source querying in one language.
It’s like having the reasoning power of Prolog, the structure of SQL, and the flexibility of Python — all rolled into one.
Data Integration: Query across fragmented systems with ease.
Graph Analysis: Social networks, org charts, and relationship graphs.
Ontology Reasoning: AI and semantic web use cases.
Complex Analytics: Finance, research, and multi-source data modeling.
Mangle is open-source and available on Google’s GitHub repository. You’ll find:
Source code
Sample queries
Documentation
Start small with basic queries, then scale up to recursive logic and multi-database analysis.
0
2
1