Database
1. Table Structure
- acl
- auth_token
- cache
- category
- category_assignment
- config
- external_link
- file
- file_link
- log
- menu
- page
- page_link
- referrer
- revision
- user
- user_setting
- usergroup
- usergroup_member
- watch
1.1. Access MySQL via command line
mysql -h 127.0.0.1 -P 3306 -u root -p <database>
mysql> DESCRIBE table_name;
1.2. Database Diagram
3 of 3 Files accessible from this page /Dev / Release / R 6.1 / Database:
a_schematic_of_wackowiki_r6.1_database_structure.png | table structure of WackoWiki R6.1 database | 88.0 KiB | 17.08.2023 09:44 | |
a_schematic_of_wackowiki_r6.1_database_structure.svg | table structure of WackoWiki R6.1 database | 623.2 KiB | 17.08.2023 09:42 | |
wackowiki_6.1.mwb | MySQL Workbench 8.0 file for WackoWiki R6.1 | 27.3 KiB | 17.08.2023 09:42 |
1.3. Database Script
1.4. Performance
Indexes
- Ensure indexes on columns used in WHERE, ON, GROUP BY clauses
- Always ensure JOIN conditions are indexed (and have identical data types)
- Be careful of the column order
- If you don't pick a primary key (bad idea!), one will be created for you -> And, you have no control over the key
1.5. Naming
Use singular for table names, e.g. “page” not “pages”
A table structure describes a specific entity