Set database type according to the corresponding attribute