Not to sound like a beating drumb, but the PHPBB group has create a set of library modules that allow a wide variety of databases to be integrated into their product including MySQL 4.0x and 4.1x and 5.x as well as MS SQL, SQLite, and others.
IMO, moodle to should really setup a system like that.
Melissa