Abstract database connection.