It appears to be a common practice to let the time dimension of OLAP cubes be in a table of its own, like the other dimensions.
My question is: why?
I simply don't see what the advantage would be to have a time_dimension
table of (int, timestamp)
that is joined with the cube on some time_id
foreign key, instead of having a timestamp
column in the cube itself.
Principally, points in time are immutable and constant, and they are their own value. I don't find it very likely that one would want to change the associated value for a given time_id
.
In addition, the timestamp
column type is 4 bytes wide (in MySQL), as is the int
type that would otherwise typically be the key, so cannot be to save space either.
In discussing this with my colleagues, the only somewhat sensible argument I have been able to come up with is conformity with the other dimensions. But I find this argument rather weak.