All Products
Search
Document Center

Schema design specifications Guarantee the existence of fields

Last Updated: Jul 02, 2020

Schema design rules may be unique for each enterprise and even for each business line in an enterprise. You can configure schema design rules by choosing System Management > Security > Security Rules in the Data Management Service (DMS) console. You can configure most rules that you want and apply them to your business database instances as required.

In business scenarios, a common requirement is that new tables must contain some specific fields. For example, new tables must contain the gmt_create column that stores the time when the data was created and the id column that is an auto-increment primary key.

This topic describes how to set security rules to guarantee the existence of some specified fields in new tables.

Procedure

  1. Edit an existing rule set to add a rule for checking table headers.
    add rules

  2. Specify the fields that you want to include in new tables, such as the id and gmt_cerate fields in this example.

  3. Save the rule settings. By default, the rule is in the disabled state.

  4. Enable the rule. Before that, you must re-confirm the rule. Then, the rule takes effects.

  5. Apply this rule to data research and development, such as creating tables and importing SQL statements for table creation.

To perform operations from steps 1 to 4, you must be a DMS administrator or an administrator of target databases. Operations in step 5 are available for daily data research and development.
For more information, see Schema design.