Databases Reference
In-Depth Information
The key store contains only unique keys because an attribute can have only unique keys;
each record of the key store corresponds to a unique key. When a key is loaded for an
attribute, it gets a unique internal identifier, a 4-byte integer representing its ordinal posi-
tion in the key store. This identifier, called the DataID , is a very important element of the
system—think of it as a surrogate key for the attribute's member and for its main index.
(Unlike SQL Server, however, Analysis Services doesn't store this surrogate key in the
record.) Access to the attribute data by the DataID is the most efficient way to access a
member because it enables direct access to the record. A hash table enables fast searching
for DataID by member key.
NOTE
DataID is an internal surrogate key for an attribute member.
The data type of the key defines the performance of operations involving attribute keys.
Composite keys that contain strings are the least optimal because they require many fields
in the key store and an additional string store. Calculation of the hash function of such a
key is a complex operation, and the comparison operation of such keys is expensive. The
most efficient scheme is to use numeric data types as keys. You should try to avoid using
nullable fields as attribute keys because they require additional bits for storage and compli-
cate comparison operations. Therefore, we recommend that you use the most effective
key—a non-nullable integer key. If you cannot use an integer key, you should use, in order
of preference, a 4-byte numeric field or an 8-byte numeric field.
NOTE
A simple (noncomposite) non-nullable integer key is the most efficient type of key for
attributes.
Each attribute contains a special member called an Unknown member. For more informa-
tion about the Unknown member, see Chapter 5. The Unknown member is not associated
with any key, so it can't be found in the hash table of the key store. This member always
occupies the first record in the key store; therefore, the key store is never empty and
always contains at least one member. Every attribute has an Unknown member, even if you
have specified in the attribute's definition that you don't want to have an Unknown
member. For cases in which the user does not want the Unknown member, Analysis Services
hides it, but data structures of the attribute still contain the Unknown member.
Property Store
Each attribute member has intrinsic properties associated with it, such as Name , Caption
(used for translation names to different languages), and values of the functions for dimen-
sion calculations, such as custom member formulas and unary operators. All these proper-
ties are stored in the property store. In most cases, intrinsic properties are strings—
therefore, the property store typically contains string fields. The key to this store is the
 
Search WWH ::




Custom Search