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

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

问题描述

我最近了解了新的 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:

机械、电气

作为字段中的值而不是

机械电气

我个人不喜欢它,并认为这种类型的领域是为会计师等非技术人员创建的:)(开玩笑).不要当真,除非您正在创建一个很少有人会使用也很少有人需要使用的愚蠢工具,否则不要使用它.

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.

乔恩

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

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