Development:XML database schema: Difference between revisions
From MoodleDocs
mNo edit summary |
|||
| Line 2: | Line 2: | ||
The goal of these pages is to document, explain and follow the evolution of the integration between Moodle and other RDBS, using the [http://phplens.com/lens/adodb/docs-datadict.htm#xmlschema ADOdb XML Schema] (AXMLS), built over the [http://phplens.com/lens/adodb/docs-datadict.htm ADOdb Data Dictionary], that comes with the [http://adodb.sourceforge.net/ ADOdb] library, used by Moodle to perform all DB operations since the beginning. | The goal of these pages is to document, explain and follow the evolution of the integration between Moodle and other RDBS, using the [http://phplens.com/lens/adodb/docs-datadict.htm#xmlschema ADOdb XML Schema] (AXMLS), built over the [http://phplens.com/lens/adodb/docs-datadict.htm ADOdb Data Dictionary], that comes with the [http://adodb.sourceforge.net/ ADOdb] library, used by Moodle to perform all DB operations since the beginning. | ||
__NOTOC__ | |||
==Preliminary tests== | ==Preliminary tests== | ||
Revision as of 22:32, 16 May 2006
Note: This article is a work in progress. Please use the page comments for any recommendations/suggestions for improvement.
The goal of these pages is to document, explain and follow the evolution of the integration between Moodle and other RDBS, using the ADOdb XML Schema (AXMLS), built over the ADOdb Data Dictionary, that comes with the ADOdb library, used by Moodle to perform all DB operations since the beginning.
Preliminary tests
This test involves the creation of one minimal DB structure (2-3 tables) testing all these features with the XML schema:
- Table creation.
- Field creation:
- names (don't forget reserved words!).
- types
- length considerations
- autonumeric (serial or sequence) fields.
- default values
- unsigned support
- null/not null decission!
- PK creation and naming
- INDEX and UNIQUE INDEX creation an naming
- FK creation and naming?
The roadmap
Todo list
- We need to change all the uses of the LIMIT offset, num clause to use the cross-db compatible SelectLimit() function. Two alternatives seem possible:
- Create a new set of get_records_limit() (and get_recordset_limit() ?) functions, allowing to specify the offset, num parameters.
- Modify the current get_records() (and get_recordset()) functions to allow two more optional parameters (offset, num)
- Analyse the impact of such SelectLimit() calls under SQL*Server, Oracle... because it's emulated by ADOdb on those DBs, because their lack of support for the LIMIT clause. As the offset parameter grows, ADOdb must iterate over more records to get the desired window and it could be a problem under long sets of records!
- What to do with all the previously created DB objects (indexes, unique indexes, sequences...) if their naming schema doesn't fit with the implemented by ADOdb. Drop/recreate everything? Leave it unmodified?
See also
- XMLDB preliminary links - A collection of links about general info, searched and analysed at the initial stages of the project.