MySQL InnoDB table is the index organization table this should be the knowledge that every MySQL learner will learn first, which means that the data in this table is stored in the primary key order, that is, the btree leaf node stores all the data for that row.
I started with Oracle, the first time I contacted MySQL, the default engine was MyISAM. At that time, I saw that the company established all the InnoDB table in the first column plus a business-independent self-increment key, I think it is not necessary to ask some people to do so the meaning of the answer is also let people do not understand, in fact, also did not say fundamentally, just said that the efficiency will be better. So I generally do not use this form in the construction of the Data Warehouse project, most of the tables do not specify the primary key.
Actually now want to think, the person who first design those watches really is to MySQL InnoDB has studied, build table is very fastidious. So, what's btree like?
I drew a picture, but this figure is a bit problematic, the leaf node should be a doubly linked list, I only draw a one-way list. This also can be seen, all the values are stored in the leaf node, as for each page can put how much data, I have not textual research, if you know may wish to tell me. Often see this picture I think of my college days of blood years, every day to draw a binary tree to calculate the cost of traverse, when really young don't know sorrow taste ah. The blue squares here refer to pointers, and I don't distinguish between pointers to sub-pages and pointers to the next leaf page.
The basic data structure has been made clear, the next time to update the insert data and delete data, how to do.
MySQL InnoDB table--btree Basic data structure