多值字段有好主意吗? [英] Multivalued Fields a Good Idea?

查看:181
本文介绍了多值字段有好主意吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近介绍了新的Access 2007功能,它是多值字段。我最初的印象是,在单个字段中使用多个值是一个坏主意。传统上,如果你想允许一个记录有一个字段的几个值,你将创建另外两个表,并用外键链接它们。这允许容易的查询并且确保重复值引用相同的项目。在单元格中保留列表似乎违反了数据库的目的。

I have recently been introduced to the new Access 2007 feature which is multivalued fields. My initial impression is that it is a bad idea to make use of multiple values in a single field. Traditionally if you wanted to allow for a record to have several values for a field you would create another two tables and link them with foreign keys. This allows for easy querying and ensures that duplicate values reference the same item. Keeping lists in a cell seems like a violation of the purpose of databases.

这些字段有很好的用途,这不会让我感到肮脏吗?

Are there good uses for these fields which don't make me feel dirty?

推荐答案

多值字段的想法是支持轻松创建报表/接口对象,此外,显示问题的类别。而不是做一些激烈的工作,上帝禁止加入,据说它更容易存储:

The idea of multivalued fields was to support easy creation of report / interface objects, in addition, one can create a form that displays say categories for an issue. Instead of doing some intense work, god forbid joins, it was supposedly simplier to store:

机械,电气

作为字段中的值,而不是

as a value in a field rather than

Mechanical
电气

Mechanical Electrical

个人我不喜欢它和假设这种类型的字段是为非技术人员,如会计师创建:)(只是开玩笑)。没有认真,不要使用这个,除非你创建一个愚蠢的工具,很少有人会使用,很少有人会不得不采取进入。

Personnally I do not like it and assume this type of field was created for non technical personnel like accountants :) (just kidding). No seriously, do not use this unless you are creating a silly tool that rarely anyone will use and rarely anyone will ever have to tap into.

正确的方式来处理这个是连接,没有重复,列中没有多值(这是所有的3nf)。

The proper way to handle this is joins, no duplicates, and no multi values inside of columns (this is all 3nf anyhow).

另一个原因是创建的是支持多值共享点列表。

Another reason this was created was to support the multi values inside of a sharepoint list.

Jon

这篇关于多值字段有好主意吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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