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

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

问题描述

我参与了一个 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?

推荐答案

谷歌搜索昵称数据库"出现 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天全站免登陆