A is related to B and D; B is related to A and D; C is related to D; and D is related to A B and C. Now when I add an item to the database, let's say item E and E is related to B C and D, so then it would go in the database and propagate itself into the related entries. After the addition you'd be left with A related to B and D; B related to A D and E; C related to D and E; D related to A B C and E; and E related to B C and D.
I've made a mockup of what I'm referring to in order to make what I'm asking easier to understand.