SQL Engine for map generation