简体   繁体   English

DWH 模型化 - 2 个事实表之间的关系

[英]DWH modelization - Relationship between 2 fact tables

Hy,嗨,

I realize a DWH and i have a probleme with the relationship between my tables.我意识到 DWH 并且我对表之间的关系有疑问。

My context:我的背景:

  • "job offer": contains the list of all job offer. “工作机会”:包含所有工作机会的列表。 A job offer is created by a company, have a validation date and can be publish to a jobboard (like a likedIn)工作机会由公司创建,具有验证日期并且可以发布到工作板(如 likedIn)
  • "candidaties": a candidate applies to a job offer published to a joboard “候选人”:候选人申请发布到招聘板上的工作机会

"Job offer" is ambigous table, it be considered as a fact table (contain externals Id, have a Date property). “工作机会”是一个不明确的表,它被认为是一个事实表(包含外部 Id,有一个 Date 属性)。 can also consideres as dim table, have a many properties and id use another fact.也可以认为是昏暗的表,有很多属性和 id 使用另一个事实。 job offer have a lot of row (several million) job offer有很多排(几百万)

I identified 3 facts: JobOffer, PublicationOffer, Candidaty.我确定了 3 个事实:JobOffer、PublicationOffer、Candidaty。 The fact table is a transactions and have only count measure (considered as factless)事实表是一个事务并且只有计数度量(被认为是无事实的)

I have difficulties to create relathionship because i have relationship between fact table (it's forbiden)我很难建立关系,因为我在事实表之间有关系(这是禁止的)

I think create two tables job offers, one dim table, the other fact table.我想创建两个表工作机会,一个暗表,另一个事实表。 Or considered job offer as a dim table.或者将工作机会视为一张昏暗的桌子。 What the good choice?有什么好的选择?

Models representation: model 1 or model 2型号表示: model 1model 2

My envisaged solution solution 1 or solution 2我设想的方案方案一或者方案二

THX谢谢

designing a DWH should follow these broad steps设计 DWH 应遵循以下主要步骤

  1. Identify your reporting requirements确定您的报告要求
  2. Identify the measures that will deliver these reporting requirements确定将满足这些报告要求的措施
  3. Identify the dimensions that will allow you to aggregate and filter your measures in accordance with your requirements确定将允许您根据您的要求聚合和过滤您的度量的维度
  4. Define the grain of your fact table(s) which then drives which of your measures can be in the same fact table and which need their own fact table定义事实表的粒度,然后驱动哪些度量可以在同一个事实表中,哪些需要自己的事实表

If you follow this approach you should be able to answer your own question如果你遵循这种方法,你应该能够回答你自己的问题

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM