Presents: ObjectRoleModeling.com Thursday, January 08, 2009
 Search
Register Login
Web Log
 
 
  Discriminator and Complete Category Settings  
 
Location: BlogsObjectRoleModeling.com Web LogVisio Tool Tips    
Posted by: Scot Becker 10/22/2004

The Category symbol in an ER Source or Database Model Diagram has a couple of settings ("Definition" tab of the "Database Properties" window for the Category symbol) that help to describe some semantics of the categorization (a.k.a. subtype, specialization).

The first is the discriminator attribute. Categories often have one attribute in the parent entity that dictate when the parent entity is also one of the child entities. For example, a Person table might have a "Sex Code" column that determines if the Person is a Man or a Woman. In such a situation, you can select the discriminator attribute and the chosen attribute will become annotated on the category symbol.

The second setting is the "Category is complete" check box. When the discriminator attribute is defined such that every instance of the parent is also an instance of (at least one) child entity, the category is said to be complete (a.k.a. exhaustive). In our example, Sex Code is required for all People and is restricted to "M" or "F" such that every Person is a Man or a Woman. When a category is complete, the category symbol appears with two lines instead of one.

Note that the semantics expressed by these settings encompass only a portion of what you often need to worry about. For example, they don’t say whether or not the categorization is exclusive (each parent can have only one child instance) as is the case in our example above. There is also no way to specify category discrimination that is based upon more than one attribute, the parent’s participation in some child table, and/or any other non-trivial criteria.

Also note that these settings have no bearing on the DDL generation; it is still up to you to make sure that the database is coded in such a way that the categorization conforms to the rules that are (and sometimes are not) specified via these settings.

Permalink |  Trackback
 

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

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