Dataset : https://www.kaggle.com/datasets/rhuebner/human-resources-data-set
The file only contains one table, where all of the data is in one table. This is not a good practice because it takes up too much space in our database. That is why data cleaning and wrangling are very important in order to maximize datesets.
The goal of this activity is to create Dim and Fact table for this one table, formulate advance queries
DML(Data Manipulation Language) and DDL(Data Definition Language) Link:
https://github.com/ctian5505/_SQL/blob/main/HumarResourceDatabase(DML%20&%20DDL).sql
DQL - Data Query Language
https://github.com/ctian5505/_SQL/blob/main/HumarResourceDatabase(DQL).sql
PowerBI DAX Queries
https://github.com/ctian5505/_PowerBI/blob/main/HumarResourceDatabase(DAX).pbix
Raw Data Headers.
Employee_Name, EmpID, MarriedID ,MaritalStatusID, GenderID, EmpStatusID, DeptID, PerfScoreID, FromDiversityJobFairID, Salary, Termd, PositionID, Position, State, Zip, DOB, Sex, MaritalDesc, CitizenDesc, HispanicLatino, RaceDesc, DateofHire, DateofTermination, TermReason, EmploymentStatus, Department, ManagerName, ManagerID, RecruitmentSource, PerformanceScore, EngagementSurvey, EmpSatisfaction, SpecialProjectsCount, LastPerformanceReview_Date, DaysLateLast30, Absences
Planned table output.
Table Name : DimPerformanceScore
- PerfScoreID
- PerformanceScore
Table Name : DimManager
- ManagerID
- ManagerName
Table Name : DimGender
- GenderID
- Sex
Table Name : DimDepartment
- DeptID
- Department
Table Name : DimMaritalStatus
- MaritalStatusID
- MaritalDesc
Table Name : DimPosition
- PositionID
- Position
Table Name : DimEmploymentStatus
- EmpStatusID
- EmploymentStatus
Table Name : DimEmployeeSatisfaction
- EmpSatisfactionID
- EmpSatisfaction
Table Name : FactHRRecord
- EmpID
- MarriedID
- MaritalStatusID
- GenderID
- EmpStatusID
- DeptID
- PerfScoreID
- PositionID
- ManagerID
Table Name : Dim_Employee
- EmpID
- Employee_Name
- Salary
- State
- Zip
- DOB
- CitizenDesc
- RaceDesc
- DateofHire
- DateofTermination
- TermReason
- RecruitmentSource
- SpecialProjectsCount
- LastPerformanceReview_Date
- DaysLateLast30
- Absences