PostgreSQL database modeling

In Moon Modeler you can easily draw database structures for PostgreSQL. Many PostgreSQL specifics are supported, including visual definition of composite types or JSON objects. Let's start with the basics.

Database tables

Database tables are displayed as graphical boxes with all table columns. In the example below you will see table cart with three table columns: id, customer_id and items.

JSON

One of the main advantages of Moon Modeler is the possibility to visually display nested structures.
The structures are displayed inside tables and also as separate graphical objects. Modifications made to JSON structures are automatically propagated to all table columns where the JSON structure is used.

JSON object defined in PostgreSQL project

See the item JSON structure. It is used in table cart in column items.

JSON in PostgreSQL ERD

If you wish to see that the content of the JSON is an array of documents, turn the Array switch on.

Array definition

One JSON can appear inside another JSON. See table customer. The table contains column contact of datatype contact (JSON object named contact).
Inside the contact JSON object, you can find another JSON structure - address.

JSON in PostgreSQL database design

 

 # The end of the PostgreSQL database modeling page

Copyright: 2020 Datensen. All rights reserved.
This website uses cookies to ensure you get the best experience on our website.