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.
一个维度定义等级(父/子)关系在一对列或者列集合。在子级别的每个值与父级别的一个值
或者仅一个值相关联的。等级关系是一个功能性的依赖从一个等级级别到这个等级级别的下
一个级别。维度是一个在多列中逻辑关系的容器,并且它没有指定任何存储数据。
■ 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
CREATE DIMENSION语句描述:
#多级别语句,每个级别确认一个列或者列的集合在维度里。
#可选的ATTRIBUTE语句,其中的每一个确定了一个可选的列或者与一个特殊级别相关的列
集合。
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.
在维度中的列可以来自同一个表(非格式化)或者是从多个表(完全或者部份格式化)。为了
从多表中通过多列定义一个维度,在分等级的语句中使用JOIN语句去连接多个表。
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.
比如,一个格式化的时间维度可以包含日期表,一个月表,和一个年表,通过JOIN条件它连接每个
数据行到一个月行,和每个月行到一个年行。在一个完全非格式化的时间维度,日期,月和年列全部
都在一同一个表。不论格式化或者是非格式化,在多列中的等待级关系需要在CREATE DIMENSION语句中
指定。
本文详细解释了维度在数据模型中的作用,包括如何定义等级关系、创建维度的语句及其参数,以及维度中列的来源。文章还讨论了维度在完全或部分规范化表中的应用,以及如何通过JOIN语句连接不同表来定义跨表的维度。
922

被折叠的 条评论
为什么被折叠?



