Data models are fundamental to almost every data platform. Yet, in many organizations, maintaining them remains a surprisingly manual process.
Database structures are defined in SQL scripts, ER diagrams are maintained in separate modeling tools, technical documentation lives in Word or Confluence, and business definitions are scattered across spreadsheets.
The result?
- Documentation that quickly becomes outdated
- Inconsistent naming conventions across projects
- Duplicate effort maintaining the same information in multiple places
- A lack of synchronization between logical models and physical database structures
What if you could define your data model just once and automatically generate all these assets?
That's the idea behind DataLexicon.
Introducing DataLexicon: Data Modeling as Code
DataLexicon is a lightweight, model-driven data modeling tool designed for data engineers, data analysts and data architects.
Instead of maintaining data models in proprietary modeling tools, DataLexicon uses simple, human-readable YAML files as the foundation of your data architecture.
Your models become version-controlled assets that can live alongside your application code and participate in your existing development workflows.
From a single logical model, DataLexicon can generate:
- Database-ready SQL DDL scripts
- Entity Relationship (ER) diagrams
- Technical documentation in HTML
- Business glossaries and definitions
- Consistent naming conventions and abbreviations
The objective is simple: one source of truth for your data models.
1. Define your data models using YAML
YAML provides a straightforward way to describe entities, attributes and relationships without being tied to a particular database platform.
For example, consider a simple Customer entity:
entity: Customer
description: Customer master data
attributes:
- name: CustomerId
type: identifier
required: true
primary_key: true
- name: CustomerName
type: text
This definition describes the logical structure of your entity without immediately worrying about database-specific implementation details.
Because the model is stored as a regular text file, it can easily be reviewed, version-controlled and maintained in Git.
2. Generate SQL for multiple database platforms
One of the biggest advantages of model-driven development is separating logical data definitions from physical database implementations.
With DataLexicon, you can generate database-ready DDL scripts for:
- Oracle
- PostgreSQL
- Microsoft SQL Server
- Snowflake
Rather than manually translating logical models into different database dialects, you maintain the model once and let DataLexicon generate the corresponding SQL.
datalexicon build .
The generated SQL scripts are placed in the target directory, ready for review and integration into your database deployment workflow.
3. Keep naming conventions and business definitions consistent
A data model is more than a collection of tables and columns.
Consistent naming conventions, abbreviations and business definitions are essential for building understandable and maintainable data platforms.
DataLexicon allows you to maintain these standards alongside your models.
For example:
naming:
primary_key:
prefix: PK_
foreign_key:
prefix: FK_
You can also maintain centralized abbreviation lists and business glossaries.
This helps teams establish consistent standards across projects instead of relying on individual developers to remember naming rules.
4. Generate documentation and ER diagrams automatically
Keeping technical documentation synchronized with database implementations is a recurring challenge.
DataLexicon addresses this by generating documentation directly from your logical models.
Simply execute:
datalexicon docs .
DataLexicon generates HTML documentation containing:
- Entity definitions
- Attribute descriptions
- Relationships
- Generated SQL
- Entity Relationship diagrams
Whenever your models change, you can regenerate the documentation to reflect the latest definitions.
No separate documentation process is required.
5. Integrate data modeling into your development workflow
DataLexicon is designed to fit into existing development environments rather than introducing another standalone modeling ecosystem.
It includes:
- A command-line interface for automated model generation
- A Visual Studio Code extension for working directly within your development environment
- Git-friendly YAML model definitions
- Docker support for containerized execution
This makes it possible to incorporate data modeling into CI/CD pipelines and existing development practices
For example, models can be validated as part of your development workflow:
datalexicon validate models/customer.yaml
Validation checks the model, generated SQL and applicable naming and abbreviation standards.
Get started with DataLexicon
You don't need a complex modeling environment to start treating your data models as code.
DataLexicon offers a free 30-day trial, allowing you to explore its capabilities before choosing a license.
Getting started is straightforward:
- Download the CLI for Windows, Linux or macOS. You can also use the official Docker image via (Docker Hub) or the Visual Studio Code extension.
- Initialize a project using datalexicon init my-project.
- Define your logical models using YAML.
- Generate SQL, documentation and ER diagrams.
Interested to learn more? Visit our NVISION DATA - Data Lexicon

Top comments (0)