<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://www.lensovet.net/~sysadmin/w/index.php?action=history&amp;feed=atom&amp;title=Help%3ADatabase_layout</id>
	<title>Help:Database layout - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://www.lensovet.net/~sysadmin/w/index.php?action=history&amp;feed=atom&amp;title=Help%3ADatabase_layout"/>
	<link rel="alternate" type="text/html" href="http://www.lensovet.net/~sysadmin/w/index.php?title=Help:Database_layout&amp;action=history"/>
	<updated>2026-05-05T10:19:18Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.31.16</generator>
	<entry>
		<id>http://www.lensovet.net/~sysadmin/w/index.php?title=Help:Database_layout&amp;diff=1492&amp;oldid=prev</id>
		<title>Wadmin: 1 revision(s)</title>
		<link rel="alternate" type="text/html" href="http://www.lensovet.net/~sysadmin/w/index.php?title=Help:Database_layout&amp;diff=1492&amp;oldid=prev"/>
		<updated>2006-07-19T05:34:23Z</updated>

		<summary type="html">&lt;p&gt;1 revision(s)&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 05:34, 19 July 2006&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Wadmin</name></author>
		
	</entry>
	<entry>
		<id>http://www.lensovet.net/~sysadmin/w/index.php?title=Help:Database_layout&amp;diff=1491&amp;oldid=prev</id>
		<title>130.75.87.146 at 06:56, 18 July 2006</title>
		<link rel="alternate" type="text/html" href="http://www.lensovet.net/~sysadmin/w/index.php?title=Help:Database_layout&amp;diff=1491&amp;oldid=prev"/>
		<updated>2006-07-18T06:56:13Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{MoveToMediaWiki}}&lt;br /&gt;
{{H:h|system admin toc}}&lt;br /&gt;
&amp;lt;- [[MediaWiki architecture]]&lt;br /&gt;
&lt;br /&gt;
Most data for the wiki is stored in a database. See [[MySQL config]] for setup info.&lt;br /&gt;
&lt;br /&gt;
(Some data lives only in the [[MediaWiki file usage|filesystem]], other data is just cached there. Data may also be cached in [[memcached]], but lives permanently in the database.)&lt;br /&gt;
&lt;br /&gt;
'''NB: the current schema for any version - with copious comments - can be found in the &amp;lt;tt&amp;gt;maintenance/tables.sql&amp;lt;/tt&amp;gt; file. The latest version can be obtained [http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/maintenance/tables.sql?view=markup from SVN].'''&lt;br /&gt;
&lt;br /&gt;
Version 1.6 uses the following tables:&lt;br /&gt;
*[[archive table]]&lt;br /&gt;
*[[categorylinks table]]&lt;br /&gt;
*[[externallinks table]]&lt;br /&gt;
*[[hitcounter table]]&lt;br /&gt;
*[[image table]]&lt;br /&gt;
*[[imagelinks table]]&lt;br /&gt;
*[[interwiki table]]&lt;br /&gt;
*[[ipblocks table]]&lt;br /&gt;
*[[job table]]&lt;br /&gt;
*[[logging table]]&lt;br /&gt;
*[[math table]]&lt;br /&gt;
*[[objectcache table]]&lt;br /&gt;
*[[oldimage table]]&lt;br /&gt;
*[[page table]]&lt;br /&gt;
*[[pagelinks table]]&lt;br /&gt;
*[[querycache table]]&lt;br /&gt;
*[[recentchanges table]]&lt;br /&gt;
*[[revision table]]&lt;br /&gt;
*[[searchindex table]]&lt;br /&gt;
*[[site_stats table]]&lt;br /&gt;
*[[templatelinks table]]&lt;br /&gt;
*[[text table]]&lt;br /&gt;
*[[trackbacks table]]&lt;br /&gt;
*[[user table]]&lt;br /&gt;
*[[user_groups table]]&lt;br /&gt;
*[[user_newtalk table]]&lt;br /&gt;
*[[validate table]]&lt;br /&gt;
*[[watchlist table]]&lt;br /&gt;
&lt;br /&gt;
Version 1.5 uses the following tables:&lt;br /&gt;
*[[archive table]]&lt;br /&gt;
*[[categorylinks table]]&lt;br /&gt;
*[[hitcounter table]]&lt;br /&gt;
*[[image table]]&lt;br /&gt;
*[[imagelinks table]]&lt;br /&gt;
*[[interwiki table]]&lt;br /&gt;
*[[ipblocks table]]&lt;br /&gt;
*[[logging table]]&lt;br /&gt;
*[[math table]]&lt;br /&gt;
*[[objectcache table]]&lt;br /&gt;
*[[oldimage table]]&lt;br /&gt;
*[[page table]]&lt;br /&gt;
*[[pagelinks table]]&lt;br /&gt;
*[[querycache table]]&lt;br /&gt;
*[[recentchanges table]]&lt;br /&gt;
*[[revision table]]&lt;br /&gt;
*[[searchindex table]]&lt;br /&gt;
*[[site_stats table]]&lt;br /&gt;
*[[text table]]&lt;br /&gt;
*[[trackbacks table]]&lt;br /&gt;
*[[user table]]&lt;br /&gt;
*[[user_groups table]]&lt;br /&gt;
*[[user_newtalk table]]&lt;br /&gt;
*[[validate table]]&lt;br /&gt;
*[[watchlist table]]&lt;br /&gt;
&lt;br /&gt;
Version 1.4 uses the following tables:&lt;br /&gt;
*[[archive table]] - &amp;quot;deleted&amp;quot; pages&lt;br /&gt;
*[[blobs table]]&lt;br /&gt;
*[[brokenlinks table]] - links in internal link style to non-existing pages in the same project (see below)&lt;br /&gt;
*[[categorylinks table]]&lt;br /&gt;
*[[cur table]] - current pages&lt;br /&gt;
*[[hitcounter table]]&lt;br /&gt;
*[[image table]]&lt;br /&gt;
*[[imagelinks table]] tracks usage of images in wikipages (see below)&lt;br /&gt;
*[[interwiki table]]&lt;br /&gt;
*[[ipblocks table]]&lt;br /&gt;
*[[links table]] - links in internal link style to existing pages in the same project (see below)&lt;br /&gt;
*[[linkscc table]] - (see below)&lt;br /&gt;
*[[math table]]&lt;br /&gt;
*[[objectcache table]]&lt;br /&gt;
*[[old table]] - old versions of pages&lt;br /&gt;
*[[oldimage table]]&lt;br /&gt;
*[[querycache table]]&lt;br /&gt;
*[[recentchanges table]]&lt;br /&gt;
*[[searchindex table]]&lt;br /&gt;
*[[site_stats table]]&lt;br /&gt;
*[[testac table]]&lt;br /&gt;
*[[text table]]&lt;br /&gt;
*[[user table]]&lt;br /&gt;
*[[user_newtalk table]]&lt;br /&gt;
*[[watchlist table]]&lt;br /&gt;
&lt;br /&gt;
==Explanation of the link tables==&lt;br /&gt;
&lt;br /&gt;
There are presently three link tables: ''links'', ''brokenlinks'' and  ''imagelinks''. There are a couple of uses for these tables:&lt;br /&gt;
* enables &amp;quot;What links here&amp;quot; and &amp;quot;Related changes&amp;quot; to work, looking at incoming or outgoing links&lt;br /&gt;
* provides the list of pages that use an image shown on an image's description page&lt;br /&gt;
* allows making reports of pages that aren't linked (Orphans, Unused images) or are linked to but don't exist (Most wanted pages)&lt;br /&gt;
* slightly speed up page rendering by avoiding individual checks for the existence of each linked page to determine how to render its   link&lt;br /&gt;
&lt;br /&gt;
The latest software also adds a 'linkscc' table which caches data from the other three tables. This is used only for speeding rendering.&lt;br /&gt;
&lt;br /&gt;
=== Maintenance of link tables ===&lt;br /&gt;
If you import data to the cur table and don't [[rebuild link tables|rebuild the links]], you&lt;br /&gt;
won't be able to use &amp;quot;[[What links here]]&amp;quot;, &amp;quot;[[Related changes]]&amp;quot;, &amp;quot;[[Orphans]]&amp;quot;,&lt;br /&gt;
etc. If you don't want to, well I suppose that's okay... (Brion Vibber)&lt;br /&gt;
&lt;br /&gt;
== [[:en:Entity-relationship model|ERD]] Diagram ==&lt;br /&gt;
This is an overview of the mediawiki database 1.6.X version.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[Image:Mediawiki.jpg]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is the diagram from the mediawiki database 1.4.X version.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[Image:DER Mediawiki.PNG]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It shows the main tables and relations from the database.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
*[[Experimental new database schema]] ''22:55, 24 Jul 2003''&lt;br /&gt;
*[[Proposed Database Schema Changes]] ''18:19, 23 Dec 2003''&lt;br /&gt;
*[[en:Wikipedia:Database queries]]&lt;br /&gt;
*[[nl:Wikipedia:SQL opdrachten]]&lt;br /&gt;
*[[Documentation: Developer's Guide]]&lt;br /&gt;
&lt;br /&gt;
Next page: [[MediaWiki User's Guide: Installation| Installation]] &amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:MediaWiki Development]]&lt;br /&gt;
[[Category:MediaWiki database tables|*]]&lt;/div&gt;</summary>
		<author><name>130.75.87.146</name></author>
		
	</entry>
</feed>