Relations

This topic provides examples of the logical relation types and describes the background steps taken by the OLE DB Provider for Commerce Server to store the classes. The examples will model the relation types as applying to the relationship between a dog and a dog owner. The two classes are pseudo-defined as follows:

Class DogOwner
  {
  [Key] DogOwnerName
  DogOwnerAddress
  }

Class Dog
  {
  [Key] DogName
  DogBreed
  }

This section contains:

  • One-to-Many Relation. Models a one-to-many relation where each dog can have only one owner but each owner can have multiple dogs.

  • Many-to-Many Relation. Models a many-to-many relation where each dog can belong to multiple owners and each owner can have multiple dogs.

  • One-to-Many with Inheritance Relation. Similar to a one-to-many relation, however the dog can see and populate its owners members.


All rights reserved.