@Override
  protected void doAlteration(Database database, Map<String, String> params) {
    Map<String, String> newParams = desc.getDatabaseProperties();

    // if both old and new params are not null, merge them
    if (params != null && newParams != null) {
      params.putAll(newParams);
      database.setParameters(params);
    } else {
      // if one of them is null, replace the old params with the new one
      database.setParameters(newParams);
    }
  }
Operation process of altering a database's properties.
ql/src/java/org/apache/hadoop/hive/ql/ddl/database/alter/poperties/AlterDatabaseSetPropertiesOperation.java