Skip to main content

Designing PostgreSQL Table Structure

NineData offers a visual table structure design solution. You can complete the design of the table structure by clicking the mouse in the SQL Console, without having to manually enter SQL commands.

Prerequisites

  • The data source type is PostgreSQL.

  • In organization mode, you have the permission for the SQL Console function module.

  • In organization mode, you have read and write permissions for the target data source.

    tip

    If you do not have the above permissions, please contact the system administrator of your organization to configure permissions or bind roles for you.

  • In the commercial versions (, ), please ensure that your monthly/yearly subscription is not expired, as it may result in the inability to use the Database DevOpsservice. You can quickly check the remaining quota and expiration date at the top right corner of the NineData console page.

    check_quota

Operation Steps

You can design the table structure when creating or editing a table through the SQL Console. This article demonstrates with the example of creating a table.

  1. Open the SQL console and go to the target data source.

  2. In the database list on the left side of the SQL Console, right-click the target database, Schema, or any data table, and click .

    tip

    The object you right-click is different, the differences are as follows:

    • Database: The table will be created in a Schema named public by default.
    • Schema: The table will be created in this Schema by default.
    • Data table: The table will be created in the Schema where this data table belongs by default.
  3. In the tab, you can start designing the table structure in a visual way. The system will automatically generate at the bottom of the page based on your configuration. For details of the structure design page, please select the corresponding tab below and view.

Click to expand the complete visual table structure parameter description
  • : Customize the name of the table.
  • : Select which database the current table needs to be created under.
  • Schema: Select which Schema the current table needs to be created under.
  • : Comment on the table.
  1. Click , and in the pop-up window, click .

    tip

    You can also copy the SQL script and manually execute it in other database clients.