Посібник:Структура бази даних
- Schema перенаправляє сюди; щоб отримати інформацію про простір назв Schema:, див. Extension:EventLogging , а про структуру extension.json, див. Manual:Extension.json/Schema .
↑ Посібник:Зміст | MediaWiki database layout | database_layout table |
The SQL code that creates the MySQL/MariaDB core tables for any MediaWiki version is in the maintenance/tables.json source file, which is then transformed into maintenance/tables-generated.sql.
До MediaWiki 1.35 код SQL, який створює основні таблиці $1 для будь-якої версії MediaWiki — з розширеними коментарями — міститься у вихідному файлі maintenance/tables.sql.
Up to MediaWiki 1.37 maintenance/tables.sql continued to be partially in use as some tables hadn't been migrated to maintenance/tables.json yet.
Найважливіші таблиці, мабуть, такі:
Історія версій
У наступній таблиці показано діапазон версій MediaWiki, у яких кожна таблиця існувала в схемі. Red rows indicate tables that are no longer used by the core nor added by the installer as of a particular version. They might however still be used by extensions. Note, table headings are repeated every 10 rows for clarity.
1.1 | 1.2 | 1.3 | 1.4 | 1.5 | 1.6 | 1.7 | 1.8 | 1.9 | 1.10 | 1.11 | 1.12 | 1.13 | 1.14 | 1.15 | 1.16 | 1.17 | 1.18 | 1.19 | 1.20 | 1.21 | 1.22 | 1.23 | 1.24 | 1.25 | 1.26 | 1.27 | 1.28 | 1.29 | 1.30 | 1.31 | 1.32 | 1.33 | 1.34 | 1.35 | 1.36 | 1.37 | 1.38 | 1.39 | 1.40 | 1.41 | 1.42 | master |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
actor | ||||||||||||||||||||||||||||||||||||||||||
archive | ||||||||||||||||||||||||||||||||||||||||||
block | ||||||||||||||||||||||||||||||||||||||||||
block_ | ||||||||||||||||||||||||||||||||||||||||||
blobs | ||||||||||||||||||||||||||||||||||||||||||
bot_ | ||||||||||||||||||||||||||||||||||||||||||
broken | ||||||||||||||||||||||||||||||||||||||||||
category | ||||||||||||||||||||||||||||||||||||||||||
category | ||||||||||||||||||||||||||||||||||||||||||
change_ | ||||||||||||||||||||||||||||||||||||||||||
1.1 | 1.2 | 1.3 | 1.4 | 1.5 | 1.6 | 1.7 | 1.8 | 1.9 | 1.10 | 1.11 | 1.12 | 1.13 | 1.14 | 1.15 | 1.16 | 1.17 | 1.18 | 1.19 | 1.20 | 1.21 | 1.22 | 1.23 | 1.24 | 1.25 | 1.26 | 1.27 | 1.28 | 1.29 | 1.30 | 1.31 | 1.32 | 1.33 | 1.34 | 1.35 | 1.36 | 1.37 | 1.38 | 1.39 | 1.40 | 1.41 | 1.42 | master |
change_ | ||||||||||||||||||||||||||||||||||||||||||
comment | ||||||||||||||||||||||||||||||||||||||||||
content | ||||||||||||||||||||||||||||||||||||||||||
content_ | ||||||||||||||||||||||||||||||||||||||||||
cur | ||||||||||||||||||||||||||||||||||||||||||
external | ||||||||||||||||||||||||||||||||||||||||||
external_ | ||||||||||||||||||||||||||||||||||||||||||
file | ||||||||||||||||||||||||||||||||||||||||||
hit | ||||||||||||||||||||||||||||||||||||||||||
image | ||||||||||||||||||||||||||||||||||||||||||
1.1 | 1.2 | 1.3 | 1.4 | 1.5 | 1.6 | 1.7 | 1.8 | 1.9 | 1.10 | 1.11 | 1.12 | 1.13 | 1.14 | 1.15 | 1.16 | 1.17 | 1.18 | 1.19 | 1.20 | 1.21 | 1.22 | 1.23 | 1.24 | 1.25 | 1.26 | 1.27 | 1.28 | 1.29 | 1.30 | 1.31 | 1.32 | 1.33 | 1.34 | 1.35 | 1.36 | 1.37 | 1.38 | 1.39 | 1.40 | 1.41 | 1.42 | master |
image | ||||||||||||||||||||||||||||||||||||||||||
image_ | ||||||||||||||||||||||||||||||||||||||||||
interwiki | ||||||||||||||||||||||||||||||||||||||||||
ip_changes | ||||||||||||||||||||||||||||||||||||||||||
ipblocks | ||||||||||||||||||||||||||||||||||||||||||
ipblocks_ | ||||||||||||||||||||||||||||||||||||||||||
ipblocks_ | ||||||||||||||||||||||||||||||||||||||||||
iwlinks | ||||||||||||||||||||||||||||||||||||||||||
job | ||||||||||||||||||||||||||||||||||||||||||
l10n_ | ||||||||||||||||||||||||||||||||||||||||||
1.1 | 1.2 | 1.3 | 1.4 | 1.5 | 1.6 | 1.7 | 1.8 | 1.9 | 1.10 | 1.11 | 1.12 | 1.13 | 1.14 | 1.15 | 1.16 | 1.17 | 1.18 | 1.19 | 1.20 | 1.21 | 1.22 | 1.23 | 1.24 | 1.25 | 1.26 | 1.27 | 1.28 | 1.29 | 1.30 | 1.31 | 1.32 | 1.33 | 1.34 | 1.35 | 1.36 | 1.37 | 1.38 | 1.39 | 1.40 | 1.41 | 1.42 | master |
langlinks | ||||||||||||||||||||||||||||||||||||||||||
links | ||||||||||||||||||||||||||||||||||||||||||
linkscc | ||||||||||||||||||||||||||||||||||||||||||
linktarget | ||||||||||||||||||||||||||||||||||||||||||
logging | ||||||||||||||||||||||||||||||||||||||||||
log_ | ||||||||||||||||||||||||||||||||||||||||||
math | ||||||||||||||||||||||||||||||||||||||||||
module_ | ||||||||||||||||||||||||||||||||||||||||||
msg_ | ||||||||||||||||||||||||||||||||||||||||||
msg_ | ||||||||||||||||||||||||||||||||||||||||||
1.1 | 1.2 | 1.3 | 1.4 | 1.5 | 1.6 | 1.7 | 1.8 | 1.9 | 1.10 | 1.11 | 1.12 | 1.13 | 1.14 | 1.15 | 1.16 | 1.17 | 1.18 | 1.19 | 1.20 | 1.21 | 1.22 | 1.23 | 1.24 | 1.25 | 1.26 | 1.27 | 1.28 | 1.29 | 1.30 | 1.31 | 1.32 | 1.33 | 1.34 | 1.35 | 1.36 | 1.37 | 1.38 | 1.39 | 1.40 | 1.41 | 1.42 | master |
object | ||||||||||||||||||||||||||||||||||||||||||
old | ||||||||||||||||||||||||||||||||||||||||||
oldimage | ||||||||||||||||||||||||||||||||||||||||||
page | ||||||||||||||||||||||||||||||||||||||||||
pagelinks | ||||||||||||||||||||||||||||||||||||||||||
page_ | ||||||||||||||||||||||||||||||||||||||||||
page_ | ||||||||||||||||||||||||||||||||||||||||||
profiling | ||||||||||||||||||||||||||||||||||||||||||
protected_ | ||||||||||||||||||||||||||||||||||||||||||
querycache | ||||||||||||||||||||||||||||||||||||||||||
1.1 | 1.2 | 1.3 | 1.4 | 1.5 | 1.6 | 1.7 | 1.8 | 1.9 | 1.10 | 1.11 | 1.12 | 1.13 | 1.14 | 1.15 | 1.16 | 1.17 | 1.18 | 1.19 | 1.20 | 1.21 | 1.22 | 1.23 | 1.24 | 1.25 | 1.26 | 1.27 | 1.28 | 1.29 | 1.30 | 1.31 | 1.32 | 1.33 | 1.34 | 1.35 | 1.36 | 1.37 | 1.38 | 1.39 | 1.40 | 1.41 | 1.42 | master |
querycachetwo | ||||||||||||||||||||||||||||||||||||||||||
querycache_ | ||||||||||||||||||||||||||||||||||||||||||
recentchanges | ||||||||||||||||||||||||||||||||||||||||||
redirect | ||||||||||||||||||||||||||||||||||||||||||
revision | ||||||||||||||||||||||||||||||||||||||||||
revision_ | ||||||||||||||||||||||||||||||||||||||||||
revision_ | ||||||||||||||||||||||||||||||||||||||||||
searchindex | ||||||||||||||||||||||||||||||||||||||||||
sites | ||||||||||||||||||||||||||||||||||||||||||
site_ | ||||||||||||||||||||||||||||||||||||||||||
1.1 | 1.2 | 1.3 | 1.4 | 1.5 | 1.6 | 1.7 | 1.8 | 1.9 | 1.10 | 1.11 | 1.12 | 1.13 | 1.14 | 1.15 | 1.16 | 1.17 | 1.18 | 1.19 | 1.20 | 1.21 | 1.22 | 1.23 | 1.24 | 1.25 | 1.26 | 1.27 | 1.28 | 1.29 | 1.30 | 1.31 | 1.32 | 1.33 | 1.34 | 1.35 | 1.36 | 1.37 | 1.38 | 1.39 | 1.40 | 1.41 | 1.42 | master |
site_ | ||||||||||||||||||||||||||||||||||||||||||
slots | ||||||||||||||||||||||||||||||||||||||||||
slot_ | ||||||||||||||||||||||||||||||||||||||||||
tag_ | ||||||||||||||||||||||||||||||||||||||||||
templatelinks | ||||||||||||||||||||||||||||||||||||||||||
text | ||||||||||||||||||||||||||||||||||||||||||
trackbacks | ||||||||||||||||||||||||||||||||||||||||||
transcache | ||||||||||||||||||||||||||||||||||||||||||
updatelog | ||||||||||||||||||||||||||||||||||||||||||
uploadstash | ||||||||||||||||||||||||||||||||||||||||||
1.1 | 1.2 | 1.3 | 1.4 | 1.5 | 1.6 | 1.7 | 1.8 | 1.9 | 1.10 | 1.11 | 1.12 | 1.13 | 1.14 | 1.15 | 1.16 | 1.17 | 1.18 | 1.19 | 1.20 | 1.21 | 1.22 | 1.23 | 1.24 | 1.25 | 1.26 | 1.27 | 1.28 | 1.29 | 1.30 | 1.31 | 1.32 | 1.33 | 1.34 | 1.35 | 1.36 | 1.37 | 1.38 | 1.39 | 1.40 | 1.41 | 1.42 | master |
user | ||||||||||||||||||||||||||||||||||||||||||
user_ | ||||||||||||||||||||||||||||||||||||||||||
user_ | ||||||||||||||||||||||||||||||||||||||||||
user_ | ||||||||||||||||||||||||||||||||||||||||||
user_ | ||||||||||||||||||||||||||||||||||||||||||
user_ | ||||||||||||||||||||||||||||||||||||||||||
user_ | ||||||||||||||||||||||||||||||||||||||||||
valid_ | ||||||||||||||||||||||||||||||||||||||||||
validate | ||||||||||||||||||||||||||||||||||||||||||
watchlist | ||||||||||||||||||||||||||||||||||||||||||
1.1 | 1.2 | 1.3 | 1.4 | 1.5 | 1.6 | 1.7 | 1.8 | 1.9 | 1.10 | 1.11 | 1.12 | 1.13 | 1.14 | 1.15 | 1.16 | 1.17 | 1.18 | 1.19 | 1.20 | 1.21 | 1.22 | 1.23 | 1.24 | 1.25 | 1.26 | 1.27 | 1.28 | 1.29 | 1.30 | 1.31 | 1.32 | 1.33 | 1.34 | 1.35 | 1.36 | 1.37 | 1.38 | 1.39 | 1.40 | 1.41 | 1.42 | master |
watchlist_expiry | ||||||||||||||||||||||||||||||||||||||||||
1.1 | 1.2 | 1.3 | 1.4 | 1.5 | 1.6 | 1.7 | 1.8 | 1.9 | 1.10 | 1.11 | 1.12 | 1.13 | 1.14 | 1.15 | 1.16 | 1.17 | 1.18 | 1.19 | 1.20 | 1.21 | 1.22 | 1.23 | 1.24 | 1.25 | 1.26 | 1.27 | 1.28 | 1.29 | 1.30 | 1.31 | 1.32 | 1.33 | 1.34 | 1.35 | 1.36 | 1.37 | 1.38 | 1.39 | 1.40 | 1.41 | 1.42 | master |
Системи керування базами даних
In MediaWiki master, tables.sql is currently being migrated to maintenance/tables.json, and documenting comments should be found there instead of the resultant SQL files.
Перегляньте найновіші версії Git, сумісні з MariaDB/MySQL: maintenance/tables.sql, maintenance/tables-generated.sql.
If using SQLite , the file maintenance/sqlite/tables-generated.sql and the unmigrated MySQL tables in maintenance/tables.sql should be viewed instead.
Якщо використовується PostgreSQL , замість цього слід переглянути файли maintenance/postgres/tables.sql і maintenance/postgres/tables-generated.sql.
У разі використання Microsoft SQL Server див. maintenance/mssql/tables.sql. (removed in 1.34)
У разі використання Oracle див. maintenance/oracle/tables.sql. (removed in 1.34)
Див. також
- Manual:Database access
- Proposed Database Schema Changes
- Database field prefixes
- Запити до бази даних (en)
- Developer hub
- Записи редагувань у базі даних
- Дослідження еволюції схеми бази даних MediaWiki
Інструкції до діаграми — документує, як оновлювати діаграму