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 .ddl file. 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 .ddl file.
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.
- Open the desired .ddl file in the editor.
Position the cursor at the name of the desired table or column and press Alt+F1Shift+Alt+1 or Alt+F1Shift+Alt+1Alt+F1Alt+F1Alt+F1Ctrl+Shift+1, Ctrl+Shift+2, Ctrl+Shift+3 or Ctrl+Shift+9Alt+F1Alt F1Alt F1Alt Command W.
The corresponding column is highlighted in the Database tool window: