User's Manual

206 Persistence Glossary
select code and tables here
where secondtable.second_object_id_one = firsttable.object_id_one
and secondtable.second_object_id_two = firsttable.object_id_two
See Also: Object Key.
Roles
Roles describe how one class is associated with another. One or both classes in the association
may have roles. For example, a User has a "Member" role for the group (that is, a user is a
member of a group).
See Also: Role Reference.
Role Reference
Role Reference is the term used to describe an object type’s reference to another object type. It
is similar to having an attribute with an Object Type modifier instead of a Java type. See Section
9.3.3 Role References and Section 9.3.5 Using Java to Access Associations for more information.
See Also: Property.
Metadata Driven SQL (MDSQL)
Metadata Driven SQL is the term used to describe SQL that is automatically generated by the
persistence layer. The persistence layer is able to generate statements to perform insert, update,
and delete, and it selects from the database if it is given enough information about the object
(e.g., information about how attributes map to database columns and how tables can be joined
together). In addition, it is able to use the object type metadata to generate DDL statements that
can be used to create an update the actual table definitions.
Object Key
The Object Key allows the persistence system to uniquely identify a particular Data Object for
a given Object Type. Specifically, the Object Key column(s) of an Object type is similar to the
"primary key" of a database table.
If a particular object has a multi-key primary key, it should have a multi-key Object Key as
well. To do this, you can simply separate the attributes by commas. For instance, for a map-
ping table whose primary key contains the columns object_id (whose attribute is id) and
site_node_id (whose attribute is siteNodeID), the object key would look like object key
(id, siteNodeID). This is not a strong example, however, because in the common case map-
ping tables should not be represented as object types. Rather, they should be used in join paths
when defining associations.
For more information, see the Section 9.2.3.3 Object Key section of the PDL tutorial.
See Also: Reference Key.
PDL
See: Persistence Definition Language (PDL)
Persistence Definition Language (PDL)
The Persistence Definition Language has been created to provide developers with a syntax to
specify data objects, their associations, and how the information is stored in the database. The
files specified in PDL and SQL are the only files that contain actual SQL and thus are the only
files that must be changed when porting the system to a new database.