In regards to WingedPanther's idea, in relational model theory, this is what's known as a
join table. A join table, or
junction table,
bridge table, or
map table, as they're sometimes called, is used to implement a many-to-many relationship between two entities. (Or in your case, a many-to-many relationship of an entity to itself.) The join table usually has two fields, which are both foreign keys referencing the identifying fields of the entities you wish to create a relationship between.
In your case, you have a
many-to-many relationship of an entity to itself. What that means is, one word may be related to many other words, and each of these many different words may be related to the same word. This can't be implemented sufficiently with only additional fields in the 'word' entity table. The only way is through a join table.
So in your example above, word 'a' is related to word 'b', so you add a row to the join table that links word 1 to word 2:
+----+----+
| w1 | w2 |
+----+----+
| 1 | 2 |
+----+----+
Keep in mind, this describes a
one-way relationship; that is, 1 is related to 2, but 2 isn't necessarily related to 1. (Unless you write your logic to search from both sides, but this next part is a better solution: )
To add the relationships for word 'b', you'll simply add a row for each relationship represented, like so:
+----+----+
| w1 | w2 |
+----+----+
| 1 | 2 |
| 2 | 1 |
| 2 | 3 |
+----+----+
At this point, you can pretty well figure out what to do for the rest.
Anyway, not that I'm providing any new information here that wasn't already said, but I thought I'd explain a little of the theory behind why it's done that way. Hope it helps.