improvements to the data import/proof-of-concept database query