数据库的通用名称别名/昵称的人 [英] Database of common name aliases / nicknames of people

查看:388
本文介绍了数据库的通用名称别名/昵称的人的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我参与了一个将搜索名称列表的SQL / .NET项目。我正在寻找一种方式来返回类似的名字的人的一些结果。如果搜索Tom,结果将包括Thom,Thomas等。这不是一个文件或Web服务不重要。示例设计:

I'm involved with a SQL / .NET project that will be searching through a list of names. I'm looking for a way to return some results on similar first names of people. If searching for "Tom" the results would include Thom, Thomas, etc. It is not important whether this be a file or a web service. Example Design:

Table "Names" has Name and NameID
Table "Nicknames" has Nickname, NicknameID and NameID

输出示例:

You searched for "John Smith"
You show results Jon Smith, Jonathan Smith, Johnny Smith, ...

有没有适合这种类型任务的公共或付费数据库来填充昵称和名称之间的关系?

Are there any databases out there (public or paid) suited to this type of task to populate a relationship between nicknames and names?

推荐答案

在昵称数据库上的Google搜索已变为 pdNickName (付费)。

A google search on "Database of Nicknames" turned up pdNickName (for pay).

此外,我认为你只需要一个表作业,而不是两个,具有NameID,Name和MasterNameID。所有昵称都进入名称列。一个名称被认为是规范的一个。所有昵称记录使用MasterNameID列指向该记录,其规范名称指向自身。

In addition, I think you only need a single table for this job, not two, with NameID, Name, and MasterNameID. All the nicknames go into the Name column. One name is considered the "canonical" one. All the nickname records use the MasterNameID column to point back to that record, with the canonical name pointing to itself.

您的两个表模式不包含其他信息,如何填写昵称表,您可能需要额外的代码来处理规范的情况。

Your two table schema contains no additional information and, depending on how you fill in the nickname table, you might need extra code to handle the canonical cases.

这篇关于数据库的通用名称别名/昵称的人的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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