Extract and Analyse a Data Model via DDL Files

When direct database access is unavailable — due to security restrictions, network limitations, or infrastructure constraints — the data model can still be analysed in Visual Expert using DDL (Data Definition Language) files.

These files, generated by a DBA or exported from the database management system, contain the structural definitions of database objects: tables, views, indexes… By importing them into Visual Expert, the tool reconstructs the schema and integrates it into the project analysis, allowing teams to document data structures and their relationships without a direct database connection.

How to Import DDL Files into Visual Expert

Step 1: Generate the DDL Files

Create text files containing the DDL statements that define the structure of the database. These files typically include statements such as:

  • CREATE TABLE
  • CREATE INDEX
  • CREATE VIEW
  • Other database object definitions

In some cases, these scripts may already exist as part of the project resources. If not, a Database Administrator (DBA) can generate them directly from the database.

Step 2: Store the DDL Files in a Folder

Once the scripts are generated, place all the DDL files in a folder that is accessible by Visual Expert. This folder will be used as the source from which Visual Expert reads and analyses the database object definitions.

Step 3: Add a New Source to the Visual Expert Project

You must add the folder containing the DDL files as a new source of code in your Visual Expert project.

To do this:

  • Open Project Settings in Visual Expert.
  • Navigate to the Source code section.
  • Click Add Source.
  • Select the language of the code you wish to analyse.
  • Select the folder containing the DDL files.

For quick reference on adding a source, see the articles below:

Step 4: Select the Appropriate Source Type

When adding the source, choose the source type according to the database used by the application:

  • For Oracle or PostgreSQL databases, add an Oracle source.
  • For all other databases, add an SQL Server source.

This allows Visual Expert to correctly interpret the database definitions contained in the DDL files.

Step 5: Declare the Dependency with the Application Source

You must declare a dependency between the application source code and the database source so that Visual Expert can link the database objects with the application.

To configure this:

  • Open Project Settings.
  • Go to the Application Dependencies tab.
  • Declare a dependency from the application source to the new source containing the database objects.

For more guidelines on adding source code and dependencies, refer to: Define Cross-Application Dependencies.

After completing these steps, run the project analysis so Visual Expert can parse the DDL files and integrate the database objects into the project documentation and analysis.

Important Notes

  • Ensure DDL completeness
    The DDL files should include the definitions of the main database objects such as tables, views, and indexes so that Visual Expert can correctly reconstruct the data model.
  • Use clean and valid SQL scripts
    Ensure that the DDL files do not contain incomplete statements or database-specific commands that could prevent Visual Expert from parsing the scripts correctly.
  • Organize scripts properly
    If multiple scripts are used, store them in a well-structured folder. This keeps the database objects organized and makes maintenance easier.
  • Declare dependencies correctly
    Declaring the dependency between the application source and the database source is essential for Visual Expert to identify interactions between the code and database objects.
  • Verify analysis results
    After running the project analysis, review the detected database objects to ensure that the tables, views, and other elements have been correctly imported.

 

More from Visual Expert Code Analysis