Note: You are currently viewing documentation for Moodle 2.0. Up-to-date documentation for the latest stable version is available here: Student projects/SQLite.

Student projects/SQLite: Difference between revisions

From MoodleDocs
(Shifted to dev docs)
 
(15 intermediate revisions by one other user not shown)
Line 1: Line 1:
<p class="note">'''Note''': This page outlines ideas for the XMLDB/SQLite project. It's a ''specification under construction''! If you have any comments or suggestions, please add them to the [[Talk:Student projects/SQLite|page comments]].''</p>
{{Moved_to_dev_docs}}
 
==Summary==
This project is part of the 2008 edition of Google Summer of Code (GSoC). Mentor: Penny Leach. Student: Andrei Bautu.
 
The objective of this project is to extend Moodle's database support and features. The main working directions established in the proposal are:
* implement SQLite in Moodle database abstraction layer;
* implement a tool which will allow administrators to copy a live Moodle database and switch into 'testing mode' using a SQLite copy of the live database.
 
===SQLite support===
 
Adding support for SQLite in Moodle requires a careful analysis of compatibility between Moodle's database requirements and SQLite's features (e.g. https://docs.moodle.org/en/Development:XMLDB_problems).
 
SQLite supports almost all of the features of SQL92 (see http://www.sqlite.org/omitted.html). Some areas that need special attention are:
* proper settings for Unicode support, long field names, numeric/associative fetches, metadata support;
* incompatible SQL commands (e.g. SQLite does not support MySQL's TRUNCATE because it is not part of standard SQL);
* unsupported SQL commands (SQLite does not support GRANT/REVOKE);
* unsupported SQL keywords (SQLite does not support right and full join);
* security issues (in a misconfigured environment, the SQLite database may be downloaded).
 
A serious limitation of SQLite is the limited ALTER TABLE command. In this case, the general solution for the missing clauses problem consists in replacing the query with a series of queries that will create a second table to replace the original one. This will be done by the database layer.
 
===Testing mode tool===
Using this tool, the live database will be copied to a SQLite testing database. This will allow administrators to experiment in testing mode without performing a backup of the live database or worrying about breaking their live site. The tool will use Moodle's XMLDB to replicate the data from the live database to the test database.
 
==Project timeline==
* April, 14 – May, 25 – develop specification
** discus required functionality with the mentor;
** analyze database incompatibilities and possible solutions;
**collect feedback from the mentor and community.
* May, 26 – June, 8 – SQLite support
** implement SQLite support in Moodle database abstraction layer;
** test and benchmark SQLite support
* June, 9 – July, 31 – Testing mode tool
** implement database migration mechanism;
** provide alternative solutions for non-standard SQL commands in Moodle (if necesary)
* August, 1 – August, 18 – remove reported bugs
* September, 3 – submit code and resource files Google
 
==Completion criteria==
Moodle will allow users to:
* work with SQLite databases;
* use testing mode (i.e. replicate a live database to a SQlite test database)
 
==See also==
 
*[[GSOC/2008]]
*[http://code.google.com/soc/2008/moodle/appinfo.html?csaid=5800332C0A064CB0 XMLDB/SQLite application abstract]
*Using Moodle [http://moodle.org/mod/forum/discuss.php?d=88827 How to add sqlite-support?] forum discussion
 
[[Category:Project]]

Latest revision as of 04:02, 15 September 2011

This development related page is now located in the Dev docs.

See the Student projects/SQLite page in the Dev docs.