Export (0) Print
Expand All

Data Warehouse Organization

This topic describes the organization of the data warehouse.

A tool describes its warehouse schema in terms of Dimensions, Facts, and FactLinks. These objects are in the Microsoft.TeamFoundation.Warehouse namespace. The WarehouseConfig object contains collections for dimensions, facts, and fact links. The warehouse object model translates this schema description into relevant elements in the warehouse relational and OLAP databases. Facts and FactLinks become measure groups in the OLAP database. This topic shows the warehouse schema using XML, but when you interact with the warehouse it will be through the objects in the Microsoft.TeamFoundation.Warehouse namespace. Dimensions map to the dimensions in the OLAP database. The following code shows the warehouse configuration as an XML fragment:

<WarehouseConfig>
   <Dimensions/>
   <Facts/>
   <FactLinks/>
</WarehouseConfig> 

When you declare a dimension, provide its name, and the fields that make up the dimension. One of the fields will function as the key value. This field is specified as the KeyFieldName. The following code shows the Dimensions configuration as an XML fragment:

<Dimensions>
   <Dimension>
      <Name>Person</Name>
      <Fields>
         <Field>
            <Name>Alias</Name>
            <Type>NVARCHAR</Type>
            <Length>42</Length>
         </Field>
      </Fields>
      <KeyFieldName>Alias</KeyFieldName>
   </Dimension>
</Dimensions> 

Each fact has a name, a set of fields, and a set of dimensions uses. A fact maps to a measure group in the OLAP cube. Fields that specify an aggregation method become measures in the OLAP database. Fields that do not specify an aggregation method become measures in that measure group. They are not represented in the OLAP cubes. A DimensionUse element specifies how a measure group references a dimension.

<Facts>
   <Fact>
      <Name>Work Item</Name>
   <Field>
         <Name>Work Item ID</Name>
         <Type>int</Type>
      <AggregationFunction>Count</AggregationFunction>
      </Field>
      <Field>
         <Name>Title</Name>
         <Type>NVARCHAR</Type>
         <Length>510</Length>
      </Field>
   <DimensionUses>
         <DimensionUse>
            <UseName>Assigned To</UseName>
            <DimensionName>Person</DimensionName>
         </DimensionUse>
   </DimensionUses> 
   </Fact>
</Facts> 

In many cases, the elements described above are adequate to fully specify the schema extension for a particular tool. The system provides an additional mechanism, the FactLink, to represent relationships between facts. The following code shows the FactLink configuration as an XML fragment:

<FactLinks>
   <FactLink>
      <LinkName>WorkItemResultLink</LinkName>
      <SourceFactName>WorkItem</SourceFactName>
      <LinkedFactName>Result</LinkedFactName>
   </FactLink>
</FactLinks

Community Additions

ADD
Show:
© 2014 Microsoft