MySQL relational database
Why use relational database?
Transaction support
Structured data
Architecture
Data model
one
.frm
file per table: store table metadata, e.g. table definitiontable data is stored as a file in disk
in InnoDB engine, multiple tales can share a file(
.ibdata
), user can also config one table per file(.ibd
).
Index
store a file in disk, supported in Storage Engine layer
B+ Tree
Single and multiple columns index
Index in different storage engine
MyISAM stores address to data, i.e. index file and data file stored separately.
InnoDB stores data as index file. Secondary index refers to primary index.
Transaction
ACID
Redo/undo log
Reference
Last updated