Help:Database layout

From GRWiktionaryHelp

MediaWiki Handbook: Contents | How To Use Help | Other help Software help for MediaWikiReaders, Editors, Admins e0 +/-

Most data for the wiki is stored in a database. See MySQL config for setup info.

(Some data lives only in the filesystem, other data is just cached there. Data may also be cached in memcached, but lives permanently in the database.)

NB: the current schema for any version - with copious comments - can be found in the maintenance/tables.sql file. The latest version can be obtained from CVS.

docs/schema.txt may also contain some hints.

Version 1.4 uses the following tables:

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 the links, you won't be able to use "What links here", "Related changes", "Orphans".

See also

MediaWiki Handbook: Contents | Other help


Reading: Go | Search | URL | Namespace | Page name | Section | Link | Backlinks | Piped link | Interwiki link | Redirect | Variable | Category | Special page
Tracking changes: Recent | (enhanced) | Related | Watching pages | Page history | Diff | User contributions | Edit summary | Minor edit |
Logging in and preferences: Logging in | Preferences | User style
Editing: Overview | Wikitext | New page | List | Images/files | Image page | Special characters | Formula | Table | EasyTimeline | Template | Renaming / Moving a page | Editing shortcuts | Talk page | Testing | Export |

Wiki Projects: Wikibooks | Wikicommons | Wikipedia | Wikiquote | Wikisource | Wiktionary |