SQL Review Guide

An online tool for DBA to generate the SQL review / DDL guideline.

Database Review Guide

Database

  • Error

    Prohibit deleting non-empty database

    Deletion is only allowed when there are no tables in the database, which can greatly avoid accidental deletion. Suggested error level: Error

System

  • Error

    Allowable list of Charset

    The character set determines which characters can be stored in the table. Using the wrong character set may result in certain characters in the application being unable to be stored and displayed correctly, such as CJK and Emoji. Suggested error level: Error

    Allow list: utf8mb4
  • Error

    Allowable list of Collation

    The collation determines the rules for character comparison and sorting. For example, when using a case-insensitive collation, "ABC" and "abc" will be treated as the same string in queries. Suggested error level: Error

    Allow list: utf8mb4_0900_ai_ci
  • Warning

    Restrict the length of comments

    Maximum comment length: 64

Column

  • Warning

    Enforce the inclusion of specific columns in a table

    Some common columns are helpful for better application maintenance. For example, adding a business-independent "ID" column as the primary key avoids primary key conflicts caused by business changes (such as business mergers), and in some scenarios can also bring better data insertion performance. Suggested error level: Warning

    Required column names: id, created_ts, updated_ts, creator_id, updater_id