If you could choose the database you want and have to store (query and update) word synonyms then what database would you choose? And how would you store them? Let's assume that there will be a lot of synonyms (but I guess data size won't be a problem here).
相关问题
- SQL join to get the cartesian product of 2 columns
- sql execution latency when assign to a variable
- Difference between Types.INTEGER and Types.NULL in
- php PDO::FETCH_ASSOC doesnt detect select after ba
- Bulk update SQL Server C#
a simple relational structure might be like this:
Keeping it very simple, you could create a table of words and a relationship table for synonyms. You could consider adding a restriction like
WordID1 < WordID2
to prevent repeating pairs of words (e.g, (1,2) and (2,1)).