Understand the role of relationships in MBOs.
Relationships provide navigation and subscription inheritance. See Relationship Modeling. |
|
Composite relationships provide navigation, subscription inheritance, and cascading create, update, and delete capabilities. See Relationships and Primary Keys. |
|
Relationships should not span multiple synchronization groups. |
|
Relationships should not span multiple cache groups. |
|
Map relationships using all primary key attributes of the source in one-to-many and one-to-one relationships. |
|
Map relationships using all primary key attributes of the target in many-to-one and one-to-one relationships. |
|
One-to-many relationships when "many" is large may be expensive to navigate on the device. |
Both types of relationships provide bidirectional or unidirectional navigation through generated code with lazy loading, which means children/targets are not loaded unless they are referenced. However, due to instantiation costs, navigating to a large number of children can be expensive, especially on devices with limited resources. If the instantiated object hierarchy is very wide, the mobile application should consider other means to access the children.
A relationship is implemented on the device database and the CDB through foreign keys. In Unwired Server, the foreign key contains a surrogate key instead of an EIS business key or primary key. In a one-to-many relationship, the foreign key is in the target and it is impossible for it to reference more than one source. Therefore, the restriction of using a primary key of the source is to ensure there is only one source.