db generation