Managing multiple databases