return correct db alias for connection