Skip to content

Import SQL

Use SQL import when you already have DDL and want to bring that schema into DBModeler instead of rebuilding it by hand.

Import is useful when you want to:

  • bootstrap a diagram from an existing database definition
  • compare imported structure against planned changes
  • continue modeling in DBModeler after a SQL-first start

The import flow accepts raw SQL text or a file upload.

DBModeler focuses on schema-oriented DDL such as table, column, and constraint definitions.

Import runs through a parser and normalizer pipeline before changes are applied.

The preview helps you inspect:

  • detected tables
  • detected fields
  • relationships and constraints
  • warnings for unsupported or ambiguous constructs

This step is important because imported SQL can contain engine-specific syntax that does not map perfectly to the DBModeler catalog.

During import, DBModeler maps SQL type expressions back to canonical type IDs where possible.

Examples include:

  • alias normalization
  • fallback mapping for engine-native spellings
  • degraded handling when a type has no direct modeled equivalent

If the imported type is unusual or highly vendor-specific, review the result in the field editor after import.

After the preview looks correct, apply the import to the current diagram.

Depending on the import flow, you may be able to limit the scope and bring in only the structures you want.

  • Stored procedures and broader database logic are outside the core import target.
  • Comments and non-DDL constructs may be ignored.
  • Unsupported foreign-key actions can be reduced to a safe fallback instead of imported verbatim.
  • Semantic issues still need validation after the model is applied.

After importing:

  1. review table and field properties
  2. inspect relationship actions
  3. run SQL preview
  4. create a version checkpoint

Next: Versions and Migrations