Implemented PDO connection factory.