db record generation.