Development:Database schemas
From MoodleDocs
Given a working database with defined tables, the intentionally simple SQL used in Moodle should work fine with a wide variety of database brands.
A problem exists with automatically creating new tables in a database, which is what Moodle tries to do upon initial installation. Because every database is very different, there doesn't yet exist any way to do this in a platform-independent way. To support this automation in each database, schemas can be created that list the required SQL to create Moodle tables in a particular database. These are files in lib/db and inside the db subdirectory of each module.
Currently, only MySQL and PostgreSQL are fully supported in this way (no-one wrote the schemas for other brands).
[edit]
See also
- Moodle database study forum discussion
- Database model forum discussion
