When storing a user's religion in a "User Table", so that if you look down a column you would see "Christian" many times, "Muslim" many times, etc considered a failure of a normal form? Which form?

将用户的宗教信息存储在“用户表”中时,如果你向下看一列,你会多次看到“基督徒”,多次看到“穆斯林”,等等被认为是正常形式的失败?哪种形式?

The way I see it:

我看到它的方式:

  • 1nf: There are no repeating columns.

    1nf:没有重复的列。

  • 2nf: There is no concatenated primary key, so this does not apply.

    2nf:没有连接的主键,因此不适用。

  • 3nf: There is no dependency on a nonkey attribute.

    3nf:不依赖于nonkey属性。

Storing user religion this way does not seem to fail any normal form, however it seems very inefficient. Comments?

以这种方式存储用户宗教似乎不会失败任何正常形式,但它似乎非常低效。注释?

5 个解决方案

#1


6

Your design supports all normal forms. It's fine that your attribute has a string value. The size of the data type is irrelevant for normalization.

您的设计支持所有常规表单。你的属性有一个字符串值就没问题了。数据类型的大小与规范化无关。

The goal of normalization is not physical storage efficiency -- the goal is to prevent anomalies. And to support logical efficiency, i.e. store a given fact only once. In this case, the fact that the user on a given row is Christian.

规范化的目标不是物理存储效率 - 目标是防止异常。并且支持逻辑效率,即仅存储给定事实一次。在这种情况下,给定行上的用户是基督徒的事实。

更多相关文章

  1. Mysql5.7.10新加用户
  2. SQL查询 - 从表中查找不同的用户
  3. jsp+Mysql实现简单用户登陆
  4. DRP系统中用户增删改查(分页)Model1模式
  5. CentOS下MySQL的安装和修改用户密码
  6. Android 修改用户图像笔记
  7. Android记录4--自定义ToggleButton+用SharedPreferences保存用户
  8. 点击或长按的Android Listview用户交互设计上下文菜单
  9. java漏洞成黑客目标微软呼吁用户更新软件

随机推荐

  1. 实现底部导航栏中间凸起
  2. Android最新框架
  3. 关于android:layout_x 与 android:layout
  4. Android中style的使用
  5. Android启动流程分析(二) init进程的启动
  6. android EditText 全面阐述
  7. Android HTTP实例 发送请求和接收响应
  8. 如何删除Android自带的应用程序?
  9. Android开发从入门到精通
  10. Android Studio 错误:Invalid Android NDK