use mydb as wrapper of database operations