code: public static PreparedStatement createRelationTable(Connection connection, String relationTable) throws SQLException {
          try (Statement stmt = connection.createStatement()) {
              StringBuilder sb = new StringBuilder("CREATE TABLE ");
              sb.append(relationTable);
              sb.append("(ID_RELATION BIGINT PRIMARY KEY,"
                      + "USER_NAME VARCHAR,"
                      + "UID BIGINT,"
                      + "VISIBLE BOOLEAN,"
                      + "VERSION INTEGER,"
                      + "CHANGESET INTEGER,"
                      + "LAST_UPDATE TIMESTAMP);");
              stmt.execute(sb.toString());
          }
          return connection.prepareStatement("INSERT INTO " + relationTable + " VALUES ( ?,?,?,?,?,?,?);");
      }
docs: Create the relation table.
  
  @param connection
  @param relationTable
  @return
  @throws SQLException