在数据仓库(关系)中使用外键是好的做法吗? [英] Is it good practice to have foreign keys in a datawarehouse (relationships)?

查看:138
本文介绍了在数据仓库(关系)中使用外键是好的做法吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我认为这个问题很清楚。数据仓库表中的某些列可能与主键有关系。但它是好的做法吗?它是反规范的,所以它不应该再次删除(数据仓库中的数据)。希望问题有些清楚。

I think the question is clear enough. Some of the columns in my datawarehouse table could have a relationship to a primary key. But is it good practice? It is denormalized, so it should never be deleted again (data in datawarehouse). Hope question is somewhat clear enough.

推荐答案

我不知道。但没有人回答,所以我googled并发现最佳做法文件< a)

I have no idea. But nobody is answering, so I googled and found a best practises paper who seem to say the very helpful "it depends" :-)


虽然外键约束有助于数据完整性,但它们有一个关联的所有插入,更新和删除语句的成本。当您希望确保数据完整性和验证时,请小心使用仓库或ODS中的约束。

While foreign key constraints help data integrity, they have an associated cost on all insert, update and delete statements. Give careful attention to the use of constraints in your warehouse or ODS when you wish to ensure data integrity and validation

这篇关于在数据仓库(关系)中使用外键是好的做法吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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