Defining Relationships and Collections

Meta Data Services Programming

Meta Data Services Programming

Defining Relationships and Collections

Relationships and collections provide the structure and navigation of your information model. After you define the objects you require, you need to associate the objects by defining relationships. The relationships that you create must be defined as collections. You can also create collections that do not contain relationships.

The following collection types are possible.

Collection Description
Object collection Contains multiple instances of the same type of object (for example, a set of StoredProcedure objects).

Object collections are only used in an ObjectInstances collection on ClassDef and InterfaceDef objects. For more information, see Defining a Collection and ObjectCol Object.

Version collection Contains versioned objects. There are seven kinds of version collections. For more information, see Kinds of Version Collections.
Relationship collection Contains relationship objects. Each relationship object pairs one source object to one target object. Relationship collections can be used for navigation. For more information, see Defining a Relationship and Defining a Relationship Collection.
Target object collection Contains all of the target objects of a specific source object. For example, the target object collection of a Table source object can be a collection of Column objects.

A target object collection is represented as a property that returns a TargetObjectCol object.

For more information, see Defining a Target Object Collection and ITargetObjectCol Interface.

Transient object collection Contains objects that are populated by code. A transient object collection is a special case of collection type. Where the other collection types are formed from persistent object data, a transient object collection is instantiated from your code. This collection is populated dynamically and does not rely on persistent data to determine its contents. For more information about defining transient object collections, see Programming Transient Object Collections.

See Also

Navigating a Repository

Understanding Collections

Understanding Relationship Roles