What are the options and storage engine of the data table in PHP?
This article mainly explains "what are the options and storage engine of data table in PHP". The explanation in this article is simple and clear, easy to learn and understand. Please follow the editor's train of thought to study and learn "what are the options and storage engine of data table in PHP".
List of table options
The table option is that when you create a table, the overall settings for the table are as follows: charset = the character encoding to be used.
Engine = Storage engine to be used (also known as table type)
Auto_increment= sets the initial value of the self-growing field of the current table. The default is 1 commentaries' some description text of the table'
Description
The character encoding is set to be different from that set in the database. If it is the same, there is no need to set it. Because it automatically uses database-level settings
2 InnoDB,MyIsam 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" for storing data to the hard disk. In fact, there are only several mechanisms (as described in the name above), and different storage engines are mainly designed from two major levels.
1, as fast as possible
2, as many functions as possible
The choice of different storage engines is the "tradeoff" between the above performance and functionality.
Example demonstration:
# demonstration table option syntax: create table tab_xuanxiang (id int auto_increment primary key,name varchar (10), age tinyintcharset = gbk,/*) the character encoding of the current reference library is utF8*/engine = MyIsam,auto_increment = 100ostatement comment = "description text." Insert into tab_xuanxiang (id,name,age) values (null,' Zhang San', 11) Thank you for your reading, these are the contents of "what are the options and storage engines for data tables in PHP". After the study of this article, I believe you have a deeper understanding of what the options and storage engines for data tables in PHP are, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!