Database handler based on PDO