Dia · Oct 24, 2026

Dia proposed 345 business entities from 342 tables in 1.1 seconds

Semantica turned a 342-table database into 345 business entities and 788 possible relationships, in about a second. The planner uses only relationships a person approved. None are used until someone does.

Business entities found in 342 tables
345
Dia pull request #117
Possible relationships: 144 from foreign keys, 643 from naming, 1 already governed
788
Dia pull request #117
Planner unit tests passing (approved CRM slice)
16
Dia pull request #119
Contract and chat tests passing
9/9 · 20/20
Dia pull request #121

The problem

AI models write SQL that looks right but joins the wrong tables. On a real company database, the mistake is silent. The number looks plausible, and it is wrong.

Method

  • Discovery. Semantica reads the database catalog: tables, foreign keys, naming patterns and any existing knowledge graphs. From these it proposes entities and relationships. A proposed relationship cannot be used yet.
  • Approval. A person approves relationships into the semantic contract. Only approved relationships can be used.
  • Planning. When someone asks a question, the AI has one job: say what the question means. Code then picks the entities and joins from the approved contract. The AI writes nothing after that.
  • Measurement. The counts and timing come from one read-only run on a copy of the catalog, before the change was merged (pull request #117). The tests are the planner suite (#119) and the contract and chat suites (#121), which run with the AI and the SQL check replaced by fixed responses so they test the planner alone.

Data

A sample company on our own servers, with 342 tables. It has a Salesforce-style sales CRM, HR, accounts receivable and an Oracle EBS "Vision" core. It is demo data, not a customer's system.

Results

  • The 342 tables became 345 entities (342 discovered, 3 already governed) and 788 possible relationships (144 from foreign keys, 643 from naming patterns, 1 already governed). Loading and checking took 1.1 seconds.
  • The planner's 16 unit tests pass on an approved slice of the CRM. They check that totals are never double-counted across joins, that unapproved joins are refused, that output is the same every time, and that each plan leaves an audit trail.
  • The contract tests (9) and chat tests (20) pass.
Book a demo