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.
Edit an existing rule set to add a rule for checking table headers.
Specify the fields that you want to include in new tables, such as the id and gmt_cerate fields in this example.
Save the rule settings. By default, the rule is in the disabled state.
Enable the rule. Before that, you must re-confirm the rule. Then, the rule takes effects.
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.