|
|
Line 1: |
Line 1: |
| {{Hi}}
| | #REDIRECT [[MetaWikiPedia:Database layout]] |
| {{Handbook sidebar|hacker toc}}
| |
| <small>Other languages: [[Help:???????????|??? (ja)]] ...[[Meta:Interlanguage links|''Translate this page!'']]</small>
| |
| | |
| <- [[MediaWiki architecture]]
| |
| | |
| Most data for the wiki is stored in a database. See [[MySQL config]] for setup info.
| |
| | |
| (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.)
| |
| | |
| See in the source: [http://cvs.sourceforge.net/viewcvs.py/wikipedia/phase3/docs/schema.doc?rev=1.2&view=markup schema.doc] and [http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/wikipedia/phase3/maintenance/tables.sql?rev=HEAD&content-type=text/vnd.viewcvs-markup maintenance/tables.sql]
| |
| | |
| Currently we have the following tables:
| |
| *[[archive table]] - "deleted" pages
| |
| *[[blobs table]]
| |
| *[[brokenlinks table]] - links in internal link style to non-existing pages in the same project (see below)
| |
| *[[categorylinks table]]
| |
| *[[cur table]] - current pages
| |
| *[[hitcounter table]]
| |
| *[[image table]]
| |
| *[[imagelinks table]] tracks usage of images in wikipages (see below)
| |
| *[[interwiki table]]
| |
| *[[ipblocks table]]
| |
| *[[links table]] - links in internal link style to existing pages in the same project (see below)
| |
| *[[linkscc table]] - (see below)
| |
| *[[math table]]
| |
| *[[objectcache table]]
| |
| *[[old table]] - old versions of pages
| |
| *[[oldimage table]]
| |
| *[[querycache table]]
| |
| *[[recentchanges table]]
| |
| *[[searchindex table]]
| |
| *[[site_stats table]]
| |
| *[[testac table]]
| |
| *[[user table]]
| |
| *[[user_newtalk table]]
| |
| *[[watchlist table]]
| |
| | |
| ==Explanation of the link tables==
| |
| | |
| There are presently three link tables: ''links'', ''brokenlinks'' and ''imagelinks''. There are a couple of uses for these tables:
| |
| * enables "What links here" and "Related changes" to work, looking at incoming or outgoing links
| |
| * provides the list of pages that use an image shown on an image's description page
| |
| * allows making reports of pages that aren't linked (Orphans, Unused images) or are linked to but don't exist (Most wanted pages)
| |
| * slightly speed up page rendering by avoiding individual checks for the existence of each linked page to determine how to render its link
| |
| | |
| The latest software also adds a 'linkscc' table which caches data from the other three tables. This is used only for speeding rendering.
| |
| | |
| === Maintenance of link tables ===
| |
| If you import data to the cur table and don't [[rebuild link tables|rebuild the links]], you
| |
| won't be able to use "[[What links here]]", "[[Related changes]]", "[[Orphans]]",
| |
| etc. If you don't want to, well I suppose that's okay... (Brion Vibber)
| |
| | |
| ==See also==
| |
| *[[Experimental new database schema]] ''22:55, 24 Jul 2003''
| |
| *[[Proposed Database Schema Changes]] ''18:19, 23 Dec 2003''
| |
| *[[en:Wikipedia:Database queries]]
| |
| *[[nl:Wikipedia:SQL opdrachten]]
| |
| *[[Database layout]]
| |
| *[[Documentation: Developer's Guide]]
| |
| | |
| Next page: [[MediaWiki User's Guide: Installation| Installation]] >
| |
| | |
| | |
| [[Category:MediaWiki User's Guide]]
| |
| [[Category:MediaWiki Development]]
| |