Databases Reference
In-Depth Information
< Attribute>
<ID>Marital Status</ID>
<Name>Marital Status</Name>
<KeyColumns />
</Attribute>
<Attribute>
<ID>Gender</ID>
<Name>Gender</Name>
<KeyColumns/>
</Attribute>
</Attributes>
To define a dimension, it is not enough to specify a relationship between attributes. Every
relationship has multiple properties that specify, for example, the type of the relationship
as flexible or rigid, optionally of the relationship as mandatory or optional, cardinality as
one to one or one to many, and so on.
NOTE
We provide more detailed information about relationships later in this chapter, in the
section “Relationships Between Attributes.” This more detailed information will help
you formulate the correct definition of relationships so that you can optimize the perfor-
mance of the dimensional model, and consequently the performance of the system.
Attribute Member Keys
Each member of an attribute is identified by its key; each member key is unique within
the attribute. The keys of all the members of an attribute have the same type. As a
member is loaded into the collection that makes up the attribute, it receives a unique
number, called Data ID (mostly used internally).
Simple and Composite Keys
In contrast to the “domain” of the relational model, where the scalar is always a simple
value, the members of an attribute in the multidimensional model can have either simple
keys or composite keys:
.
A simple key is defined by a single value of any data type allowed in the multidimen-
sional database.
.
A composite key is defined by a combination of values of various data types. A com-
posite key, like any key, must be unique for each attribute member.
You need a composite key when you can't rely on the uniqueness of the key to identify a
specific member. For example, if you have an attribute (collection) of world cities, to
uniquely identify any one city you need to include in the key the country and perhaps
even province or state. (There could be a number of cities with the same name located in
one country—the United States is notorious for that.) Thus, the composite key.
 
Search WWH ::




Custom Search