SyntaxFor example, you could have a business object that contains information about a particular course. That information might include the course content, schedule date, instructor, student list, cost, and so on. As each student enrolls in the course, you might create a business object for that student that includes the student’s background, experience, and personal information. After a student record object is created, it stands alone with no relationships attached to it. However, if you view the course object, you might want to see the student objects associated with it. Also, if you view the student object, you might want to see the course objects associated with that person. Use the Connect Businessobject command to establish the relationship between the business object containing the student record and the object containing the course information:
The Connect Businessobject command has two forms: TO and FROM. The form you choose depends on the placement of the two objects you are connecting. You specify which business object will be associated with the TO end and which will be associated with the FROM end. For example, to assign a student to a course, you might use the TO form of the Connect Businessobject command:
When this command is processed, it will establish a “Student/ Course Relationship” between the course object and the student object. Cheryl Davis is assigned to the FROM end and the C Programming course is assigned to the TO end. You can think of Cheryl as leading to the course object. You also could think of the course as coming from the student object(s). In other words, you can define the same relationship using the FROM form of Connect Businessobject command:
When this relationship is established, Cheryl’s object is again assigned to the FROM end and the course is assigned to the TO end. If you are defining equivalent objects, either object could be defined as the TO end or the FROM end. However, in hierarchical relationships, direction is important. With these relationships, you should consult the relationship definition before creating the connection. Otherwise, you might have difficulty locating important objects when needed. If you assigned the wrong object to the connection end, you will have to dissolve the relationship and re-define it. |