Assign db code automatically  (if not set via properties) based on dictionary key.