Modified database generation script