Database abstraction
This article is considered of unknown usefulness and may be a candidate for deletion. If you want to revive discussion regarding the subject, you may try using the talk page or start a discussion at Meta:Babel. |
This page is kept for historical interest. Its content is outdated or may be wrong. You may find more up-to-date information at Manual:Database access on MediaWiki.org |
Why database abstraction ?[edit]
- MediaWiki currently runs *only* on mysql - many folks have good reasons *not* to use mysql.
- We should either only use strict ISO-SQL or provide an easy-to-adopt database abstraction
Implementation concepts[edit]
Storage abstraction code[edit]
- All database access should be encapsulated by high-level functions.
- Wiki-Code should *NEVER* do any SQL queries by itself.
- Example: mediawiki_fetch_article($topic), etc.
- API can be used to get/post structured data.
Datebase setup and schemata[edit]
- The setup script should be extended to select the database backend
- Every database backend has got its own schema source
- See Proposed Database Schema Changes for ongoing schema discussion
Quality management and clear APIs are important here![edit]
Outreach to other developer communities[edit]
It would be worthwhile to describe sandard bottleneck queries, like watchlist and allpages, which developers who use and optimize various databases could analyze and discuss. This could help identify, not only how to get the expected results in many db languages, but also what db-specific advantages there are in different SQL/stored-procedure implementations. +sj+ 17:48, 1 Aug 2004 (UTC)