从表中删除异常
我有这张表,我应该重新设计它以消除其中的所有异常情况。我不会给出表,而是给出依赖项。
The functional dependencies are
(Product, Store) -> Dept
Store -> Manager
Dept-> Assist
(Product, Store)->Price
Product-> Weight
Product-> Manufact
Manufact-> Manuloc
产品和商店是这种关系中的关键
好吧,所以我必须通过分解表并创建新表来消除异常,并说明每个表中的内容。我不确定该怎么做。
I have this table and I am supposed to re-design it to remove all anomalies from it. I will not give the table but the dependencies.
The functional dependencies are
(Product, Store) -> Dept
Store -> Manager
Dept-> Assist
(Product, Store)->Price
Product-> Weight
Product-> Manufact
Manufact-> Manuloc
Product and Store are the keys in this relation
Ok so I have to remove the anomalies by breaking up the table and creating new ones and state what will be in each table. I am unsure how to do that.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
应用阿姆斯特朗公理以及从中得出的规则。 (我确定这在你的教科书中。检查索引。)例如,给定这两个函数依赖关系 (FD):
你可以应用传递性规则来确定未声明的 FD:
从给定的 FD 中,导出一个FD 的不可约集合;这组决定了你的桌子。
此示例来自 Date 的数据库系统简介。 (他对此进行了更完整的处理。)
使用阿姆斯特朗公理对右手单例进行了重写:
FD
A -> B
出现两次;我们可以丢弃一个而不丢失信息。我们可以减少AC -> D
到A -> D
,我们可以消除AB -> C。我们可以消除
A -> C
,从这个不可约的 FD 集合中,您将得出两个表
Apply Armstrong's axioms and the rules derived from them. (I'm sure this is in your textbook. Check the index.) For example, given these two functional dependencies (FDs):
you can apply the transitivity rule to determine an unstated FD:
From the FDs you're given, derive an irreducible set of FDs; this set determines your tables.
This example is from Date's Introduction to Database Systems. (He gives a more complete treatment of it.) Given
rewrite for right-hand singletons using Armstrong's axioms:
The FD
A -> B
occurs twice; we can discard one without losing information. We can reduceAC -> D
toA -> D
, and we can eliminateAB -> C
. And we can eliminateA -> C
, leavingFrom this irreducible set of FDs, you'd derive the two tables