Where do Aspects Store Attribute Values?

Have you ever wondered where Aspects actually store the metadata they attach to an object?  For example, in my series of posts on creating a Checksum Aspect, I created an Aspect that stored a checksum, a date, and the checksum algorithm’s name to any content object in the repository.  But where did it actually store that metadata?  If you look at the content object you will not see a checksum attribute.

My first thought was perhaps in the object’s i_property_bag because I could see serialized values in this database field.  But no, the i_property_bag contains an object’s non-qualifiable properties and properties designated for fetch optimization.  (If you’ve never heard of an object’s non-qualifiable properties, neither had I. See the Content Server Fundamentals manual.)

In Composer, when you create and install an Aspect, you define an aspect_type object which contains the definitions of the attributes the Aspect will use.  In the database, a new r_object_id is added to the dmc_aspect_type_s table for the new type, and a new type table is created with the column definitions you specified in Composer.  It’s all tied together like this:

select r_object_id, r_aspect_name from dm_document where object_name = ‘test.doc’

The r_aspect_name column contains the names of the Aspects attached to this object.

select r_object_id, object_name, i_attr_def from dmc_aspect_type where object_name = ‘checksum_aspect’

The i_attr_def column contains the name of the table that holds the attributes and values for the Aspect.  When you query the table, add _s or _r as appropriate.

select * from dmi_03000001800001f7_s

Each row of the result table contains data for each object that the Aspect, checksum_aspect, is attached to.  To find a particular object’s Aspect data, find the row for the object’s r_object_id.

Thankfully, DQL takes care of all of this table navigation for you and you can simply query:

select r_object_id, checksum_aspect.checksum from dm_document where object_name = ‘test.doc’

Advertisements

About Scott
I have been implementing Documentum solutions since 1997. In 2005, I published a book about developing Documentum solutions for the Documentum Desktop Client (ISBN 0595339689). In 2010, I began this blog as a record of interesting and (hopefully) helpful bits of information related to Documentum, and as a creative outlet.

2 Responses to Where do Aspects Store Attribute Values?

  1. Pingback: What is the Property Bag and What is it Used for? « dm_misc: Miscellaneous Documentum Tidbits and Information

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: