Skip to main content

Design 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, MariaDB or OceanBase.

  • 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 (, ), 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

    tip

    The data table will be created in the target database.

  3. On the tab, user can start to visually design the table structure, and the system will automatically generate 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.
  • : The name of the custom table.
  • : Select the database under which the current table needs to be created. The default is the database right-clicked in step 2.
  • : Comments for the table, that is, the COMMENT attribute.
  1. Click , and in the window that pops up, click .

    tip

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