gpt4 book ai didi

mysql - 规范化和规范形式 : database

转载 作者:太空宇宙 更新时间:2023-11-03 12:12:51 24 4
gpt4 key购买 nike

基本上很抱歉问这样的问题。但是我在考试中写这些关于 1,2 和 3rd 范式(条件)的定义时弄错了:

1 NF :

  1. 每一列的数据应该是原子的。不可以,多个值用逗号分隔
  2. 表格不应包含重复的列组
  3. 使用主键标识每条记录。

2 NF :

  • 必须在 1 NF 内
  • 不得包含冗余数据,如果是,则将其移动到单独的表中
  • 使用外键创建表

3 NF :

  • 必须在 2NF 中
  • 不包含不完全依赖于主键的列

我写错了吗?我的老师不同意。

来源this视频。

最佳答案

1NF

A row of data cannot contain repeating group of data i.e each column must have a unique value. Each row of data must have a unique identifier.

2NF

A table to be normalized to Second Normal Form should meet all the needs of First Normal Form and there must not be any partial dependency of any column on primary key. It means that for a table that has concatenated primary key, each column in the table that is not part of the primary key must depend upon the entire concatenated key for its existence. If any column depends only on one part of the concatenated key, then the table fails Second normal form

3NF

Third Normal form applies that every non-prime attribute of table must be dependent on primary key. The transitive functional dependency should be removed from the table. The table must be in Second Normal form.

更多引用:

  1. > http://www.studytonight.com/dbms/database-normalization.php
  2. > http://holowczak.com/database-normalization

关于mysql - 规范化和规范形式 : database,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23494147/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com