Database layout

From MozillaWiki
Revision as of 13:27, 5 November 2004 by 212.18.78.206 (talk) (→‎Explanation of the link tables)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

MozillaWiki Handbook
Software help for MozillaWiki — see page histories for older versions.
Handbook Contents | Other help

Other languages: ??? (ja) ...Translate this page!

<- MediaWiki architecture

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.)

See in the source: schema.doc and maintenance/tables.sql

Currently we have 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", etc. If you don't want to, well I suppose that's okay... (Brion Vibber)

See also

Next page: Installation >