generate database