将名称存储为文本时哪种方式更好? [英] Which way is better when storing name as text?

查看:69
本文介绍了将名称存储为文本时哪种方式更好?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最好做第一个,中间个,最后一个或姓氏,给定名字(如果有中间名,则包含中间名)?



我正在与数百万工作的名字,所以我正在寻找最有效的方式。



感谢您的帮助



我尝试了什么:



只是好奇哪种方法是在数据库中存储名称。

is it better to do First, Middle, and last or Surname, Given name( which includes middle if they have one)?

I am working with millions of names, so I am looking for the most efficient way of doing this.

Thanks for the help

What I have tried:

Just curious on which is the most appropriate way to store names in a database.

推荐答案

Quote:

这是在数据库中存储名称的最合适方式。

which is the most appropriate way to store names in a database.



这取决于...



如何使用数据?

什么是查询要求?



一旦你知道如何回答这些简单的问题,你就会知道需要做出什么决定......


It depends...

How is the data going to be used?
What are query the requirements?

Once you know how you are going to answer these simple questions, then you will know what decision needs to be made...


如果您有提供名字,中间名和姓氏的数据条目,以这种方式存储它是明智的 - 用熟悉的和正式的方式来解决人们的问题很方便:亲爱的詹姆斯, 和亲爱的詹姆斯·提比乌斯·柯克先生作为一份表格信函的一部分收到时,他们的内涵截然不同。此外,如果你有它,为什么要丢弃信息?

如果你正在设计整个输入系统,包括数据库,那么我会选择姓名或更多可能只是名称,因为它更好地处理国际化(并非所有文化都熟悉名字第一)。
If you have data entry which provides First, Middle, and Last names, it's sensible to store it that way - it can be handy to have a "familiar" and a "formal" way to address people: "Dear James," and "Dear Mr James Tiberius Kirk" have very different connotations when received as part of a form letter for example. And besides, if you've got it, why discard information?
If you are designing the whole input system, including the DB, then I'd go for first and last name or more probably just "Name" as it handles internationalization better (not all cultures have the familiar name first).


引用:

只是好奇哪种方式最适合存储名称一个数据库。

Just curious on which is the most appropriate way to store names in a database.



存储名称的最合适方式取决于您的使用情况。

拥有First + Middle + Last Name的单个字段是如果您只是想给每个人发信或者在搜索某人时总是知道确切的拼写,那就很好。

如果你可以搜索部分拼写单独的字段会更有效。



全部取决于你对这些名字的处理方式。


"The most appropriate way to store names" depends on the usage you have.
Having a single field with "First+Middle+Last Name" is fine if you only want to send letter to everyone or always know exact spelling when you search someone.
If you may search on partial spelling separate fields will be more efficient.

All depend on what you do with those names.


这篇关于将名称存储为文本时哪种方式更好?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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