2.2.5.3.5 Cache Fields
A cache field represents an entity by which data can be summarized.
Consider a PivotCache (section 2.2.5.3) based on the following source data (section 2.2.5.3.2):
-
Country
Product
Date
Sales
USA
Bicycle
6/5/2007
500
USA
Car
8/3/2007
20000
Canada
Bicycle
9/2/2007
300
Canada
Car
10/5/2007
35000
In this example, four cache fields exist in the PivotCache. Each cache field corresponds to one of the columns in the source data: Country, Product, Date, and Sales.
The sequence of records that conforms to the FDB rule (section 2.1.7.12), and optionally the SXADDLCACHEFIELD rule (section 2.1.7.20.3), specify a cache field. A cache field is contained in a PivotCache.
A cache field index is a zero-based index of an FDB rule in the PIVOTCACHE rule (section 2.1.7.12).
A cache field typically corresponds to a source data entity. However, grouping (section 2.2.5.3.7) cache fields and cache fields representing calculated fields (section 2.2.5.3.8) do not correspond to source data entities (section 2.2.5.3.2). Such cache fields are fully specified by information in the PivotCache.
The cfdbdb field of the SXDB record (section 2.4.275) specifies the number of cache fields that correspond to source data entities. If the cache field index of an SXFDB record (section 2.4.283) is less than cfdbdb, the cache field corresponds to a source data entity. Otherwise, the cache field does not correspond to a source data entity. A non- OLAP PivotCache (section 2.2.5.3.4) MUST have one or more cache fields corresponding to source data columns. An OLAP PivotCache MUST NOT have cache fields that do not correspond to source data entities.
In a non- OLAP PivotCache, a cache field typically corresponds to one column in the source data and contains information about that column. The cache field name is specified by the stFieldName field of the SXFDB record. The cache field name of a cache field corresponding to a source data column is derived from the name of that column in the source data and is used to associate the cache field with that source data column.
All cache field names MUST be unique, when using a case-insensitive comparison, within the associated PivotCache.
In an OLAP PivotCache each cache field can be associated with a pivot hierarchy (section 2.2.5.4.5). For more information, see section 2.2.5.4.5.1.