Add option to select database by index.