手册:数据库布局

From MediaWiki.org
Jump to: navigation, search
This page is a translated version of the page Manual:Database layout and the translation is 60% complete.

Other languages:
العربية • ‎Deutsch • ‎English • ‎español • ‎suomi • ‎français • ‎Bahasa Indonesia • ‎italiano • ‎日本語 • ‎lietuvių • ‎Nederlands • ‎polski • ‎português • ‎português do Brasil • ‎русский • ‎slovenčina • ‎українська • ‎中文
Schema redirects here; for information about the Schema: namespace, see Extension:EventLoggingExtension:EventLogging.
Tables redirects here; for information about wikitext table syntax, see Help:表格Help:Tables.


手册:目录Manual:Contents MediaWiki数据库布局Manual:Database layout database layout/zh


(文件描述页)

为任何MediaWiki版本创建MySQL/MariaDBManual:MySQL核心表的SQL代码——以及大量注释——可在maintenance/tables.sql源文件中找到。比较重要的表可能是pageManual:page tablerevisionManual:revision tabletextManual:text table以及userManual:user table

版本历史[edit]

The following table depicts the range of MediaWiki versions over which each table has existed in the schema. 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.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 master
archiveManual:archive table
  blobsManual:blobs table  
  bot_passwordsManual:bot_passwords table
brokenlinksManual:brokenlinks table  
  categoryManual:category table
  categorylinksManual:categorylinks table
  change_tagManual:change_tag table
curManual:cur table  
  externallinksManual:externallinks table
  external_userManual:external_user table  
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 master
  filearchiveManual:filearchive table
hitcounterManual:hitcounter table  
imageManual:image table
imagelinksManual:imagelinks table
interwikiManual:interwiki table
  ip_changesManual:ip_changes table
ipblocksManual:ipblocks table
  ipblocks_old  
iwlinksManual:iwlinks table
  jobManual:job table
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 master
  l10n_cacheManual:l10n_cache table
  langlinksManual:langlinks table
linksManual:links table  
linksccManual:linkscc table  
  loggingManual:logging table
  log_searchManual:log_search table
mathManual:math table  
  module_depsManual:module_deps table
  msg_resource_linksManual:msg_resource_links table  
  msg_resource_linksManual:msg_resource_links table  
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 master
  objectcacheManual:objectcache table
oldManual:old table  
oldimageManual:oldimage table
  pageManual:page table
  pagelinksManual:pagelinks table
  page_propsManual:page_props table
  page_restrictionsManual:page_restrictions table
  protected_titlesManual:protected_titles table
  querycacheManual:querycache table
  querycachetwoManual:querycachetwo table
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 master
  querycache_infoManual:querycache_info table
  recentchangesManual:recentchanges table
  redirectManual:redirect table
  revisionManual:revision table
searchindexManual:searchindex table
  sitesManual:sites table
  site_identifiersManual:site_identifiers table
site_statsManual:site_stats table
  tag_summaryManual:tag summary table
  templatelinksManual:templatelinks table
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 master
  textManual:text table
  trackbacksManual:trackbacks table  
  transcacheManual:transcache table
  updatelogManual:updatelog table
  uploadstashManual:uploadstash table
userManual:user table
  user_former_groupsManual:user_former_groups table
  user_groupsManual:user_groups table
user_newtalkManual:user_newtalk table
  user_propertiesManual:user_properties table
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 master
  user_rightsManual:user_rights table  
  valid_tagManual:valid tag table
  validateManual:validate table  
watchlistManual:watchlist table
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 master

数据库管理系统[edit]

从Git中查看最新的MariaDB/MySQL兼容版本:maintenance/tables.sql

If using PostgreSQLManual:PostgreSQL, the file maintenance/postgres/tables.sql should be viewed instead.

如需使用Microsoft SQL Server,请参考maintenance/mssql/tables.sql

如需使用Oracle,请参考maintenance/oracle/tables.sql

参见[edit]

数据库Manual:Database layout 引擎: MySQL/MariaDBManual:MySQL手册:OracleManual:Oracle手册:PostgreSQLManual:PostgreSQL手册:SQLiteManual:SQLiteSQL ServerManual:Microsoft SQL Server

技术文档: 模式Manual:Database layout (表格Category:MediaWiki database tables) – API属性关联API:Database field and API property associations字段前缀Database field prefixes手册:其他字段上的主关键存储Manual:Primary key storage in other fields维基媒体扩展表Category:Wikimedia extension database tables
配置: 设置Manual:Configuration_settings#Database_settings分享Manual:Shared database
开发: 访问Manual:Database access最优化Database optimization方针Development policy#Database_patches更新器Manual:DatabaseUpdater.php扩展模式更新Manual:Hooks/LoadExtensionSchemaUpdates补丁文件Manual:SQL patch file

核心表: archivebot_passwordscategorycategorylinkschange_tagcommentconfigexternallinksfilearchivehitcounterimageimagelinksimage_comment_tempinterwikiiwlinksipblocksip_changesjobl10n_cachelanglinkslogginglog_searchmsg_resourcemsg_resource_linksmodule_depsobjectcacheoldimagepagepagelinkspage_propspage_restrictionsprotected_titlesquerycachequerycachetwoquerycache_inforecentchangesredirectrevisionrevision_comment_tempsearchindexsitessite_identifiers - site_statstag_summarytemplatelinkstexttranscacheupdateloguploadstashuseruser_former_groupsuser_groupsuser_newtalkuser_propertiestag_summaryvalid_tagwatchlist