Add usedb function

The function usedb allows users to choose their database from inside the scripts