XWiki Database Schema
This diagram shows the mappings of internal classes to database tables.
The tables are shown with the table name on the left top and the Java class name on the right top.
In the left column you can find the names of the columns in the table and in the right column you can find the get methods in the class for accessing those values.
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:
SELECT doc.XWD_TITLE FROM xwikidoc AS doc WHERE doc.XWD_FULLNAME = 'Main.WebHome'
is equivalent to the HQL query:
SELECT doc.title FROM XWikiDocument AS doc WHERE doc.fullName = 'Main.WebHome'
because XWD_TITLE maps to getTitle() which maps to title.
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. Roughly, in order to support defining data types dynamically, the documents metadata are stored in a table, the objects are stored in another table and then the values of the properties of the objects are stored each in their own table, depending on the type of property.
Note that there may be minor variances for databases other than MySQL, but if so, they have not yet been documented.
You can also access the raw WEB-INF/lib/xwiki-platform-legacy-oldcore*.jar (or WEB-INF/lib/xwiki-platform-oldcore*.jar), along with specific mapping files for various databases.. In your XWiki installation this file is bundled inside the
In alphabetical order
Tables used for custom mapping of XWiki classes
Note: Custom mapping of comments is disabled by default so the xwikicomments table will be empty.
Tables used by the statistics plugin
If the stats plugin is not enabled then these will be empty.
Tables used in the deprecated table class property system
These are not used anymore, class information is now stored in XML format in the XWD_CLASS_XML column in the xwikidoc table.