O'Reilly logo

PostgreSQL for Data Architects by Jayadevan Maymala

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 |

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required