Overview of Dimensions (191)

tsinglee發表於2007-11-13

A dimension defines hierarchical (parent/child) relationships between pairs of
columns or column sets. Each value at the child level is associated with one and only
one value at the parent level. A hierarchical relationship is a functional dependency
from one level of a hierarchy to the next level in the hierarchy. A dimension is a
container of logical relationships between columns, and it does not have any data
storage assigned to it.

The CREATE DIMENSION statement specifies:
■ Multiple LEVEL clauses, each of which identifies a column or column set in the
dimension
■ One or more HIERARCHY clauses that specify the parent/child relationships
between adjacent levels
■ Optional ATTRIBUTE clauses, each of which identifies an additional column or
column set associated with an individual level

The columns in a dimension can come either from the same table (denormalized) or
from multiple tables (fully or partially normalized). To define a dimension over
columns from multiple tables, connect the tables using the JOIN clause of the
HIERARCHY clause.

For example, a normalized time dimension can include a date table, a month table, and
a year table, with join conditions that connect each date row to a month row, and each
month row to a year row. In a fully denormalized time dimension, the date, month,
and year columns are all in the same table. Whether normalized or denormalized, the
hierarchical relationships among the columns need to be specified in the CREATE
DIMENSION statement.

維度
1. 維度用於定義兩個列或兩個列集合之間的層次關係。位於子級的一個值與且僅與唯一一個父級的值相關。
2. 一個維度物件 只是定義了資料列之間的邏輯關係,其中並不實際儲存任何資料
3. 在 CREATE DIMENSION 語句中包含了:
a. 多個 LEVEL 子句,每個子句指定了維度中某一層對應的資料列或列集
b. 一個或多個 HIERARCHY 字句,用於指定相鄰層之間的父/子關係
c. 可選的 ATTRIBUTE 字句,每個子句指定了與一個層次相關的附加屬性所對應的資料列或列集
4. 一個維度中使用的資料列可以來自同一個表(反規範化的),也可以來自多個表(完全規範化或部分規範化).

[@more@]

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/10599713/viewspace-982100/,如需轉載,請註明出處,否則將追究法律責任。

相關文章