Using XMLDB: Difference between revisions
Line 1: | Line 1: | ||
(This docs is in progress of writing and editing, aimed to help third-party module developer to switch to XMLDB) | (This docs is in progress of writing and editing, aimed to help third-party module developer to switch to XMLDB) | ||
== | ==XMLDB in your module== | ||
Everywhere in Moodle now use XMLDB. | Everywhere in Moodle now use XMLDB. Created to prevent from creating custom database schemas for different database system. If you don't know what XMLDB is, You can learn more about it here [[XMLDB_introduction]] | ||
In every module, there is "db/" directory where database structure stored. | |||
In every module, there is "db/" directory where database structure stored. usually contains mysql.php, mysql.sql and so on for different database. | |||
It's mean that you have to create different files for each database systems. If there are 5 database, you have to create 10 files (2 each). XMLDB solves this problem as well. Switching to XMLDB is very easy, save your time and effort by creating just 1 file. | |||
==Convert MySQL syntax to XMLDB== | ==Convert MySQL syntax to XMLDB== |
Revision as of 14:55, 9 January 2008
(This docs is in progress of writing and editing, aimed to help third-party module developer to switch to XMLDB)
XMLDB in your module
Everywhere in Moodle now use XMLDB. Created to prevent from creating custom database schemas for different database system. If you don't know what XMLDB is, You can learn more about it here XMLDB_introduction
In every module, there is "db/" directory where database structure stored. usually contains mysql.php, mysql.sql and so on for different database.
It's mean that you have to create different files for each database systems. If there are 5 database, you have to create 10 files (2 each). XMLDB solves this problem as well. Switching to XMLDB is very easy, save your time and effort by creating just 1 file.
Convert MySQL syntax to XMLDB
This can be done easily by using XMLDB Editor built in every Moodle. Simply go to Administration >> Miscellaneous >> XMLDB Editor