SlideShare ist ein Scribd-Unternehmen logo
1 von 15
Downloaden Sie, um offline zu lesen
DATA WAREHOUSING
Multi Dimensional
Data Modeling
Hierarchies and Levels
2
product    prodId    name price                                store     storeId   city
             p1       bolt 10                                              c1      nyc
             p2       nut   5                                              c2      sfo
                                                                           c3       la


           sale oderId date       custId    prodId   storeId    qty       amt
                 o100 1/7/97        53        p1       c1        1         12
                 o102 2/7/97        53        p2       c1        2         11
                 105 3/8/97        111        p1       c3        5         50




          customer      custId     name         address                city
                          53         joe        10 main                sfo
                          81        fred        12 main                sfo
                         111        sally       80 willow               la

3                                                                                         3
Group data within dimensions: SalesRep
      Region
       ▪ SubRegion
         ▪ Country
            Customer




4                                            4
   Hierarchies are logical structures that use ordered levels as a
        means of organizing data.
         For a particular level value, a value at the next higher level is its
          parent, and values at the next lower level are its children




5                                                                                 5
   Hierarchies impose a family structure on dimension values.
        For a particular level value, a value at the next higher level is
        its parent, and values at the next lower level are its children.
       These familial relationships enable analysts to access data
        quickly.




6                                                                           6
A dimension can be composed of more than one
      hierarchy.

      years    weeks   months
                                time   day   week   month   quarter   year
                                        1     1       1       1       2000
                                        2     1       1       1       2000
    quarters                            3     1       1       1       2000
               days    weeks            4     1       1       1       2000
                                        5     1       1       1       2000
                                        6     1       1       1       2000
                                        7     1       1       1       2000
     months                             8     2       1       1       2000




7                                                                            7
   Query tools use hierarchies to enable you to drill down into
        your data to view different levels of granularity.
         This is one of the key benefits of a data warehouse.




8                                                                      8
   When designing hierarchies, you must consider the
        relationships in business structures.
         For example, a divisional multilevel sales organization.




9                                                                    9
   A level represents a position in a hierarchy. For
    example, a time dimension might have a hierarchy
    that represents data at the month, quarter, and year
    levels.
     Within a hierarchy, each level is logically connected to the
      levels above and below it.
             years
                            time   day   week   month   quarter   year
                                    1     1       1       1       2000
                                    2     1       1       1       2000
                                    3     1       1       1       2000
           quarters                 4     1       1       1       2000
                                    5     1       1       1       2000
                                    6     1       1       1       2000
                                    7     1       1       1       2000
            months                  8     2       1       1       2000

                                                                         10
   The levels in a dimension are organized into
    one or more hierarchies.
            years        months



          quarters
                         weeks


           months




                                                   11
   Levels range from general to specific, with the root
    level as the highest or most general level.
                    all


                               years


                weeks
                               quarters



                                months



                        days
                                                           12
   Level relationships specify top-to-bottom
    ordering of levels from most general (the
    root) to most specific information.
     They define the parent-child relationship between
     the levels in a hierarchy.




                                                          13
store
                         city           region

                                                 sType tId    size    location
                                                        t1   small   downtown
store storeId   cityId   tId     mgr                    t2   large     suburbs
        s5       sfo      t1      joe
        s7       sfo      t2     fred            city   cityId pop   regId
        s9        la      t1    nancy                    sfo   1M    north
                                                          la   5M    south



                                                           region regId   name
                                                                  north cold region
                                                                  south warm region


                                                                                      14
   The Data Warehouse Toolkit.Second
    Edition.The Complete Guide to Dimensional
    Modeling.Ralph Kimball.Margy Ross

Weitere ähnliche Inhalte

Andere mochten auch

Andere mochten auch (11)

Creació de l’Associated Press
Creació de l’Associated PressCreació de l’Associated Press
Creació de l’Associated Press
 
Agreggates ii
Agreggates iiAgreggates ii
Agreggates ii
 
USDA
USDAUSDA
USDA
 
Rowena chiu 2 (embedded music)
Rowena chiu 2 (embedded music)Rowena chiu 2 (embedded music)
Rowena chiu 2 (embedded music)
 
Olapsql
OlapsqlOlapsql
Olapsql
 
Dewasa madya
Dewasa madyaDewasa madya
Dewasa madya
 
3 dw architectures
3 dw architectures3 dw architectures
3 dw architectures
 
The victorian age
The victorian ageThe victorian age
The victorian age
 
Suggestopedia
SuggestopediaSuggestopedia
Suggestopedia
 
The Elizabethan Age
The Elizabethan AgeThe Elizabethan Age
The Elizabethan Age
 
IELTS Reading Preparation Tips
IELTS Reading Preparation TipsIELTS Reading Preparation Tips
IELTS Reading Preparation Tips
 

Mehr von Claudia Gomez

Mehr von Claudia Gomez (20)

3 olap storage
3 olap storage3 olap storage
3 olap storage
 
3 olap storage
3 olap storage3 olap storage
3 olap storage
 
2 olap operaciones
2 olap operaciones2 olap operaciones
2 olap operaciones
 
1 introba
1 introba1 introba
1 introba
 
Diseño fisico particiones_3
Diseño fisico particiones_3Diseño fisico particiones_3
Diseño fisico particiones_3
 
Diseño fisico indices_2
Diseño fisico indices_2Diseño fisico indices_2
Diseño fisico indices_2
 
Diseño fisico 1
Diseño fisico 1Diseño fisico 1
Diseño fisico 1
 
Agreggates iii
Agreggates iiiAgreggates iii
Agreggates iii
 
Agreggates i
Agreggates iAgreggates i
Agreggates i
 
Dw design fact_tables_types_6
Dw design fact_tables_types_6Dw design fact_tables_types_6
Dw design fact_tables_types_6
 
Dw design date_dimension_1_1
Dw design date_dimension_1_1Dw design date_dimension_1_1
Dw design date_dimension_1_1
 
Dw design 4_bus_architecture
Dw design 4_bus_architectureDw design 4_bus_architecture
Dw design 4_bus_architecture
 
Dw design 3_surro_keys
Dw design 3_surro_keysDw design 3_surro_keys
Dw design 3_surro_keys
 
Dw design 2_conceptual_model
Dw design 2_conceptual_modelDw design 2_conceptual_model
Dw design 2_conceptual_model
 
Dw design 1_dim_facts
Dw design 1_dim_factsDw design 1_dim_facts
Dw design 1_dim_facts
 
2 dw requeriments
2 dw requeriments2 dw requeriments
2 dw requeriments
 
1 dw projectplanning
1 dw projectplanning1 dw projectplanning
1 dw projectplanning
 
0 dw process
0 dw process0 dw process
0 dw process
 
Clase2 introdw
Clase2 introdwClase2 introdw
Clase2 introdw
 
Intro bi
Intro biIntro bi
Intro bi
 

Dw design hierarchies_7

  • 1. DATA WAREHOUSING Multi Dimensional Data Modeling Hierarchies and Levels
  • 2. 2
  • 3. product prodId name price store storeId city p1 bolt 10 c1 nyc p2 nut 5 c2 sfo c3 la sale oderId date custId prodId storeId qty amt o100 1/7/97 53 p1 c1 1 12 o102 2/7/97 53 p2 c1 2 11 105 3/8/97 111 p1 c3 5 50 customer custId name address city 53 joe 10 main sfo 81 fred 12 main sfo 111 sally 80 willow la 3 3
  • 4. Group data within dimensions: SalesRep  Region ▪ SubRegion ▪ Country  Customer 4 4
  • 5. Hierarchies are logical structures that use ordered levels as a means of organizing data.  For a particular level value, a value at the next higher level is its parent, and values at the next lower level are its children 5 5
  • 6. Hierarchies impose a family structure on dimension values. For a particular level value, a value at the next higher level is its parent, and values at the next lower level are its children.  These familial relationships enable analysts to access data quickly. 6 6
  • 7. A dimension can be composed of more than one hierarchy. years weeks months time day week month quarter year 1 1 1 1 2000 2 1 1 1 2000 quarters 3 1 1 1 2000 days weeks 4 1 1 1 2000 5 1 1 1 2000 6 1 1 1 2000 7 1 1 1 2000 months 8 2 1 1 2000 7 7
  • 8. Query tools use hierarchies to enable you to drill down into your data to view different levels of granularity.  This is one of the key benefits of a data warehouse. 8 8
  • 9. When designing hierarchies, you must consider the relationships in business structures.  For example, a divisional multilevel sales organization. 9 9
  • 10. A level represents a position in a hierarchy. For example, a time dimension might have a hierarchy that represents data at the month, quarter, and year levels.  Within a hierarchy, each level is logically connected to the levels above and below it. years time day week month quarter year 1 1 1 1 2000 2 1 1 1 2000 3 1 1 1 2000 quarters 4 1 1 1 2000 5 1 1 1 2000 6 1 1 1 2000 7 1 1 1 2000 months 8 2 1 1 2000 10
  • 11. The levels in a dimension are organized into one or more hierarchies. years months quarters weeks months 11
  • 12. Levels range from general to specific, with the root level as the highest or most general level. all years weeks quarters months days 12
  • 13. Level relationships specify top-to-bottom ordering of levels from most general (the root) to most specific information.  They define the parent-child relationship between the levels in a hierarchy. 13
  • 14. store city region sType tId size location t1 small downtown store storeId cityId tId mgr t2 large suburbs s5 sfo t1 joe s7 sfo t2 fred city cityId pop regId s9 la t1 nancy sfo 1M north la 5M south region regId name north cold region south warm region 14
  • 15. The Data Warehouse Toolkit.Second Edition.The Complete Guide to Dimensional Modeling.Ralph Kimball.Margy Ross