in

The ORM Foundation

Get the facts!

Fact Type Names

Last post 07-02-2014 8:31 by Matthew Curland. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 06-29-2014 14:01

    Fact Type Names

    I have a fact type and would like to change its name.  Unfortunately, the name is not editable.  The helpful fact related to fact type names says that they may be editable or read only.  Since in other models, the names have been editable, I assume that I have inadvertently changed a setting that makes the name read only.  Can anyone tell me where that setting is and how I might make the name editable again?  Thanks for any help you can offer.

    Jack 

    Filed under:
  • 06-29-2014 18:46 In reply to

    Re: Fact Type Names

    Hi Jack,

    Fact type names are generated based on the default reading for the fact type. The reading editor tool window lets you prioritize reading orders and readings, which can change the default reading. If you see an editable fact type name it is because the fact type is explicitly or implicitly objectified. Fact types are implicitly objectified if they are binary with a spanning uniqueness constraint, or n-ary (ternary, quaternary, etc.). In these cases you are actually editing the name for the associated objectifying entity type, not the fact type itself (which doesn't have a writable name field). The editable name in the properties window is a sleight-of-hand redirection.

    The fact types that you can rename (namely the explicitly or implicitly objectified ones) will generally map to join tables in the relational world, which means that the names will actually be used. There is no common use for fact type names that do not map to join tables.

    In the extremely early days of NORMA we did have an asserted FactTypeName field, but found that having dozens of fact types called 'FactTypeN' was much less useful than showing a generated name. When we added implicit objectification--something that we had to do during the generation stage anyway--we eliminated the fact type names. The default names for the objectifying entity types track the default fact type names, and can be restored to their default names by setting the name to an empty string.

    Of course I'm curious as to the use case where this matters to you. If there is some extra data you need to collect you can always look at using the Custom Properties extension to add properties to your fact types.

    -Matt 

  • 07-02-2014 4:56 In reply to

    Re: Fact Type Names

     Matt,

    Thanks for the explanation.  The reason for asking this question is that we are modeling data that will eventually be implemented as an Oracle database.  We are required to deliver the Logical data model in ERWin despite our arguments that ERWin was unnecessary.  To do that we generate the schema in the from of Oracle.sql.  ERWin will reverse engineer that input into their relational form.  The problem comes when producing the output for Oracle.  The DBA who loads the schema reports that ORACLE generates an error whenever any of the names are longer than 25 characters and has requested that all of the table and attribute names be 25 characters or less.  We are trying to see whether we can comply with that request.

    Jack

  • 07-02-2014 8:31 In reply to

    Re: Fact Type Names

    Hi Jack,

    Thanks for the explanation. What should work here is modification of the name generator settings in the ORM Model Browser (Name Generation Defaults/Relational Names). While most of the settings here make a difference, it doesn't look like the name-shortening settings are even looked at by the name generators (AutomaticallyShortenNames, UseTargetDefaultMaximum, UserDefinedMaximum). Obviously, this is something I either need to pay attention to or remove from the UI. However, there are still several things you can do to get shorter names:

    1.  Set custom names for objectifications that map to join tables (the fact type names that are editable). These are generally the longest names in the system.
    2. Use the Abbreviations settings in the name generators to shorten specific names and phrases. This is a good way to change names for your relational model without compromising the verbalizations and readability of your conceptual model. For example, I'm doing an automotive system right now and use abbreviations to allow VehicleIdentificationNumber in the ORM to be vin in the database. Obviously, you can save a lot of characters. You can target either complete object type names or phrases, such has removing has from a generated name.
    3. If the auto-generated names are still too long, just change the generated column and table names. The feature to remember changes to relational names (and column order) was added in the January 2012 NORMA release and is linked from this point in the readme.
    -Matt

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