Database service with generic-pool implementation