Learning materials

www.bilibili.com/video/BV1NJ…

The column type of the database

Integer: int

Floating-point numbers in the form of decimal strings, which solve precision loss problems

Char The character string contains 0 to 255 characters of fixed size

Vachar The variable value ranges from 0 to 65535

Text Text string 2 to the 16th power -1

Date Date format

Time Time format

Datetime Indicates the common time format

Timestamp timestamp

During the year

Field properties of the database

Unsigned: an Unsigned integer. The column cannot be negative

Zerofill: 0 fill, insufficient bits, filled with 0

Increment: Must be an integer and is generally used for the primary key of a table

Non-empty: An error will be reported if the value is not entered

Type of data table

MYISAM before (5.5) INNODB
Transaction support Does not support support
Row lock Does not support support
Outside the building constraints Does not support support
The full text indexing support Does not support
The size of the tablespace smaller Larger, about twice as large

Conclusion:

  • MYISAM saves space and is faster
  • INNODB has high security, transaction processing, multi-table multi-user operation