added select function

for choosing database. I don't think tests are necessary for this.