Object Role Model (ORM) Diagrams: An Agile Introduction

Figure 2 presents a more complex example. It doesn’t include fact type tables and as a result explores a wider range of concepts – you can only fit so much on a white board, and AM recommends that you Model in Small Increments regardless. The relationships between Student and Seminar have been fleshed out a bit. The top relationship has evolved from a binary relationship to a ternary relationship which involves three entity types (Mark was added). It is possible to model n-ary relationships on ORM diagrams simply by adding more roles to the relationship although I rarely find the need to do so. You see that there is an exclusive or (XOR) relationship, depicted by the dotted circle with the X through it, between the takes role and the assists role, indicating that a student can either take a seminar or they can assist it but not both. A dotted circle without the X would indicate a simple OR relationship.Figure 2. More complex ORM Diagram.

You see that there is a large black dot on the line between Professor and the teaches role, indicating that it is mandatory for a professor to teach a seminar. The dot can appear at either end of the line, although I prefer to place it on the object end (sometimes an object will be involved in many mandatory relationships which can clutter your object symbols so it’s good to have the option to move the dot to the other end of the line).The dashed oval represents an attribute of an object, showing a more detailed way to represent the concept that seminars have seminar numbers than the short form that we used in Figure 1. I prefer to follow the Depict Models Simply practice and use the short form but I wanted to provide an example of the long form for you.Another interesting concept is the recursive/self relationship that Professor is involved with. One professor may mentor other professors and a professor may be junior to several professors that mentor her.How do you remain agile when working with ORM diagrams? I prefer to use ORM diagrams with my stakeholders, modeling around a whiteboard with them in order to explore the problem domain. Although the notation is rather complex I’ve found that stakeholders quickly pick up the basics, particularly when fact tables are used frequently at the beginning. Once we understand the issue that we’re exploring with an ORM diagram I typically capture the information in another artifact, such as a UML class diagram or source code, and erase the diagram once I’m through with it.
Source
This artifact description is excerpted from Chapter 8 of The Object Primer 3rd Edition: Agile Model Driven Development with UML 2.
Translations