【问题标题】:Factless Fact Table has 1:1 Relationship with Dimension TableFactless Fact Table 与 Dimension Table 具有 1:1 的关系
【发布时间】:2014-05-30 15:37:43
【问题描述】:
我正在审查旧的数据仓库,并且我遇到了非事实事实表 (Fact_contact) 和 Dim_Incident 之间不寻常的 1:1 关系。
通常,Fact_Contact 用于记录案例/票证/查询。一些客户是匿名的;因此,存在用于不同计数的 uniqueCustRef 和 CustomerRef “事实”。
事实和维度表之间的 1:1 关系感觉不对。这是推荐的解决方案吗?目前,没有文档说明它为何如此设计。
谢谢。
【问题讨论】:
标签:
data-warehouse
business-intelligence
dimensions
dimensional-modeling
fact-table
【解决方案1】:
你可能是对的;这看起来不对。
FactContact
不应该有 eventId
我不知道要求,但逻辑上认为我会建议以下内容;
IncidentType - what is the type of incident that is logged
FirstIncidentId - the first incident corresponding to the customer/IncidentType
FirstIncidentDate - Date of the above incident
LastIncidentId - the last incident corresponding to the customer/incidenttype - when there is only one incident you will have the firstincidentid and lastincidentid the same
LastIncidentDate - the date of the above incident
IncidentCount - the number of incidents for the customer/incidenttype combination
希望对你有帮助