consumption
SQL
Alongside natural language that generates accurate queries, SQL is the most powerful way to consume data in Timbr – and for good reasons.
Timbr makes standard SQL dramatically more expressive and intuitive by turning your data into a semantic model of business concepts and relationships.
This allows users to write far simpler, cleaner queries that mirror how they think about the data, not how it’s physically structured.
Write Once, Run Anywhere: Native SQL Support
Timbr uses the SQL dialect and functions of the underlying database, with no proprietary Timbr-specific syntax. Any SQL construct supported by the data source, such as PIVOT, CTEs, or window functions, can be used directly and remains fully compatible with any SQL client, including JDBC, ODBC, and SQLAlchemy.
Key Capabilities
Relationships replace JOINs
Relationships replace JOINs, making queries up to 90% shorter.
Inheritance Made Simple
Inheritance lets you query abstract and derived concepts seamlessly.
Hierarchies and Transitivity
Hierarchies and transitivity enable rich aggregations and roll-ups.
Simplifying SQL with Semantic Relationships
In traditional SQL, querying across multiple tables often requires manually stitching together complex JOIN logic, resulting in long, error-prone queries that are hard to write and maintain. Timbr changes that. By modeling explicit semantic relationships between business concepts, Timbr allows you to query across connected data using simple, readable SQL. Relationships are built into the ontology and reused automatically, so you can focus on what you want to know, not how the data is structured.
SQL with JOINs
SELECT s_acctbal,
s_name,
n_name,
p_partkey,
p_mfgr,
s_address,
s_phone,
s_comment
FROM tpc.part
INNER JOIN tpc.partsupp ON p_partkey = ps_partkey
INNER JOIN tpc.supplier ON s_suppkey = ps_suppkey
INNER JOIN tpc.nation ON s_nationkey = n_nationkey
INNER JOIN tpc.region ON n_regionkey = r_regionkey
WHERE p_size = 15
AND p_type like '%BRASS'
AND r_name = 'EUROPE'
AND ps_supplycost = (
SELECT min(ps_supplycost)
FROM tpc.partsupp
INNER JOIN tpc.supplier ON s_suppkey = ps_suppkey
INNER JOIN tpc.nation ON s_nationkey = n_nationkey
INNER JOIN tpc.region ON n_regionkey = r_regionkey
WHERE p_partkey = ps_partkey
AND r_name = 'EUROPE'
)
ORDER BY s_acctbal DESC, n_name, s_name, p_partkey
SQL with Relationships
SELECT DISTINCT `supplier_account_balance`,
`supplier_name`,
`has_nation[nation].nation_name` AS nation_name,
`from_supplier[brass_product].part_key` AS part_key,
`from_supplier[brass_product].manufacturer` AS manufacturer,
`supplier_address`,
`supplier_phone`,
`supplier_comment`
FROM `dtimbr`.`european_supplier`
WHERE `from_supplier[brass_product].size` = 15
AND ps_supplycost = `from_supplier[brass_product].min_supplycost_europe`
ORDER BY `supplier_account_balance` DESC, `nation_name`, `supplier_name`, `part_key`
Virtual Schemas: Backbone of Intelligent SQL
- timbr: For querying direct and inherited properties without graph traversal.
- etimbr: For accessing properties from derived or inferred concepts.
- dtimbr: For traversing relationships across the graph using semantic paths.
- vtimbr: For querying saved views that reuse business logic.
- gtimbr: For advanced graph algorithms (available as an add-on).
Key Benefits for Data Consumers
- Clarity: Query business concepts using familiar terms instead of raw table names.
- Simplicity: Skip repetitive JOINs, relationships are modeled once and reused.
- Efficiency: Focus on the insight, not the mechanics, queries are much shorter and easier to maintain.
- Power: Traverse relationships, filter on inherited properties, and query across multiple domains in one step.
- Compatibility: Works with any SQL-based tool, BI dashboards, notebooks, JDBC/ODBC, etc.