db query file