database scripts for generation