private static void insertRecordIntoDbUserTable(ArrayList<String> xmlList) throws SQLException {
	  	// generates rows in table, each with file name and one keyword/ontology
	  
		Connection dbConnection = null;
		PreparedStatement statement = null;

		try {
			dbConnection = getDBConnection();
			
			int batchSize = 0;
			
			for (int a = 0; a < xmlList.size(); a++) { // for each xml file
				ArrayList<String> appendList = new ArrayList<String>();
				
				ArrayList<String> keywords = new ArrayList<String>(generateKeywords(xmlList.get(a))); //gets the file's keywords
				ArrayList<String> finalKeywords = new ArrayList<String>(curate(keywords)); //filter keywords
				
				if (table_is_ontologies == true) { //append ontologies if true; also only produces ontologies if true
					ArrayList<String> URIs = new ArrayList<String>(listURIs(finalKeywords)); //generate file name + list of uris based on keywords
					ArrayList<String> finalURIs = new ArrayList<String>(eliminateDuplicates(URIs));
					appendList.addAll(finalURIs);
					statement = dbConnection.prepareStatement(SQL_INSERT_ONTOLOGIES, Statement.RETURN_GENERATED_KEYS);
				}
				else { //if table_is_ontologies is false, appends keywords
					appendList.addAll(finalKeywords);
					statement = dbConnection.prepareStatement(SQL_INSERT_KEYWORDS, Statement.RETURN_GENERATED_KEYS);
				}
				
				//start appending keywords/ontologies of that xml file to database
				if (appendList.size() == 1) { //if xml file has no keywords/ontologies and thus list only consists of the file name
					statement.setString(1, appendList.get(0));
					statement.setString(2, "");
					statement.addBatch();
					batchSize++;
				}

				for (int i = 1; i < appendList.size(); i++) { //for each keyword/uri following the file name
					statement.setString(1, appendList.get(0)); //set file name
					statement.setString(2, appendList.get(i)); //set keyword/uri
					statement.addBatch();
					batchSize++;
					if ((i) % 1000 == 0) {
						statement.executeBatch(); // Execute every 1000 items.
					}
				}
				if (batchSize >= 1000) {
					statement.executeBatch();
					batchSize = 0;
				}
				statement.executeBatch();
				//end appending keywords for each xml file loop
			} //end loop of generating table for all xml files and ontologies
			statement.executeBatch();

		} catch (SQLException e) {
			System.out.println(e.getMessage());
		} finally {
			if (statement != null) {
				statement.close();
			}
			if (dbConnection != null) {
				dbConnection.close();
			}
		}
	}