可以在数据仓库的事实表中存储文本字段吗?

huangapple go评论63阅读模式
英文:

Can I store textual fields in fact table of Datawarehouse?

问题

我有一个名为Fact_Employee_Ratings的事实表,这些是从Glassdoor上获取的关于一家公司的评价。该评价实际上分为两部分,员工会说出他们喜欢和不喜欢公司的地方。这是我对事实表进行建模的方式,但我不确定是否可以像下面这样在事实表中包含文本列"review_cons"和"review_pros",因为根据许多网站的说法,事实表只能包含外键和数值度量:

fk_employee (整数)

fk_publish_date (整数)

review_pros (变长字符)

review_cons (变长字符)

engagement_score (整数)

review_rating (整数)

英文:

I have a fact table called Fact_Employee_Ratings, these are reviews about a company scrapped from Glassdoor. The review is actually divided into two parts, employees would give what they liked and what they disliked about the company. This is how I modeled the fact table but I'm not sure if I can include textual columns in the fact table "review_cons" and "review_pros" as follows because according to many websites, the fact table could only contain foreign keys and numerical measures :

fk_employee (int)

fk_publish_date (int)

review_pros (varchar)

review_cons (varchar)

engagement_score (int)

review_rating (int)

答案1

得分: 1

我会考虑@NickW的建议并考虑以下内容:

  • 员工维度:包含有关员工的信息(员工SK,姓名,部门)
  • 评审维度:包含有关评审本身的详细信息(评审SK,评审优点,评审缺点)
  • 日期维度

同时,在事实表中,您仍然可以考虑包括参与度分数,评审评分等度量。JFY,这种类型的事实表被称为事务事实表,因为它侧重于捕获业务流程中的个别事件或交易。

英文:

I would go for @NickW 's suggestion and consider the following :

  • Employee dimension: Contains information about employees (employeeSK,
    name, department)
  • Review dimension: Contains details about the review itself
    (reviewSK,review_pros, review_cons)
  • Date dimension

Meanwhile in the fact table, you can still consider including measures such as the engagement_score,review_rating

JFY, this type of fact tables is called transactional fact table since it focuses on capturing individual events or transactions within the business process.

huangapple
  • 本文由 发表于 2023年6月1日 18:37:38
  • 转载请务必保留本文链接:https://go.coder-hub.com/76381028.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定