PUM 2.x – Modelling Associations in Gemstone

The various possibilities of modelling associations in Gemstone was the main reason to rewrite the whole association support in PUM.

When defining associations you may select :n-association type, the implementation type and add various options to that associations.

Association Type

You can only select three major association types:

* m:n association types (both sides navigation)
* 1:n associaton bidirectional (both sides navigation)
* 1:n association unidirectional (one side navigation)

Implementation Type

After defining the general association type you select among various implementation types: set, bag, dictionary, sort, ordered, indexed

Implementation Options

And then you may select options to that association: unique (memebership), identity (membership), conflict (high conflict possibilities) and large (lot of members).

Due to these various options you end up with the following classes in Gemstone suitable for modelling the association: Array, Bag, IdentityBag, RcIdentityBag, IdentitySet, Set, SortedCollection, IdentityDictionary, StringKeyValueDictionary and IntegerKeyValueDictionary.

The main interesting thing is, that OrderedCollection is not used any more. Instead I use the class Array, which seems to be a faster replacement for OrderedCollection.

This entry was posted in Smalltalk and tagged , . Bookmark the permalink.

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