Modeling staff dimension in data warehouse

data-warehousedatabase-designdimensional-modeling

I need to write a data warehouse diagram. I've got a problem with staff area. I have to store a information about workers details like name, age etc., and workers job time and agreement details like job_start, job_end, salary etc.

Firstly, I tried to draw a dimension for each data, but I consider whether it should be done like a connection between these dimensions each other?

Best Answer

Typically dimensional modelling starts by identifying facts and the dimensions about those facts. Most of those things you mention are dimension attributes.

Staff/employees alone and their place in an organization is probably going to be modeled with a factless fact table.

You may well have a supervisor/employee relationship, and this would be an instance of a factless fact table where the facts in that table are likely to be dates of supervision (these are really a lot like degenerate dimensions).

However, I expect you will have fact tables like hours worked etc which will use these dimensions as foreign keys.

It is very unusual to be modeling dimensions in isolation, as dimensional modeling is a very pragmatic type of approach which is very dependent upon the type of data you have as well as the types of analysis. The choice of how many dimension tables and which attributes go in which dimensions is very dependent upon data behavior and can sometimes be quite arbitrary.