Databases Reference
In-Depth Information
Grouping data into hierarchies
When creating a data object, it is possible to specify "Dimensions" for the
object. A dimension is based on one or more fields within the object. A
given field can only participate in one dimension. This gives the ability
to automatically group the object by the fields in the given dimension.
If multiple fields are selected for a single dimension, then they can be
layered into a hierarchy; for example, to allow analysis by country,
region, and city. In this case, all three elements would be selected into
a single dimension, perhaps called geography. Within geography, a
hierarchy could be set up with country at the top, region next, and
finally city at the bottom, allowing drill down to occur in views. Just as
a data object can have multiple dimensions, a dimension can also have
multiple hierarchies.
A digression on populating data object fields
In the previous discussion, we mentioned the Nullable attribute that can be
attached to fields. This is very important as we do not expect to populate all or
even most of the fields in a data object one at a time. Failing to initialize a field
will generate an error unless it is Nullable . Do not confuse data objects with the
low-level events that are used to populate them. Data objects in BAM do not have
a one-to-one correspondence with the low-level events that populate them. In our
auction example, there will be just one auction object for every auction. However,
there will be at least two, and usually more, messages for every auction; one message
for the auction starting, another for the auction completing, and additional messages
for each bid received. These messages will all populate, or in some cases overwrite,
different parts of the auction data object. The table shows how the three messages
populate different parts of the data object.
Message
Auction
ID
State
Highest
Bid
Reserve
Expires
Seller
Highest
Bidder
Auction
Started
Inserted
Inserted
Inserted
Inserted
Inserted
Inserted
Bid
Received
Updated
Updated
Updated
Auction
Finished
Updated
 
Search WWH ::




Custom Search