Get the App
SLTechnology News&Howtos  ›  Development  › 

What are the design specifications of mysql table

Shulou Source: shulou.com Published: 2022-06-03 00:47:35 10月01日 Update

This article mainly introduces what are the design specifications of the mysql table. It is very detailed and has a certain reference value. Friends who are interested must read it!

1. The number of single instance tables must be controlled within 2000.

2. The number of sub-tables must be controlled within 1024.

3. The table must have a primary key. It is recommended to use UNSIGNED integers as the primary key.

Potential pit: delete the non-primary key table, if it is the master-slave schema of row mode, it will be hung in the library.

4. The use of foreign keys is prohibited. If integrity is to be guaranteed, it should be achieved through the application.

Example

Create table class (major varchar (16) comment 'professional', name char (8) comment 'class name', nums int comment 'number'); above is all the content of this article "what are the design specifications of mysql table". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Tags: Design content instance quantity article control specialty master and slave number value interest subtable integrity partner application suggestion integer more architecture Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Linux Docker Redmi OPPO Reno MySQL