# EntityModel.com > EntityModel.com is a free, open-source (MIT) entity-relationship data modeling tool that runs in the browser at https://entitymodel.com with no account or install. It draws ER diagrams (crow's foot notation), keeps conceptual, logical and physical models as tabs of one model, imports SQL DDL, DBML and live database schemas, and exports SQL DDL (PostgreSQL, MySQL/MariaDB, Snowflake, Databricks), DBML, Mermaid, dbt schema.yml, ODCS data contracts, JSON Schema, Avro, PNG/SVG diagrams and PDF design documents. Models are single JSON files that also work with a zero-dependency CLI and an MCP server for AI agents such as Claude. Source code: https://github.com/ns-3e/entitymodeler ## Start here - [Documentation overview](https://entitymodel.com/docs/index.md): How to design entity-relationship data models with EntityModel.com, the free, open-source ERD tool that runs in your browser. Covers diagrams, SQL import and export, logical and physical models, design documents, the CLI and AI agents. - [Getting started](https://entitymodel.com/docs/getting-started.md): Create your first entity-relationship model in EntityModel.com in a few minutes. Open the site, add entities and relationships, then export a diagram or SQL. Also covers running it locally. - [Core concepts](https://entitymodel.com/docs/concepts.md): The building blocks of an EntityModel.com data model: entities, attributes, keys, reference entities, dependent references, structs, relationships, hierarchies, subject areas and diagram tabs. ## Guides - [SQL to ER diagram](https://entitymodel.com/docs/sql-to-er-diagram.md): Turn CREATE TABLE scripts from PostgreSQL, MySQL, Snowflake or Databricks, or a dbdiagram.io DBML file, into an editable entity-relationship diagram in your browser. Free, no upload, no account. - [Import from a database](https://entitymodel.com/docs/import-from-database.md): Reverse-engineer a Databricks Unity Catalog, Snowflake, PostgreSQL or MySQL schema into an EntityModel.com data model without sharing credentials, and track how the schema changes over time. - [Derive, compare and migrate tabs](https://entitymodel.com/docs/derive-compare-migrate.md): Keep conceptual, logical and physical data models as tabs of one EntityModel.com model. Derive one from another, compare any two, sync changes and generate ALTER/CREATE/DROP migration SQL. - [Reference data](https://entitymodel.com/docs/reference-data.md): Model reference data (code lists such as country, currency and status) as reference entities in EntityModel.com, load their values from CSV or Excel, and carry them into SQL inserts, dbt accepted_values tests and design documents. - [Export SQL DDL, DBML and Mermaid](https://entitymodel.com/docs/export-sql-ddl.md): Forward-engineer an EntityModel.com data model into CREATE TABLE scripts for PostgreSQL, MySQL/MariaDB, Snowflake or Databricks, a DBML file for dbdiagram.io, or a Mermaid erDiagram for READMEs. - [dbt and data contracts](https://entitymodel.com/docs/dbt-and-data-contracts.md): Generate a dbt schema.yml with not_null, unique, relationships and accepted_values tests, an Open Data Contract Standard (ODCS v3) contract, JSON Schema 2020-12 or Avro schemas from an EntityModel.com model. - [Diagrams and design documents](https://entitymodel.com/docs/design-documents.md): Export ER diagrams as PNG or SVG, produce a PDF data model design document, and copy data dictionary tables (entity catalog, attribute dictionary, reference data, relationships) into Google Docs, Word, Confluence or Markdown. - [Sharing, storage and offline use](https://entitymodel.com/docs/sharing-and-offline.md): How EntityModel.com stores models in your browser, shares them with links that never touch a server, works offline, installs as an app, and moves models between devices with the model file. - [Mappings, glossary and comments](https://entitymodel.com/docs/mappings-glossary-comments.md): Record source-to-target mappings and generate dbt model SQL, link entities and attributes to a shared business glossary, and review data models with comment threads in EntityModel.com. - [Naming standards and validation](https://entitymodel.com/docs/naming-standards-and-validation.md): EntityModel.com validates data models as you edit and enforces your naming standards per model kind (case, singular or plural, prefixes, key suffix, abbreviations, length, descriptions, PII review), with one-click fixes. - [Data models in Git](https://entitymodel.com/docs/data-models-in-git.md): Keep EntityModel.com model files in Git and review data model changes in pull requests, with a model diff, validation before and after, and migration SQL posted by a GitHub Action. - [AI data modeling with Claude and MCP](https://entitymodel.com/docs/ai-data-modeling.md): Use AI to design and change data models in EntityModel.com. Copy a prompt into Claude, use Ask Claude in the app, or connect any MCP agent. The agent proposes typed changes that you review and accept. ## Examples - [Example data models](https://entitymodel.com/docs/examples.md): Free example data models with ER diagrams, data dictionaries and SQL DDL — e-commerce, CRM, HR, library, hospital, university, SaaS billing, star schema and Data Vault. Open any of them in EntityModel.com and adapt it. - [E-commerce data model](https://entitymodel.com/docs/examples/ecommerce.md): An example e-commerce data model with ER diagram — customers, addresses, product categories, products, carts, orders, order lines, payments and shipments — with a data dictionary and PostgreSQL DDL you can open and adapt. - [CRM data model](https://entitymodel.com/docs/examples/crm.md): An example CRM (customer relationship management) data model with ER diagram — accounts and parent companies, contacts, leads, opportunities and pipeline stages, quoted products, activities and sales users — with SQL DDL. - [Human resources (HR) data model](https://entitymodel.com/docs/examples/human-resources.md): An example human resources data model with ER diagram — employees and reporting lines, departments, jobs and positions, employment history, salaries, leave requests and performance reviews — with a data dictionary and SQL DDL. - [Library management system data model](https://entitymodel.com/docs/examples/library-management.md): An example library management system data model with ER diagram — books, authors, publishers, physical copies at branches, members, loans, holds and fines — showing a many-to-many relationship, with SQL DDL. - [Hospital management system data model](https://entitymodel.com/docs/examples/hospital-management.md): An example hospital management data model with ER diagram — patients, doctors, departments, appointments, admissions, wards and beds, diagnoses, prescriptions, invoices and insurance — with a data dictionary and SQL DDL. - [Student enrollment (university) data model](https://entitymodel.com/docs/examples/student-enrollment.md): An example university student enrollment data model with ER diagram — students, programs, departments, courses and prerequisites, course sections in terms, instructors, enrollments and grades — with SQL DDL. - [SaaS subscription billing data model](https://entitymodel.com/docs/examples/saas-subscription.md): An example SaaS subscription billing data model with ER diagram — organizations and users, plans and prices, subscriptions and items, metered usage, invoices, invoice lines and payments — with SQL DDL you can adapt. - [Star schema example (retail sales)](https://entitymodel.com/docs/examples/star-schema.md): A worked star schema example for retail sales analytics — a sales fact table at order-line grain with date, product, store, customer (SCD type 2) and promotion dimensions — with ER diagram and SQL DDL. - [Data Vault 2.0 example](https://entitymodel.com/docs/examples/data-vault.md): A worked Data Vault 2.0 example — hubs for customer, product and order business keys, links for their relationships, and satellites for descriptive history — with ER diagram, hash keys and SQL DDL. ## Platforms - [Snowflake data modeling](https://entitymodel.com/docs/platforms/snowflake.md): Design Snowflake data models in your browser with EntityModel.com — free and open source. Reverse-engineer a Snowflake schema into an ER diagram, design logical and physical models, and generate Snowflake DDL, dbt tests and data contracts. - [Databricks data modeling](https://entitymodel.com/docs/platforms/databricks.md): Design Databricks and Unity Catalog data models with EntityModel.com — free and open source. Reverse-engineer Unity Catalog tables into an ER diagram and generate Delta table DDL with comments, constraints and PII tags. - [PostgreSQL ER diagram and schema design](https://entitymodel.com/docs/platforms/postgresql.md): Design PostgreSQL databases with a free, open-source ER diagram tool. Import a pg_dump schema or a live database into an ERD, design in the browser, and generate PostgreSQL DDL and migration SQL. ## Compare - [An open-source alternative to dbdiagram.io](https://entitymodel.com/docs/compare/dbdiagram-alternative.md): EntityModel.com is a free, MIT-licensed alternative to dbdiagram.io. It imports and exports DBML, keeps models private in your browser, and adds logical and physical models, reference data, dbt tests and design documents. - [A free alternative to erwin Data Modeler](https://entitymodel.com/docs/compare/erwin-alternative.md): EntityModel.com is a free, open-source, browser-based alternative to erwin Data Modeler for logical and physical modeling, forward and reverse engineering, model compare with migration SQL, naming standards and design documents. - [A free alternative to Lucidchart for ER diagrams](https://entitymodel.com/docs/compare/lucidchart-alternative.md): For entity-relationship diagrams, EntityModel.com is a free, open-source alternative to Lucidchart built for data modeling — typed attributes, keys, validation, SQL import and DDL export — with no document limits or account. ## Reference - [Command-line tool (em)](https://entitymodel.com/docs/cli.md): Reference for bin/em.mjs, EntityModel.com's zero-dependency command-line tool. Validate models, export SQL, dbt and docs, import DDL, load reference values, derive tabs, diff, migrate, review and pull live schemas. - [Model file format](https://entitymodel.com/docs/model-format.md): The complete JSON format of an EntityModel.com model file — entities, attributes, reference values, structs, relationships, hierarchies, tabs, mappings, glossary terms, comments and naming standards. - [Keyboard shortcuts](https://entitymodel.com/docs/keyboard-shortcuts.md): Every keyboard shortcut in the EntityModel.com diagram editor — adding entities, drawing relationships, selecting, hiding, copying across tabs, undo, the command palette and more. ## Learn - [What is an ER diagram?](https://entitymodel.com/docs/learn/what-is-an-er-diagram.md): An entity-relationship (ER) diagram shows the things a system stores data about, their attributes, and how they relate. Learn the parts of an ERD, cardinality, crow's foot notation and how to read one, with examples. - [Conceptual, logical and physical data models](https://entitymodel.com/docs/learn/conceptual-logical-physical-data-models.md): The three levels of data modeling explained. What conceptual, logical and physical data models contain, who they are for, how they differ, and how to move from one to the next. - [Free and open-source data modeling tools](https://entitymodel.com/docs/learn/free-open-source-data-modeling-tools.md): A practical guide to free and open-source data modeling and ER diagram tools — browser-based ERD editors, diagrams-as-code, database IDEs and desktop modelers — and how to choose between them. - [How to design a data model](https://entitymodel.com/docs/learn/how-to-design-a-data-model.md): A practical, step-by-step method for designing a data model, from gathering requirements and naming entities to keys, relationships, reference data, normalization, naming standards, review and generating the database. - [Data modeling glossary](https://entitymodel.com/docs/learn/data-modeling-glossary.md): Plain-language definitions of common data modeling terms, from attribute, cardinality and crow's foot notation to normalization, surrogate keys, junction tables, reference data, data contracts and slowly changing dimensions. ## Optional - [Full documentation in one file](https://entitymodel.com/llms-full.txt): every page above, concatenated - [Source code and README](https://github.com/ns-3e/entitymodeler)