db: added database switch method