Alternative design for a synonyms table?
- by Majid
I am working on an app which is to suggest alternative words/phrases for input text. I have doubts about what might be a good design for the synonyms table.
Design considerations:
number of synonyms is variable, i.e. football has one synonym (soccer), but in particular has two (particularly, specifically)
if football is a synonym to soccer, the relation exists in the opposite direction as well.
our goal is to query a word and find its synonyms
we want to keep the table small and make adding new words easy
What comes to my mind is a two column design with
col a = word and
col b = delimited list of synonyms
Is there any better alternative? What about using two tables, one for words and the other for relations?