Relationship Object
A relationship connects two objects in a repository database.
All repository relationships are versioned. You can version a relationship explicitly by using VersionedRelationship, or you can allow the repository engine to version a relationship automatically. The repository engine automatically versions a relationship in cases where version information is unspecified or where legacy relationship objects that were created prior to version support exist.
A versioned relationship can connect a particular version of a repository object to one or more specific versions of the target object. Because every relationship is a VersionedRelationship object, you can declare any relationship with the following line, where myVersionedRship is the object you are defining:
Dim myVersionedRship As VersionedRelationship
In earlier releases of the repository engine, the object model included the Relationship object, but not the VersionedRelationship object. If you have Microsoft® Visual Basic® programs written against earlier releases of the repository engine, those programs might include declarations like the following, where oldRship is the object you are defining:
Dim oldRship As Relationship
These programs will continue to work with Microsoft SQL Server™ 2000 Meta Data Services because the repository API still includes the Relationship object. For this reason, the preceding declaration remains valid in Visual Basic. However, because every relationship is a versioned relationship, the object oldRship has the same members as any versioned relationship. In effect, the following two lines of code are equivalent:
Dim oldRship As Relationship
Dim myVersionedRship As VersionedRelationship
Even though all relationships are now versioned relationships, the repository API includes the Relationship object so that you do not need to rewrite your Visual Basic programs that declare objects as Relationship objects.