code: protected int update(Connection connection, RecordStream recordStream)
              throws SQLException, IOException {
          int count = 0;
          PreparedStatement insertFileHash = statement(connection,
                  Query.INSERT_FILEHASH);
          PreparedStatement insertMeta = statement(connection, Query.INSERT_META);
          PreparedStatement insertCVE = statement(connection, Query.INSERT_CVES);
          while (recordStream.hasNext()) {
              VictimsRecord vr = recordStream.getNext();
              String hash = vr.hash.trim();
  
              // remove if already present
              deleteRecord(connection, hash);
  
              // add the new/updated hash
              int id = insertRecord(connection, hash);
  
              // insert file hahes
              for (String filehash : vr.getHashes(Algorithms.SHA512).keySet()) {
                  setObjects(insertFileHash, id, filehash.trim());
                  insertFileHash.addBatch();
              }
  
              // insert metadata key-value pairs
              HashMap<String, String> md = vr.getFlattenedMetaData();
              for (String key : md.keySet()) {
                  setObjects(insertMeta, id, key, md.get(key));
                  insertMeta.addBatch();
              }
  
              // insert cves
              for (String cve : vr.cves) {
                  setObjects(insertCVE, id, cve.trim());
                  insertCVE.addBatch();
              }
  
              count++;
          }
          executeBatchAndClose(insertFileHash, insertMeta, insertCVE);
          return count;
      }
docs: Update all records in the given {@link RecordStream}. This will remove
  the record if it already exits and then add it. Otherwise, it just adds
  it.
  
  @param recordStream
  @throws SQLException
  @throws IOException