Data About Data
当创建一个Table时,DB Server会自动记录以下的信息
- Table name
- Table storage information (tablespace, initial size, etc.)
- Storage engine
- Column names
- Column data types
- Default column values
not nullcolumn constraints- PRIMARY KEY columns
- PRIMARY KEY names
- Name of primary key index
- Index Names
- Index types(B-tree, bitmap)
- Indexed columns
- Index column sort order (ascending or descending)
- Index storage information
- Foreign key name
- Foreign key columns
- Associated table/columns for foreign keys.
几种不同的Metadata存储方式
- 一堆VIEW
- 一系列系统存储的进程(system-stored procudures)
- 一个特殊的database
information_schema