Stop Guessing.
Start Attesting.
Never trust critical enterprise analytics to probabilistic guesses. CxDM governs enterprise Text-to-SQL through format-agnostic contextual models (OKF-native), Contextual Normal Forms (CxNF), and deterministic CxDM Guardrails before a single query executes.
SELECT nation, SUM(gross_amount - returns - discounts) AS total_revenue
FROM analytics.fct_sales
WHERE fiscal_year = 2025 AND is_deleted = FALSE AND tenant_id = :current_tenant
GROUP BY nation;
The Paradigm Shift: From Storage to AI-Ready Context
Classical data modeling was invented decades ago with a single primary mission: to store and organize data efficiently. Contextual Data Modeling (CxDM) builds directly on top of physical databases to model data specifically for governed AI querying with deterministic guardrails.
Conceptual Model
Defines high-level business entities and their relationships (Customer, Order, Account). Focuses on business domain boundaries.
Logical Model
Details entity attributes, normalization (3NF/Star Schema), relationships, and primary/foreign key structures without engine specifics.
Physical Model
Optimized for disk & memory storage: data types, partitions, B-Tree indices, tablespaces, and engine dialect constraints.
Contextual Model
Built atop physical schemas. Declares domain semantics, Contextual Normal Forms (CxNF0–CxNF5), attested metrics, and CxDM Guardrails (G01–G31).
Why Classical Modeling is Not Enough for LLMs
Databases store tables, foreign keys, and indexes, but they do not store business intent. A column named net_amt does not declare how discounts are calculated, which tenant filter is mandatory, or which join causes a 1:N fan-out trap.
CxDM bridges this semantic gap. While LLM generation is inherently probabilistic, CxDM's enforcement engine is strictly deterministic — every generated query is verified and rewritten against versioned Git bundles (OKF v0.3) before touching your database.
Physical Schema + Prompt → LLM Guesses Query → Unchecked Execution (Silent Wrong Numbers)
Physical Model + Meaning + Rules + CxDM Guardrails + Proof → Every Executed Query Verified Against the Bundle
The 4 Pillars of Contextual Data Modeling
Every CxDM knowledge bundle is structured around four enforceable facets.
Meaning — What is it?
Maintained under open Open Knowledge Format (OKF v0.3) specification as Git-native concept files, glossaries, schemas, and navigation descriptors. Zero vendor lock-in.
Rules — How is it computed?
Attested Computation architecture. Verified financial calculations are never invented from scratch by AI; the model discovers attested formulas and binds typed parameters.
Constraints — What is permitted?
CxDM Guardrails by Design. Generated SQL is syntactically parsed at the AST level via sqlglot prior to execution: blocking join fan-out traps, enforcing table allowlists, and injecting mandatory governance predicates.
Proof — How accurate is it?
Continuous Evaluation Quality Gates. Golden question test suites run against every changeset and candidate release; unverified models or regressing accuracy are automatically blocked from publication.
"Who writes 200 tables?" — Bootstrap, Don't Type
Nobody writes 200 table contracts by hand. CxDM Studio automatically bootstraps draft bundles from database catalogs, SQL query logs, and dbt artifacts — domain experts only review and attest.
One Bundle Per Business Domain
Finance and Sales can define "Revenue" differently without collision. Each business unit governs its own isolated OKF bundle with domain-specific metrics, join paths, and access policies.
Works With Any Metadata Format — OKF-Native Reference
The MPG Catalog (M00–M49 → P01–P75 → G01–G31) and Contextual Normal Forms (CxNF0–CxNF5) form an abstract semantic contract. While Open Knowledge Format (OKF v0.3) is the canonical Git-native implementation, CxDM maps seamlessly onto Apache OSSIE, dbt YAML, OpenMetadata, DataHub, or relational catalogs.
30+ Enterprise Databases. Exact Native Dialects.
Powered by Apache Arrow ADBC and native high-performance adapters, CxDM eliminates dialect mismatch by generating, optimizing, and validating SQL specifically for your target database engine.
Apache Arrow ADBC Architecture
Zero-copy columnar metadata ingestion and secure execution using modern Arrow Database Connectivity (ADBC) alongside enterprise-grade drivers like python-oracledb.
Dialect-Specific Generation
No generic or broken SQL. CxDM targets each database's native grammar, window functions, date math, and optimizer hints directly during synthesis.
AST Parsing & Normalization
Powered by deep AST transpilation (sqlglot), queries are strictly validated against engine syntax rules before touching database execution planes.
AI-READY DATA MODELING
Solving Enterprise Text-to-SQL Challenges with Contextual Data Modeling (CxDM) and Deterministic Guardrails
Drawing from over 23+ years of hands-on database administration, enterprise Data Lakehouse architectures, and critical financial data systems, this technical book establishes the definitive engineering framework for eliminating Text-to-SQL failure modes through contextual data modeling and deterministic guardrails.
Inside the Book: The Complete MPG Catalog (50 M → 75 P → 31 CxDM Guardrails)
Model problems (M01–M49, plus reserved M00 for query-only issues) are root causes; SQL generation problems (P01–P75) are query-time symptoms; and CxDM Guardrails (G01–G31) are the deterministic rules that intercept them.
CxDM Assurance Levels (CxAL): Measuring & Governing AI Autonomy
Defines 6 verifiable assurance levels (CxAL0 Baseline to CxAL5 Audit-ready) combining declared model contracts and golden eval proofs to govern how many P01–P75 failure modes are blocked and what SQL autonomy the AI is granted.
The animal on the cover of AI-Ready Data Modeling is a Caucasian leopard (Panthera pardus tulliana). This majestic apex predator is native to the Caucasus region, including the rugged mountains of Ordubad in the Republic of Azerbaijan. Characterized by its striking pale yellow to deep golden coat adorned with distinct black rosettes, the Caucasian leopard is perfectly adapted to camouflage within rocky terrains and subalpine meadows.
As solitary and nocturnal creatures, these leopards are exceptionally elusive, relying on their acute senses to hunt prey such as wild bezoar goats and Asiatic mouflons. Tragically, due to habitat fragmentation, poaching, and prey depletion during the 20th century, their population severely declined. Today, the Caucasian leopard is critically endangered and strictly protected under regional and international Red Lists. Intensive conservation efforts and camera-trap monitoring in Azerbaijan's Zangezur National Park have fortunately recorded a gradual return of these magnificent big cats to their ancestral territories.
Why does traditional Text-to-SQL fail in enterprise?
Standalone LLM SQL generation is inherently insufficient for trustworthy enterprise analytics.
Silent Wrong Numbers
The query executes without syntax errors, but a 1:N join fan-out or omitted soft-delete filter silently doubles SUM() totals—the failure mode data leaders fear most.
Probabilistic Hallucinations
In complex business domains and multi-table schemas, LLMs generate what looks plausible, not what is contractually attested. Ask twice, get two different numbers.
Ungoverned Exposure
Traditional tools send raw table rows or sensitive metadata to external LLMs and execute unvetted, arbitrary SQL queries directly against internal databases.
Zero Audit & Lineage
No deterministic proof behind AI outputs. Enterprises cannot verify which concepts were read, which business rule ran, or prove compliance to auditors.
Enterprise-Grade Security Architecture
Built from the ground up to comply with strict central bank, fintech, and enterprise audit standards.
No Row Data to LLM
No table rows or query results ever reach the LLM. Metadata and value-list exposure are strictly governed per bundle and per AI provider.
User-Scoped Execution
Queries execute strictly using the end-user's DB credentials. The AI cannot access what the user lacks permissions for.
Git-backed Audit Lineage
Changes governed via Git branches and MR approvals. Every answer is deterministically tied to a specific bundle@sha.
Deployable 100% On-Premise
Deployable 100% air-gapped on-premise via Docker/Kubernetes with local LLM runners (vLLM/Ollama) or governed enterprise AI gateways.
Bring Governed AI to Your Enterprise Data
Schedule a technical deep dive and discover how CxDM makes enterprise Text-to-SQL auditable, safe, and reliable.