Presents: ObjectRoleModeling.com Friday, August 29, 2008
 Search
Register Login
Web Log
 
 
  ORM2 Syntax Primer: Object types, predicates, roles, and nesting  
 
Location: BlogsObjectRoleModeling.com Web LogORM2    
Posted by: Scot Becker 2/16/2006
As mentioned in the previous post, one of the goals of ORM2 is a more compact display of the model elements. To that end, object types in ORM2 are drawn, by default, as rounded (soft) rectangles instead of ellipses, as shown in the figure below.



The ORM2 spec also allows for alternate displays of object types as (hard) rectangles (i.e. no rounded corners) and as ellipses (albeit the spec calls for a slight size/white space reduction when using this display option).

Similarly, predicate size has been reduced although the shape itself (i.e. a series of connected role boxes) remains the same.



As in ORM1, ORM2 uses ellipses (...) and mixfix notation to indicate where to place the object type name when verbalizing the predicate. However, the placement of a predicate reading inside of its corresponding role box is no longer supported (due to the size reduction of the role box) although this was seldom feasible/readable in ORM1 anyway.

Inverse (i.e. right to left) readings are still indicated with the "<<" symbol and via placement of the text to the right/bottom of the slash. In addition, ORM2 supports a display of the forward reading above the predicate and the reverse reading below the predicate for binary object types. Common predicate patterns and supported readings are shown below.





ORM2 also supports some additional semantics. For example, a given reading can have one or more aliases (e.g. "Person drives Car" and "Person operates Car" have different verbs but the same meaning).

Further, ORM2 supports the naming of a fact type itself. One use for this is when mapping a predicate with e spanning uniqueness constraint to a table. For example, If "Person drives Car" has a spanning (m:n) uniqueness constraint, the current implementation would name the resulting table using the object types names and/or forward predicate reading. In ORM2, the predicate could be named something else like "Vehicle Driver" and that name would be used when creating the table mapping.

Finally, role names in ORM2 are now displayable as bracketed text on the diagrams.

The display of nested predicates doesn't change much in ORM2 with the exception of the related smaller shapes (as per the above) and a few new nesting options.


 
ORM2 also supports the nesting of unary predicates (something used, for example, in FCO-IM) as well as the nesting of predicates with non-spanning uniqueness constraints. This last option makes me cringe a little and should be used very sparingly, in my opinion. However, that is a topic for another time.
Permalink |  Trackback
 

Note: To comment on a blog post, you must be logged in.

  Search Web Log  
 
 
  Categories  
   
  Archive  
   
  Blog Roll  
   
  Syndication  
   
 
© 2003 - 2007 Orthogonal Software Corporation. All rights reserved. Terms Of Use Privacy Statement