Databases¶
Goal¶
Be able to use other database than MySQL
SQL¶
MySQL not really respect SQL language.
If we want to use PostgreSQL database, we need to rewrite many queries to be more SQL compliant.
Once the queries updated, it will be better to use other databases like Oracle
How to change¶
The best choice is to use PDO extension of PHP. With this, we can have the database we want: MySQL, PostgreSQL, SQLite...
See http://php.net/manual/en/book.pdo.php
step1: change mysqli to pdo¶
Rename class DBmysql in DBpdo and use pdo functions
step2: verify all queries not works¶
May test and verify all queries hard coded in GLPI
step3: probably optimize Search queries¶
I think we must optimize queries in Search class. Can be linked with the ticket #2476 and the rewrite of showlist
Problems¶
We must see for these problems:- People want to migrate from a DB to another
- installation SQL script may be compatible with many DB