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.

Before you begin

  • 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), make sure your monthly or yearly subscription has not expired. An expired subscription may prevent you from using the Database DevOps service. Check the remaining quota and expiration date in the NineData Console header.

    check_quota

Procedure

Design the table structure when creating or editing a table in 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. NineData 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

    Run the generated SQL script in another database client when required.

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.