What is the best way to manage interdependent indexes So I have a table of items as so

|firstIndex|subIndex|relatedIndexes|
-----------------------------------
|     1    |   1    |  2 ,6 , 8    |
-----------------------------------
|     1    |   2    |  2 ,6 , 8    |
-----------------------------------
|     1    |   3    |  2 ,6 , 8    |
-----------------------------------
|     2    |   1    |  1, 10 , 12  |
-----------------------------------
|     3    |   1    |  20, 50, 77  |
-----------------------------------
|     4    |   1    |  ...         |
-----------------------------------


So both firstIndex an subIndex are the primary keys (they cannot be two times the same combination, hope I'm clear :) ), subIndex is the index representing the number of the variation of firstIndex and finally relatedIndexes is the array of  firstIndex related to other firstIndex. As you can see in the sample firstIndex 1 is related to firstIndex 2 and 2 to 1

My question is how can I represent, store and manage this model the easiest and quickiest way in MYSQL?
It can looks like

CREATE TABLE indices (firstIndex INT NOT NULL,
                      subIndex INT NOT NULL,
                      PRIMARY KEY (firstIndex, subIndex)
                     );

CREATE TABLE refs (baseIndex INT NOT NULL,
                   relatedIndex INT NOT NULL,
                   PRIMARY KEY (baseIndex, relatedIndex),
                   FOREIGN KEY fk_bi (baseIndex) REFERENCES indices (firstIndex),
                   FOREIGN KEY fk_ri (relatedIndex) REFERENCES indices (firstIndex)
                  );




Update


  why there's a baseIndex + relatedIndex 


It is a "link" table (instead of non-relational CSV-field relatedIndexes). The (2,6,8) value for firstIndex=1 in a source scheme is transferred to 3 separate records in refs with (1,2),(1,6),(1,8) value pairs. 


  what is Foreign Key 


It is constraint references which do not allow to insert into refs an index value which not exists in indices table. And prevents deletion a record from indices while at least one reference exists in refs.