Skip to main content

Design MySQL Table Structures

NineData provides a visual designer for MySQL table structures in the SQL Console. Use it to configure columns, indexes, constraints, partitions, and table options while NineData generates the SQL script automatically.

Prerequisites

  • The target data source is MySQL.

  • In Organizational mode, you have access to the SQL Console module.

  • In Organizational mode, you have read and write permissions on the target data source.

    tip

    If you do not have these permissions, contact your organization's system administrator to configure permissions or bind roles.

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

    check_quota

Procedure

You can design the table structure when creating or editing a table in the SQL Console. This procedure uses table creation as an example.

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

  2. In the database list in the SQL Console, right-click the target database and click Create Table.

    create_table

    tip

    NineData creates the table in the target database.

  3. On the Create Table tab, design the table structure visually. The system automatically generates SQL Script at the bottom of the page based on your configuration. For details about each part of the designer, select the corresponding tab below.

    table_creation

  • Name: Enter a custom table name.
  • Database: Select the database where the table is created. The default value is the database you right-clicked in step 2.
  • Comment: Table comment, which is written as the COMMENT attribute.
  1. Click Save, and in the Submit window that appears, click OK.

    tip

    You can run the generated SQL script in another database client.

Result

NineData creates the MySQL table in the selected database and keeps the generated SQL script available for review or reuse in another database client.