built and queried  sqlite database