Update database class to PDO.