良好的数据库和结构来存储同义词 [英] Good database and structure to store synonyms

查看:115
本文介绍了良好的数据库和结构来存储同义词的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果您可以选择所需的数据库,并必须存储(查询和更新)词同义词,那么您将选择什么数据库?你怎么储存它们?让我们假设会有很多同义词(但我想数据大小在这里不会有问题)。

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).

推荐答案

保持它非常简单,你可以创建一个词表和一个关系表的同义词。您可以考虑添加一个限制,如 WordID1<

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)).

https://i.stack.imgur.com/OpikA.jpgalt =enter image description here>

这篇关于良好的数据库和结构来存储同义词的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆