Skip to main content

Data Modeling Overview

Use this page to understand the main building blocks of modeling in Wren AI and where to go next when you need to create models, views, or relationships.

What is a data model?

In Wren AI, a data model represents a table or entity from your connected source together with the metadata that helps both people and AI understand it. A good model gives Wren AI clearer names, relationships, keys, and business context so it can generate better SQL.

Models

Models are the core building blocks of Wren AI. They combine schema, metadata, relationships, calculated fields, and semantic context from your source tables so both users and Wren AI can understand what each entity means.

Views

Views are saved, virtual tables built from SQL generated in Wren AI. They do not store raw data themselves. Instead, they preserve a trusted result that can be reused later.

Wren AI includes a Save as view action in answer threads so you can turn useful results into reusable assets.

Entity Relationship Diagram (ERD)

On the Modeling page, Wren AI provides an entity relationship diagram that shows the schema of each model and the relationships between models. The diagram helps you distinguish between models and views based on block colors. Models are represented in blue, while views are depicted in green.

ERD