implement database selector