Database Settings

The settings dialog has to tabs: for DbSchema Interface and for Database Specific settings. Databases are customizable, so it is relative easy to add a new database to the known list.
DbSchema Settings per Database

Tip about setting description Read the setting description just below the setting title.

Most Important Settings

In the Interface tab, the most notable settings are:
  • Reverse Engineer / Log DDL statements Few databases do reverse engineer the schema by parsing the schema DDL. Enabling this you can see the DDL in the Help / output logs.
  • Reverse Engineer / Read Only Connection Will block the schema modification and data modification in DbSchema.
In the Database Specific tab, the most notable settings are:
  • SQL / Create Table Statement You can configure the statements issued by DbSchema to create or modify tables, columns, indexes, and fks. The statements are using Groovy expressions, which make possible to add logic inside the statements.
  • Data Types The data types are configurable per database.

Data Type Settings

Here we can edit, add or remove different data types, with their information:
  • Data type is the name of the data type in the database
  • Java type mapping . As a convention, Java defines a common list of data types for all databases. If is possible, each database data type should map to one of this Java standard types. If you convert the model to a different database, this information will be used for better matching the types.
  • Precision can be
    • LENGTH if the data type specifies a length. For example name VARCHAR( 100 ), 100 is the maximum length the column name may have. The definition here says the VARCHAR data type should always specify a maximum length of the data.
    • PRECISION same as LENGTH for numbers. Sample: NUMBER( 4 ) may be maximal 9999
    • DECIMAL specifies for numbers the maximal number of digits before and after the comma. Sample: NUMBER( 4,2 ) can have the value 23,12
    • ENUMERATION is a list of values the data may take.
    • NONE if the data type needs no specification for length or decimal. Like INTEGER.

SQL Language

Tables, columns and foreign keys are created and modified using SQL Alter Table commands. They are customizable, so you can fix yourself possible errors. Please inform us as well about incompatibilities. The correct statements can be usually found on the database website or documentation.

The statements are using Groovy variables, defined like ${variable}. Another possibility is to use code <% code %> Search in Google for 'Google templates' to see various example. You can see them also in the Settings dialog, by different databases.

Under 'Formatting' there are settings for letter case sensitivity. Many databases does convert table and column names to uppercase or lowercase. MySql uses lowercases, Oracle uppercases. If you want to avoid this you may add quotes to the table or column names. DbSchema converts from the names to uppercase or lowercase directly in the table and column dialog, so you can see them as they will be in the database.

Reverse Engineer Settings

DbSchema trust the JDBC driver to get the table, columns and foreign keys information from the database. We use custom queries only for triggers, procedures and functions, as they are not listed by the JDBC driver. This job is not always easy and the procedures are not always reversed correctly for all databases. Please let us know if you know any fix to this queries. We plan to introduce groovy language for this settings, so we can have a better logic at this level.

This queries are usually returning few standard columns, like schema name, function/trigger/procedure name and source code text.