switched db exists approach