Create a table with three columns. First column is the "from group", second column is "to group" and the third column is the co-relation between the two groups. Keep the data normalized.
Then just add data as needed and select with
select[third column]
from[my table]
where[first column] = 'a' and [second column] = 'e'
or [first column] = 'e' and [second column] = 'a'
N 56°04'39.16"
E 12°55'05.25"