database generation