facebook 是否满足第二规范化形式? [英] Does facebook satisfy the 2nd Normalization Form?

查看:63
本文介绍了facebook 是否满足第二规范化形式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据第二规范化形式所有非键属性的功能都完全依赖于主键".这意味着所有非键属性都不能依赖于主键的子集.在 Facebook 中,我们可以通过 email_id、user_name 或 mobile_number 登录(因此 email_id、user_name 或 mobile_number 是主键).使用这些方法中的任何一种登录后,我们就可以访问整个帐户.我的问题是非键属性是否部分依赖于主键的子集?".我在 facebook 社区发布了这个问题,但没有得到任何答复.

According to 2nd normalization form "All non-key attributes are fully functional dependent on the primary key". It's mean all non-key attributes cannot be dependent on a subset of the primary key. In facebook we can login by email_id, user_name, or mobile_number (so email_id, user_name, or mobile_number are primary keys). And after login by using any of these methods we access the whole account. My question is "Is not it partially dependency of non-key attributes on subset of primary key?". I posted this question in facebook community but didn't get any answer.

推荐答案

对于 2NF 非键属性不能依赖于 candidate 键的 proper 子集.(每个集合都是它自己的一个子集.一个真子集是一个更小的子集.)(可以有多个候选键.可以选择一个作为主键.)

For 2NF non-key attributes cannot be dependent on a proper subset of a candidate key. (Every set is a subset of itself. A proper subset is a smaller subset.) (There can be multiple candidate keys. One can be picked as primary.)

如果关系变量的所有键都是单列,那么唯一的适当子集将是空集.当且仅当该列中的所有值都相同时,列在功能上不依赖于任何列.对于功能上依赖的列,没有其他适当的子集.因此,如果所有列都可以有不同的值并且所有候选键只有一列,那么关系变量必须在 2NF 中.

If all the keys of a relation variable are single columns then the only proper subsets would be the empty set. A column is functionally dependent on no columns if and only if all the values in that column are the same. There are no other proper subsets for columns to be functionally dependent on. So if all columns can have different values and all candidate keys have just one column then a relation variable must be in 2NF.

函数依赖和范式适用于特定的关系变量.你必须假设一个特定的设计来询问它的特定表.

Functional dependencies and normal forms apply to a particular relation variable. You have to hypothesize a particular design to ask about its particular tables.

整个帐户"通常不会仅由一个关系变量表示(作为实现状态或用户描述的一部分),仅仅因为它会有很多标准化可以消除的更新异常.

A "whole account" is typically not going to be represented (as part of either implementation state or user description) by only one relation variable just because it would have a lot of update anomalies that normalization would get rid of.

这篇关于facebook 是否满足第二规范化形式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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