Generating SQL

Next, let's try generating SQL for the two tables we just created. Click on Tools and select Forward Engineer. Then, choose Create in the Playpen Database and PostgreSQL as the Database Type. You will also notice the Liquibase option, mentioned earlier as a version control tool for databases. Once you click on OK, you can see the SQL generated for PostgreSQL. The SQL generated will vary depending on the database we choose. The SQL generated for PostgreSQL and Liquibase XML generated is shown in the following screenshot:

Generating SQL

The XML generated is as follows:

Now let's connect to a database to create the tables.

Navigate to Connections |

Get PostgreSQL for Data Architects now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.