modify sql sentences
build tables for preset mapping