Skip to main content

Designing MySQL table structure

NineData provides a visual table structure design solution. User can click the mouse in the SQL console to complete the table structure design without manually entering SQL commands.

Prerequisite

  • Database is MySQL.

  • In Organizational mode, user has the SQL console function module authority.

  • In Organizational mode, user has read and write permissions to the target data source.

    tip

    If user do not have the above permissions, please contact 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 DevOpsservice. You can quickly check the remaining quota and expiration date at the top right corner of the NineData console page.

    check_quota

Steps

User can design the table structure when creating or editing a table through the SQL console. This article takes creating a table as an example to demonstrate.

  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 and click Create Table .

    create_table

    tip

    The data table will be created in the target database.

  3. On the Create Table tab, user can start to visually design the table structure, and the system will automatically generate SQL Script at the bottom of the page according to the configuration. For details of the variable structure design page, please select the corresponding tab below and view it.

    table_creation

Click to expand the full visual parameter description of the table structure.
  • **Name**: The name of the custom table.
  • **Database**: Select the database under which the current table needs to be created. The default is the database right-clicked in step 2.
  • **Comment**: Comments for the table, that is, the COMMENT attribute.
  1. Click Save , and in the Submit window that pops up, click OK .

    tip

    SQL scripts can be used to perform in other database clients.