DB generator divided by logic