A SERVICE OF

logo

142 Chapter 11. Services Tutorials
}
versioned object type VTC3 {
BigInteger[1..1] id = t_vtc3.id INTEGER;
object key(id);
}
object type C2 {
BigInteger[1..1] id = t_c2.id INTEGER;
composite VTC3[1..1] vtc3 = join t_c2.composite_id to t_vtc3.id;
object key(id);
}
object type UT5 {
BigInteger[1..1] id = t_ut5.id INTEGER;
object key(id);
}
object type UT6 {
BigInteger[1..1] id = t_ut6.id INTEGER;
object key(id);
}
Example 11-9. Sample PDL definitions
For the sake of brevity, Example 11-9 only has key attributes for object types and does not show
any scalar attributes.
Thegraph in Figure11-8 provides avisual representation ofthe above PDLdefinitions. Wheat-colored
nodes represent object typesthat are markedas versionedin Example 11-9. Thereare two types
of edges. If an edge is labeled extends, it means that the type at the edge head extends, in the PDL
sense, the type at the edge tail. For example, VT2 extends VT1. This relationship is important, because
subtypes of a versioned type are also versioned.
The other kind of edge is one that shows attributes of an object type. For example, consider the edge
labeled rqd:ut3attrthat connects UT1and UT3.It meansthat the object typeUT1 hasa required
attribute ut3attr of type UT3.
There are two kinds of compound attributes that are important from the versioning point of view:
required (rqd) and components (cnt).