Improved database generator