Reading db file and able to query