srcipt generation database