Presents: ObjectRoleModeling.com Friday, March 12, 2010
  Search
Register Login
Forums
 
 

Note: To post to a thread, you must be logged in.

  Syndication  
   
  Forums Minimize  
 
 
ForumForumObject-Role Mod...Object-Role Mod...General Discuss...General Discuss...A couple of ORM diagram questionsA couple of ORM diagram questions
Previous Previous
 
Next
 Disabled
New Post
 12/28/2008 5:54 AM
 

Hi All

I'm converting an EERD diagram to ORM and have a couple of questions to how some fact types should be displayed.

If a value to an entity is to be derived, then should it still show the dot on the entity side as a mandatory required field. E.G. I have an age value but it won't be stored as it will be calculated from DOB.

In EERD multivalued attributes are shown with a double ringed oval, I've looked at at least 4 papers for ORM and not one covers how this should be displayed in the diagram, it will become its own entity and map to a table with an id as a reference but is there a better way to display this as the DB designer actually has choices and I would think this should be shown.

and finally Composite attributes. E.G Name, Address, in EERD they mess up all diagrams by having there values extend from the composite title. Some ORM papers show all the attributes and ignore the composite completely and others just show the composite title, some even show a mixture of both which is really confusing,

 

If someone could clarify any of the above methods I would be greatful. I will update this post if I find answers over the next few days whilst I search.

Thank you.

  

 

New Post
 12/30/2008 2:13 PM
 
Hi combitz,

Constraints on derived fact types are themselves derivable and can be shown on the diagram. Thus, in your example, if the Person role in "Person has DOB" is required, and assuming the age calculation is derived from that date and the current date (which is known), then the Person role in "Person is of Age" would be mandatory as well. However, if the Person role in "Person has DOB" is optional, then the Person role in "Person is of Age" must also be optional. Uniqueness constraints are derived in a similar fashion so assuming a Person can only have one DOB, the uniqueness constraint must span only the Person role in "Person is of Age" (i.e. a person can have only one age).

There is no construct for multi-valued attributes in ORM as cardinality is handled by the internal uniqueness constraints on fact types. Thus, if you had some sort of multi-valued ER attribute such as a collection of colors for a car, you would model this as the fact type "Car is of Color" and have the uniqueness constraint span both roles. Entity naming is handled by the tool. For example, in NORMA, you can name the fact type and that name would be used to derive the table name. In other ORM tools, you can force the table name on mapping via objectifying the fact type as the objectified name would then be used for table naming (a bit clumsy, but it works).

For composite types, the most common approach is to use co-referencing. http://www.objectrolemodeling.com/WebLog/tabid/58/EntryId/33/Default.aspx covers this a little bit but basically, you would create an object type representing the composite type and then have the composite’s detail modeled as fact types (e.g. Person Name has First Name, Person Name has Last Name, etc.). You then make the composite role unique on each fact type and place a external uniqueness constraint on each component role. Then you are free to use the composite object type and all component roles are then absorbed. Note, however, that your table mapping may be a little off depending on the tool you use and whether or not all component roles are mandatory. As for display on the diagram, most tools only require you to have the component fact types displayed once but allow you to repeat them for each use of the composite if desired.

Hope that helps,
Scot.
Previous Previous
 
Next
 Disabled
ForumForumObject-Role Mod...Object-Role Mod...General Discuss...General Discuss...A couple of ORM diagram questionsA couple of ORM diagram questions

 
 
© 2003 - 2009 Orthogonal Software Corporation. All rights reserved. Terms Of Use Privacy Statement