in

The ORM Foundation

Get the facts!

Model optimization

Last post 04-19-2010 3:11 by Dennis Johansson. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 04-16-2010 9:19

    Model optimization

    Hi everybody!

    I was taking a certification exam the other day and there was a small remark in my ORM model where I had an entity connected to a value type (True/False) using a binary role connector. The suggestion was to drop the value type and instead use an unary role connector to the entity.

    My thougths around this is: If tis is true (which I assume it is), then there are obviously several ways of expressing the same thing in an ORM model. This implies that there are better ways and less better ways to model things.

    Could it be possible to start thinking about some kind of model optimizer in order to reduce less better solutions in a given model? Since it is all based upon logic, there should be some kind of mathematical way of optimizing situations (like a query optimizer for databases or Karnaugh-diagram for digital circuits).

    It would be a great tool in order to improve models as well as reduce unnecessary complexity in them.

    Filed under:
  • 04-16-2010 21:07 In reply to

    Re: Model optimization

    Hi Dennis

    You are right in that the same business domain may be expressed by different ORM models. Which member of a set of equivalent models is "best" is partly a subjective issue (depending on the viewpoint of the modeler on what is more "natural", "simpler" or "clearer"). However for a case like the one you cited, I think it can be argued that a unary is conceptually cleaner than an equivalent binary. For example, it seems more natural to say "Arnold smokes" than "Arnold has SmokingStatus 'true'".

    Section 14.5 of "the Big Brown Book" discusses conceptual optimization, which is mainly aimed at transforming an ORM model into an equivalent one that results in a more efficient relational model when passed to the basic Rmap procedure. We hope one day to have NORMA automatically perform such "optimizations" (not the best word for it) and give the user the choice of accepting or rejecting any of the changes.If a change makes the model clearer for the user, he/she is likely to accept it. Otherwise, we can leave the model as is, but include the optimization under the covers as a pre-processing phase before passing to the basic Rmap.

    Different mapping targets have different mapping procedures and hence different optimizations. The main use of the conceptual model is to clarify the semantics of the business domain, and this will often be independent of the implementation mapping.

     Cheers

    Terry

     

  • 04-19-2010 3:11 In reply to

    Re: Model optimization

    Thanks for your reply! I will look into this matter more closely in the book as soon as it gets here.

    // Dennis 

     

Page 1 of 1 (3 items)
© 2008-2014 The ORM Foundation: A UK not-for-profit organisation -------------- Terms of Service