There is a problem with the schema shown in Figure 5.6 in that it does
not properly represent a hierarchy. The only way to represent this particular
structure is by using two hierarchies, because NULL-valued and non NULL-
valued states cannot be represented by a single structure, see Figure 5.7.
Figure 5.6
Normalizing
locations.
Figure 5.7
There are two
options for a
hierarchy.
122
5.2
Dimension Object Syntax
There will now be two CREATE DIMENSION statements in order to
cater for locations, as shown below:
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month, and much more.