sql scripts to generate tiling information