Wiki source code of XWiki Database Schema
Version 102.1 by Caleb James DeLisle on 2011/04/14
Show last authors
author | version | line-number | content |
---|---|---|---|
1 | This diagram shows the mappings of internal classes to database tables. | ||
2 | The tables are shown with the table name on the left top and the Java class name on the right top. | ||
3 | In the left column are the names of the columns in the table and in the right column are the get methods in the class for accessing those values. | ||
4 | In a hibernate query you can use the same name as the get method but without the get and with the first letter lowercase so the SQL query: | ||
5 | {{code language="sql"}}SELECT doc.XWD_TITLE FROM xwikidoc AS doc WHERE doc.XWD_FULLNAME = 'Main.WebHome'{{/code}} | ||
6 | is equivalent to the HQL query: | ||
7 | {{code language="sql"}}SELECT doc.title FROM XWikiDocument AS doc WHERE doc.fullName = 'Main.WebHome'{{/code}} | ||
8 | because ##XWD_TITLE## maps to ##getTitle()## which maps to ##title##. | ||
9 | |||
10 | [[image:xwikischema.png||width=80%]] | ||
11 | |||
12 | {{info}} | ||
13 | The schema below is updated to version 2.0.3. | ||
14 | {{/info}} | ||
15 | |||
16 | Following are all of the tables that make up the XWiki database schema. Just taking a brief look at the schema's tables can give you a clue to how the underlying system works. | ||
17 | |||
18 | Note that there may be minor variances for databases other than MySQL, but if so, they have not yet been documented. | ||
19 | |||
20 | = Tables = | ||
21 | |||
22 | In alphabetical order | ||
23 | (% style="width:99%" %) | ||
24 | | (((* [[xwikiattachment>>DevGuide.DsXWikiAttachment]] | ||
25 | * [[xwikiattachment_archive>>DevGuide.XWikiAttachmentArchive]] | ||
26 | * [[xwikiattachment_content>>DevGuide.DsXWikiAttachmentContent]] | ||
27 | * [[xwikiattrecyclebin>>DevGuide.DsXwikiRecycleBin]] | ||
28 | * [[xwikidates>>DevGuide.DsXWikiDates]] | ||
29 | * [[xwikidbversion>>DevGuide.DsXWikiDbVersion]] | ||
30 | * [[xwikidoc>>DevGuide.DsXWikiDoc]] | ||
31 | * [[xwikidoubles>>DevGuide.DsXWikiDoubles]] | ||
32 | * [[xwikifloats>>DevGuide.DsXWikiFloats]] | ||
33 | * [[xwikiintegers>>DevGuide.DsXWikiIntegers]] | ||
34 | * [[xwikilargestrings>>DevGuide.DsXWikiLargeStrings]] | ||
35 | * [[xwikilinks>>DevGuide.DsXWikiLinks]]))) | (((* [[xwikilistitems>>DevGuide.DsXWikiListItems]] | ||
36 | * [[xwikilists>>DevGuide.DsXWikiLists]] | ||
37 | * [[xwikilock>>DevGuide.DsXWikiLocks]] | ||
38 | * [[xwikilongs>>DevGuide.DsXWikiLongs]] | ||
39 | * [[xwikiobjects>>DevGuide.DsXWikiObjects]] | ||
40 | * [[xwikiproperties>>DevGuide.DsXWikiProperties]] | ||
41 | * [[xwikiircs>>DevGuide.DsXWikiIrcs]] | ||
42 | * [[xwikirecyclebin>>DevGuide.DsXwikiRecyleBin]] | ||
43 | * [[xwikistringclasses>>DevGuide.DsXWikiStringClasses]] | ||
44 | * [[xwikistrings>>DevGuide.DsXWikiStrings]]))) | ||
45 | |||
46 | == Tables used for custom mapping of XWiki classes == | ||
47 | (% style="width:99%" %) | ||
48 | | (((* [[xwikicomments>>DevGuide.DsXwikiComments]] | ||
49 | * [[xwikipreferences>>DevGuide.DsXWikiPreferences]]))) | ||
50 | |||
51 | Note: Custom mapping of comments is disabled by default so ##xwikicomments## table will be empty. | ||
52 | |||
53 | == Tables used by the statistics plugin == | ||
54 | If the stats plugin is not enabled then these will be empty. | ||
55 | (% style="width:99%" %) | ||
56 | | (((* [[xwikistatsdoc>>DevGuide.DsXWikiDocumentStats]] | ||
57 | * [[xwikistatsreferer>>DevGuide.DsXWikiRefererStats]] | ||
58 | * [[xwikistatsvisit>>DevGuide.XWikiVisits]]))) | ||
59 | |||
60 | == Tables used in the deprecated table class property system == | ||
61 | These are not used anymore, class information is now stored in XML format in the ##XWD_CLASS_XML## column in the ##xwikidoc## table. | ||
62 | (% style="width:99%" %) | ||
63 | | (((* [[xwikibooleanclasses>>DevGuide.DsXWikiBooleanClasses]] | ||
64 | * [[xwikiclasses>>DevGuide.DsXWikiClasses]] | ||
65 | * [[xwikiclassesprop>>DevGuide.DsXWikiClassesProp]] | ||
66 | * [[xwikidateclasses>>DevGuide.DsXWikiDateClasses]] | ||
67 | * [[xwikidblistclasses>>DevGuide.DsXWikiDatabaseListClasses]] | ||
68 | * [[xwikinumberclasses>>DevGuide.DsXWikiNumberClasses]]))) | ||
69 | |||
70 | {{velocity}} | ||
71 | $xcontext.setCacheDuration(100000) | ||
72 | {{/velocity}} |