Configuring a DDL Data Source
DDL data sources allow you to model structures of databases that do not yet exist or that you do not have access to.
A DDL data source is based on a data structure definition
specified in a
PhpStorm reads DDL statements from this file
and creates the corresponding structure in the new DDL data source.
DDL data sources can be used for various purposes. For example, if your target is to prepare a data source structure definition file to use in the future, you may need to check that it determines the correct data structure. You can also check whether the structure generated through your definition file is consistent with the target database. To do so, specify the JDBC data source that provides access to the target database as the parent data source.
PhpStorm provides various coding assistance for handling data structure definition files.
You can navigate from statements in a
.ddl file to the corresponding tables or columns in the
Database tool window.
Any changes made to the tables in the data source are reflected in the
You can create a data structure definition file manually, or copy it from another location, or generate it based on an entire configured data source or any table or column accessible through it.
DDL data sources only exist on the project level.
To configure a ddl data source from a data structure definition
- Start creating a new DDL data source.
- In the Data Sources and Drivers dialog, type the name of the new data source.
specify the desired data structure definition file.
PhpStorm parses the specified file according to the SQL dialect assigned to it or its parent. To have the data structure created successfully, this dialect should support DDL statements. SQL dialect settings are specified on the SQL Dialects page of the Settings dialog box.
- If necessary, select the data source parent from the list of available data sources.
- Click OK.
To navigate from a statements in a ddl file to the corresponding table or column
Open the desired
.ddlfile in the editor.
Position the cursor at the name of the desired table or column and press Alt+F1.
The corresponding column is highlighted in the Database tool window: