Home > Database > Mysql Tutorial > body text

What are the options for datatables in PHP? What is a storage engine?

慕斯
Release: 2021-06-28 14:55:46
Original
2398 people have browsed it

We have learned so much about PHP, but I wonder what your options are for data tables in PHP? What is a storage engine? Have you fully mastered it? If not, then follow this article to continue learning

Table option list

The table option is when creating a table , the overall settings for the table mainly include the following: charset = the character encoding to be used.

engine = the storage engine to be used (also called table type),

auto_increment =Set the initial value of the auto-increment field of the current table, the default is 1comment='Some description text of the table'

Explanation;

1, set The character encoding is to be different from the database settings. If they are the same, there is no need to set them. Because it will automatically use database-level settings;

2, engine (storage engine) is a noun at the code level: InnoDB, MyIsam, BDB, archive, Memory.

What is a storage engine?

The storage engine is the "mechanism" that stores data on the hard disk. In fact, there are only a few mechanisms (as mentioned in the names above) and different storage engines. In fact, the storage mechanism is mainly designed from two major levels.

1, as fast as possible

2, as many functions as possible;

Choosing different storage engines is the "trade-off" of the above performance and functions.

What are the options for datatables in PHP? What is a storage engine?

Example demonstration:

#演示表选项语法:
create table tab_xuanxiang(
id int auto_increment primary key,name varchar(10),
age tinyint
charset = gbk,/*产当前效据库的字符编码是utF8*/engine = MyIsam,
auto_increment = 100o,comment ="说明文字...";
insert into tab_xuanxiang (id,name,age)values(null,'张三',11)
Copy after login

Related learning recommendations: mysql tutorial (video)

The above is the detailed content of What are the options for datatables in PHP? What is a storage engine?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template