public static void loadFileToCarsPersons(Connection connection, String filePath)
    {
        ReadCVS cvsReader = new ReadCVS();
        String[] record;
        PreparedStatement statement = null;

        try
        {
            cvsReader.readFile(filePath);
            String insertTableRequest = "INSERT INTO cars_persons" +
                                        "(person_id, car_id, color, date_purchased)" +
                                        "VALUES (?, ?, ?, ?);";

            statement = connection.prepareStatement(insertTableRequest);
        }
        catch(SQLException | FileNotFoundException e)
        {
            e.printStackTrace();
        }

        while ((record = cvsReader.getNextRecord()) != null)
        {
            try
            {
//                if(Integer.parseInt(record[0]) > 1000)
//                    continue;

                if (record[0].equals("?"))
                    statement.setNull(1, Types.INTEGER);
                else
                    statement.setInt(1, Integer.parseInt(record[0])); // person_id
                if (record[1].equals("?"))
                    statement.setNull(2, Types.INTEGER);
                else
                    statement.setInt(2, Integer.parseInt(record[1])); // car_id
                if (record[2].equals("?"))
                    statement.setNull(3, Types.VARCHAR);
                else
                    statement.setString(3, record[2]); // color
                if (record[3].equals("?"))
                    statement.setNull(4, Types.DATE);
                else
                {
                    String[] date = record[3].split("/");
                    statement.setDate(4, Date.valueOf(date[2] + "-" + date[1] + "-" + date[0])); // date_purchased
                }

                statement.executeUpdate();
            }
            catch (SQLException e)
            {
                System.out.println(e.getMessage());
            }
        }

    }