Search code examples
databasedatabase-designdata-modelingdata-warehousefact-table

Can I store textual fields in fact table of Datawarehouse?


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)


Solution

  • 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.