The duration of this section needs to be controlled 5 Within minutes
The storage engine determines the type of table , The data stored in the table should have different types , Each data type has its own width , But the width is optional
A detailed reference :
mysql Overview of common data types
#1\. Numbers :
integer :tinyinit int bigint
decimal :
float : Imprecise in the case of short digits
double : Imprecise in the case of long digits
0.000001230123123123
Deposit :0.000001230000
decimal:( If you use a decimal , Use the recommended decimal)
accurate
The internal principle is to store in string form
#2\. character string :
char(10): Simple and crude , Waste space , Fast access
root Deposit root000000
varchar: accurate , Save a space , Slow access
sql Optimize : Create table time , Put the fixed length type forward , Put it back longer
Like gender Such as address or description information
>255 Characters , If it is over, the file path will be stored in the database .
Such as the picture , Video etc. find a file server , Only paths or url.
#3\. Time type :
The most commonly used :datetime
#4\. Enumeration type and collection type