函数依赖和规范化

发布于 2024-10-03 00:44:47 字数 166 浏览 4 评论 0原文

我正在尝试寻找一个很好的资源来研究函数依赖性和规范化。

有人知道我应该去哪里吗?我很难区分 FD 属于 1NF、2NF 还是 3NF?

我一直在阅读维基百科并使用谷歌搜索来找到好的研究,但找不到任何简单的解释。

也许你们也可以分享一下您在生活中是如何学习FD和正常化的。

I am trying to find a great resource to study for functional dependency and normalization.

Anyone have any idea where should I look to? I am having difficulty differentiating whether a FD is in 1NF, 2NF or 3NF?

I've been reading Wikipedia and used Google search to find good research, but can't find any that explains it in simple terms.

Maybe you all can share on how you learned FD's and normalization during your life as well.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

画尸师 2024-10-10 00:44:47

函数依赖定义了属性之间的函数关系。例如:PersonId 在功能上确定BirthDate(通常写为PersonId -> BirthDate)。另一种说法是:一个人的任何给定实例都有一个出生日期。请注意,相反的情况可能成立,也可能不成立。许多人可能是同一天出生的。给定一个 BirthDate,我们可能会发现许多 PersonId 共享该日期。

函数依赖集可用于合成关系(表)。的定义
前 3 个范式,包括 Boyce Codd 范式 (BCNF),用以下形式表示
给定的一组关系如何表示函数依赖关系。第四范式和第五范式涉及多值依赖(又一个问题)。

这里有一些关于函数依赖、规范化和数据库设计的免费资源。
在学习本材料时,准备好锻炼你的大脑和数学技能。

以下是来自各个学术网站的“幻灯片”...

以下为学术论文。阅读量较大,但值得付出努力。

如果你对这个主题非常感兴趣,我建议你花点钱买一本好书
关于关系数据库设计的主题。例如:CJ Date 的数据库系统简介

A functional dependency defines a functional relationship between attributes. For example: PersonId functionally determines BirthDate (normally written as PersonId -> BirthDate). Another way of saying this is: There is exactly one Birth Date for any given instance of a person. Note that the converse may or may not be true. Many people may have been born on the same day. Given a BirthDate we may find many PersonId sharing that date.

Sets of functional dependencies may be used to synthesize relations (tables). The definition of
the first 3 normal forms, including Boyce Codd Normal Form (BCNF) is stated in terms of
how a given set of relations represent functional dependencies. Fourth and fifth normal forms involve Multi-Valued dependencies (another kettle of fish).

Here are a few free resources about Functional Dependencies, Normalization and database design.
Be prepared to exercise your brain and math skills when studying this material.

The following are "slide shows" from various academic sites...

The following are academic papers. Heavier reading but well worth the effort.

If you are seriously interested in this subject I suggest you put out the cash for a good book
on the subject of Relational Database Design. For example: An Introduction to Database Systems by C.J. Date

后知后觉 2024-10-10 00:44:47

函数依赖是表的列之间的约束。例如,在表 person 中:

SSN         | Name         | Date of birth | Address     | Phone number 
------------------------------------------------------------------------
123-98-1234 | Cindy Cry    | 15-05-1983    | Los Angeles | 123-456-7891
121-45-6145 | John O'Neill | 30-01-1980    | Paris       | 568-974-2562
658-78-2369 | John Lannoy  | 30-01-1980    | Dallas      | 963-258-7413

这里,SSN(社会安全号码)列中的值决定了姓名、出生日期、地址和电话号码列中的值。这意味着,如果两行 SSN 列中的值相同,则姓名、出生日期、地址和电话号码列中的值将相等。 SSN 为 123-98-1234 的人始终称为 Cindy Cry,出生日期为 15-05-1983,依此类推。这种情况称为函数依赖

函数依赖的概念用于定义第二、第三范式以及 Boyce-Codd 范式 (BCNF)。

要了解有关函数依赖性和规范化的更多信息,您可以阅读当时著名的学术书籍,例如 CJ Date 的《数据库简介》,或任何 H. Garcia 的书籍-莫利纳、J.Ullman、J.Widom 三人组

如果您想要一种不太正式的方法,我们在我们的公司博客上开始发布一系列有关数据标准化的帖子

A functional dependency is a constraint between columns of your table. For example in the table person:

SSN         | Name         | Date of birth | Address     | Phone number 
------------------------------------------------------------------------
123-98-1234 | Cindy Cry    | 15-05-1983    | Los Angeles | 123-456-7891
121-45-6145 | John O'Neill | 30-01-1980    | Paris       | 568-974-2562
658-78-2369 | John Lannoy  | 30-01-1980    | Dallas      | 963-258-7413

Here, the value in the column SSN (Social Security Number) determines the values in columns name, date of birth, address and phone number. This means that if we had two rows with the same value in the SSN column, then values in columns name, date of birth, address and phone number would be equal. A person with SSN 123-98-1234 is always called Cindy Cry, is born on 15-05-1983, and so on. A situation like this is called functional dependency.

The notion of functional dependencies is used to define second, and third normal form, and the Boyce-Codd normal form (BCNF).

To read more about functional dependencies and normalization you can go to then well-known academic books like Introduction to Databases by C.J. Date, or any of the books by the H. Garcia-Molina, J.Ullman, J.Widom trio.

If you want a less formal approach, we're starting a series of posts on data normalization on our company blog.

弥枳 2024-10-10 00:44:47

什么是函数依赖?

功能依赖性是规范化过程的基础。功能依赖性描述了表中属性(列)之间的关系。
换句话说,依赖关系 FD:X→Y 意味着 Y 的值由 X 的值决定。共享相同 X 值的两个元组必然具有相同的 Y 值。
输入图像描述这里

什么是数据库规范化?

数据库规范化是一个逐步的正式过程,它允许我们以最小化数据冗余和更新异常(有关更新异常的更多信息,请参见上文)的方式分解数据库表。

输入图像描述这里
礼貌

What is Functional Dependency?

Functional Dependencies are fundamental to the process of Normalization Functional Dependency describes the relationship between attributes(columns) in a table.
In other words, a dependency FD: X → Y means that the values of Y are determined by the values of X. Two tuples sharing the same values of X will necessarily have the same values of Y.
enter image description here

What is Database Normalization?

Database Normalization is a step wise formal process that allows us to decompose Database Tables in such a way that both Data Redundancy and Update Anomalies(see above for more info on update anomalies) are minimized.

enter image description here
Courtesy

装纯掩盖桑 2024-10-10 00:44:47

函数依赖不具有任何正常形式。范式是满足某些给定 FD 集的关系的属性。

不要依赖维基百科或谷歌。在线资源中有太多错误信息和垃圾。尝试:

Chris Date 的数据库系统简介

Fabian Pascal 的数据库管理实际问题

A functional dependency isn't in any normal form. Normal Form is a property of a relation that satisfies some given set of FDs.

Don't rely on Wikipedia or Google. There is too much misinformation and rubbish from online sources. Try:

Introduction to Database Systems by Chris Date

Practical Issues in Database Management by Fabian Pascal

少女的英雄梦 2024-10-10 00:44:47

我们可以通过假设我们有两个属性并且一个属性完全依赖于另一个属性的方式来理解函数依赖,这称为函数依赖。

举一个现实生活中的例子。我们知道每个人都有一个与个人姓名对应的社会安全号码。假设弗兰克是一个人,我们想知道这个人的社会安全号码,但数据库将无法帮助提供此信息,因为可能有很多名为弗兰克的人,但我们可以根据社会安全号码确定人的姓名,因此姓名该人的功能完全取决于社会安全号码。

We can understand functional dependency in a way that assume we have two attribute and one attribute in totally dependent on the other is called functional dependency.

Say take a real life example. We know that everybody has a social security number against the name of the person . Say Frank is a person and we want to know the social security number of this person but database will be unable to help out with this information because there may be many persons named frank but we can determine name of person against social security number so name of the person is totally functional dependent on Social security number.

ぇ气 2024-10-10 00:44:47

功能依赖

功能依赖可以定义为关系中的属性之间存在的关系。函数依赖用于创建 Boyce Codd 范式(缩写为 BCNF)中的关系。如果C和D是关系R的属性并且属性C在功能上确定属性D,则两个属性之间的功能依赖可以被表达为C→D。

示例:在人员架构下方

person(national_id, name, address);

这里national_id在功能上决定了person_name。所以功能依赖是national_id ->姓名;

为了消除冗余,函数依赖在关系数据库设计中很重要。

Functional Dependency

Functional dependency can be defined as relationship that exits between attributes in relation. Functional dependencies are used to create relation in Boyce Codd Normal Form abbreviated as BCNF. If C and D are the attributes of relation R and attribute C functionally determines attributes D then the functional dependency between both attribute can be expressed as C->D.

Example : Below the person schema

person(national_id, name, address);

Here national_id functionally determines the person_name. So functional dependency is national_id -> name;

Functional dependency is important in relational database design for the purpose of eliminating redundancy.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文