Database Issue
Database Issue
XWiki uses by default a database to store its data. {toc}
Online Documentation
XWiki Database Schema (updated to version 1.8)
Database tools
Mysqlcheck
The MySql tool for database integrity
Last run: 18-03-2010
Result: All Tables structure are OK
There is also an application on code.xwiki.org to run this script automatically on XE directly from xwiki.")
Sanity Checks
To verify the consistency of the data of XWiki database run the sanity check script.
Script will select rows that are inconsistent with the logics of XWiki.\ If no rows are selected, it means the script itself can not detect any error.
There are different version MySQL and postgresql
Last run: 18 03 2009\ Result: Database inconsistent,
Fixed many elements: (in attach the reports)
Indexes
To improve XWiki performance when running with many documents there's a script that creates indexes for database. (Tested for MySQL 4.x and 5.0. )
Last run: 18-03-2010*\ Result: in attach (log in to view)
Exploring xWiki database (v. 1.2.2)
oppure ...
sudo mysql xwiki
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| alice |
| apice |
| blojsom |
| mysql |
| publication |
| xwiki |
+--------------------+
7 rows in set (0.00 sec)
SHOW TABLES;
+---------------------------+
| Tables_in_xwiki |
+---------------------------+
| feeds_aggregatorgroup |
| feeds_aggregatorurl |
| feeds_aggregatorurlgroups |
| feeds_feedentry |
| feeds_feedentrytags |
| feeds_keyword |
| xwikiattachment |
| xwikiattachment_archive |
| xwikiattachment_content |
| xwikibooleanclasses |
| xwikiclasses |
| xwikiclassesprop |
| xwikicomments |
| xwikidateclasses |
| xwikidates |
| xwikidblistclasses |
| xwikidbversion |
| xwikidoc |
| xwikidoubles |
| xwikifloats |
| xwikiintegers |
| xwikilargestrings |
| xwikilinks |
| xwikilistitems |
| xwikilists |
| xwikilock |
| xwikilongs |
| xwikinumberclasses |
| xwikiobjects |
| xwikipreferences |
| xwikiproperties |
| xwikircs |
| xwikirecyclebin |
| xwikislistclasses |
| xwikistatsdoc |
| xwikistatsreferer |
| xwikistatsvisit |
| xwikistringclasses |
| xwikistrings |
+---------------------------+
39 rows in set (0.00 sec)
Some of the tables above are documented in the page containing The XWiki Database Schema (updated to version 1.8)
How to access data
+-------------------------------+
| XWO_CLASSNAME |
+-------------------------------+
| Blog.Categories |
| Courses.CourseClass |
| Panels.PanelClass |
| Publications.--- |
| Publications.PublicationClass |
| SaraMontagna.--- |
| Talks.TalkClass |
| Theses.ThesisClass |
| XWiki.ArticleClass |
| XWiki.Mail |
| XWiki.PhotoAlbumClass |
| XWiki.PresentationClass |
| XWiki.SchedulerJobClass |
| XWiki.SlideClass |
| XWiki.TagClass |
| XWiki.WatchListClass |
| XWiki.XWikiComments |
| XWiki.XWikiGlobalRights |
| XWiki.XWikiGroups |
| XWiki.XWikiPreferences |
| XWiki.XWikiRights |
| XWiki.XWikiSkins |
| XWiki.XWikiUsers |
+-------------------------------+
23 rows in set (0.00 sec)
select * from xwikiobjects where XWO_CLASSNAME = 'Theses.ThesisClass';
+-------------+------------+---------------------------------------------------------------+--------------------+
| XWO_ID | XWO_NUMBER | XWO_NAME | XWO_CLASSNAME |
+-------------+------------+---------------------------------------------------------------+--------------------+
| 1387325302 | 0 | Theses.ThesisClassTemplate | Theses.ThesisClass |
.......
| -2545831 | 0 | Theses.InternethingsTamagnini09 | Theses.ThesisClass |
| 1048205775 | 0 | Theses.ProvaTesi | Theses.ThesisClass |
+-------------+------------+---------------------------------------------------------------+--------------------+
118 rows in set (0.00 sec)
di cui 117 Tesi
Objects and properties are linked by
xwikiproperties.XWP_ID = xwikiobjects.XWO_ID
+------------+-----------------------+-------------------------------------------+
| XWP_ID | XWP_NAME | XWP_CLASSTYPE |
+------------+-----------------------+-------------------------------------------+
| -966466718 | abstract | com.xpn.xwiki.objects.LargeStringProperty |
| -966466718 | availabilityDate | com.xpn.xwiki.objects.DateProperty |
| -966466718 | category | com.xpn.xwiki.objects.StringProperty |
| -966466718 | contact | com.xpn.xwiki.objects.LargeStringProperty |
| -966466718 | coSupervisors | com.xpn.xwiki.objects.StringProperty |
| -966466718 | description | com.xpn.xwiki.objects.LargeStringProperty |
| -966466718 | endDate | com.xpn.xwiki.objects.DateProperty |
| -966466718 | externalCosupervisors | com.xpn.xwiki.objects.StringProperty |
| -966466718 | externalSupervisor | com.xpn.xwiki.objects.StringProperty |
| -966466718 | language | com.xpn.xwiki.objects.StringProperty |
| -966466718 | startDate | com.xpn.xwiki.objects.DateProperty |
| -966466718 | status | com.xpn.xwiki.objects.StringProperty |
| -966466718 | studentMail | com.xpn.xwiki.objects.StringProperty |
| -966466718 | studentName | com.xpn.xwiki.objects.StringProperty |
| -966466718 | studentUserName | com.xpn.xwiki.objects.StringProperty |
| -966466718 | supervisor | com.xpn.xwiki.objects.StringProperty |
| -966466718 | title | com.xpn.xwiki.objects.StringProperty |
| -966466718 | translatedAbstract | com.xpn.xwiki.objects.LargeStringProperty |
| -966466718 | translatedTitle | com.xpn.xwiki.objects.StringProperty |
+------------+-----------------------+-------------------------------------------+
19 rows in set (0.00 sec)
select * from xwikiobjects where XWO_ID = -966466718;
+------------+------------+-----------------------+--------------------+
| XWO_ID | XWO_NUMBER | XWO_NAME | XWO_CLASSNAME |
+------------+------------+-----------------------+--------------------+
| -966466718 | 0 | Theses.SemanticTuCSoN | Theses.ThesisClass |
+------------+------------+-----------------------+--------------------+
1 row in set (0.00 sec)
To do List
- Check inconsistent
- Check inconsistent
- Check inconsistent "Publications.-
" and "SaraMontagna.-" got by query "SELECT DISTINCT XWO_CLASSNAME FROM xwikiobjects;"