How to generate a DDL SQL script from the diagram?
One of the SqlDBM features is that you can generate the SQL Script that creates your database along with its objects since the diagram you created. Click on the Forward Engineer - Generate SQL Script icon (Figure 1) that is on the left bottom, and ensure to have your changes already saved (press the combination "CTRL" + "S" in case isn't saved yet, or click on Save button on the right top).
Figure 1. Forward Engineer - Generate SQL Script icon.
Select the tables to be created on the database as shown on the figure below.
Figure 2. Tables selection.
Then, go to the right side panel where you'll see the Generation Options panel (Figure 3). This panel allows you to select the database objects to be scripted. Notice that for each object, you could generate either his drop or create statement. Select the generate options desired, and save it.
Figure 3. Script generation options.
Once you saved your work, then click on the Generate SQL blue button that is on the middle of the grid. This will start the SQL process generation, and you'll have a script structure like the following:Figure 4. Script generated by SqlDBM Forward Engineer feature.
Notice there's three buttons on the top of this grid. These buttons are:
|Generate SQL||Generate SQL script.|
|Clear SQL||Clear SQL statements generated.|
|Copy Script||Copy the SQL script into your clipboard.|
Table 1. Buttons description.
The following animation show the process above.Animation 1. Generating a SQL script from the model created.
Customer support service by UserEcho