Custom database connection