2 Replies Latest reply: Mar 15, 2013 4:46 AM by Guenter Reberschak, TU GRAZ RSS

    SDDM 3.3EA Traps, nuisances

    Guenter Reberschak, TU GRAZ
      Hello Developers!

      I have one model file.
      I have imported entities from Designer to it-> fine
      I have imported tables from a database to it-> fine
      Then I changed the templates to sugested values e.g. {table abbr}_PK and so on.
      Then I checked, to be on the save side, DDL -> automatic index generation all three checkboxes


      NOW i only! want to merge/reverse engineer a table with an entity. Should be simple you would think.
      I go to the relational model, where the table is to be found, click engineer to logical-> choose the wanted table look at the tree and what does SDDM wants to do? Create a new entity although the entity with this name exists.
      The details tab is useless.
      The general options tab with or without clicking apply name translation is useless.
      How can one do this merge? This should be a everyday job. Or is my approach, which I still think is logical, in the developers eyes false?


      Almost the same scenario
      I only want to engineer new entities with some FK-constraints to the relation model.
      I go to the logical subview -> click engineer to relational -> choose the entities -> look at the tree -> SDDM wants to create NR1-NR4 fields for the FK-fields instead of expected tablename_parentPKfieldname. OK, I click in the compare/copy tab 'apply name translation' then 'update tree' -> no change. What do I do wrong? Why does SDDM generate those fields so stupid? Why doesn't my approach work? What is the hidden secret to use SDDM intuitivly?

      And when I nevertheless engineered SDDM ignored attributes set as PK and choose to create a new column named mytable_ID as a PK.

      1) How can I make SDDM understand that an entity belongs to a table and vice versa?
      2) How can I generate FK columns like entity-short-name_parent-column-PK
      3) Can someone explain the meaning behind 'use surrogate keys' when looking at FKs propertiers
      4) What went wrong with the PK-attributes/columns generation

      Sorry for the long story but I am sure that this funtionality must be buried in some queer combination of tricks/configurations/secrets....

      Well, thank you for reading
      Guenter
        • 1. Re: SDDM 3.3EA Traps, nuisances
          Philip Stoyanov-Oracle
          Hi Guenter,
          I have imported tables from a database to it-> fine
          That's not fine - you should import entities and tables from Designer repository first and if they are mapped there they will be mapped in Data Modeler. After that you can import physical definitions from database.
          Then I changed the templates to sugested values e.g. {table abbr}_PK and so on.
          How do you set table abbreviation? Setting the template is one part of the job, you need to apply the template - use "Apply naming standards .." appearing in context menu of relational model in the browser.
          NOW i only! want to merge/reverse engineer a table with an entity. Should be simple you would think.
          Yes it will be simple if they are mapped.
          The details tab is useless.
          Details tab and related compare options has meaning when compare two objects. What do you expect to see when new object is created?
          The general options tab with or without clicking apply name translation is useless.
          OK, I click in the compare/copy tab 'apply name translation' then 'update tree' -> no change
          "update tree" works only for settings on the same tab (compare options) which allow filtering to be defined for properties you don't want to consider - update tree will update the tree using the settings on "compare options" tab.
          if you change settings related to name translation and want them reflected in tree then you need to run wizard again. Otherwise they simply will be applied during engineering.
          SDDM wants to create NR1-NR4 fields for the FK-fields instead of expected tablename_parentPKfieldname
          There are some problems in DM 3.3 EA1 which are covered in next release:
          - applying of templates during engineering
          - new templates for surrogate PK, surrogate PK column, discriminator column;
          - template for FK constraint allow relationship name to be used, the same for FK column template
          - FK column template also allow FK constraint name to be used.
          Also name can be locked in next release so you can apply one template, lock some names, apply another template and so on.
          1) How can I make SDDM understand that an entity belongs to a table and vice versa?
          There is no free mapping tool - we have it in our plan. You need to tune your process:
          - import from ERwin or Designer repository will bring mapping into DM's design;
          - import from database and engineering to logical model - mapping is created;
          - new entities in logical model, engineering to relational model and mapping is created;
          It's expected table and entity to have the different names thus such search by name and map is never used. Such approach is used when import from database.
          2) How can I generate FK columns like entity-short-name_parent-column-PK
          Entity short name goes to table abbreviation during engineering so you can define template with table abbreviation and apply it. This works in each release of DM.
          3) Can someone explain the meaning behind 'use surrogate keys' when looking at FKs propertiers
          That's for relationship - relationship can be bound to specific identifier and FK attributes will be generated,and their names can be tuned. Otherwise you an select "surrogate key" to be used then no FK attributes will be generated and during engineering existing PK will be transformed to UK and surrogate PK will be created.
          4) What went wrong with the PK-attributes/columns generation
          It's driven by your choices - it is selected that surrogate key to be created/used at entity or relationship level. Default settings (applied when new object is created) can be changed in "Preferences>Data Modeler>Model>Logical" - they are not checked by default.
          Existing settings on group of objects can be changed using search and "set common properties" functionality.

          Philip
          • 2. Re: SDDM 3.3EA Traps, nuisances
            Guenter Reberschak, TU GRAZ
            Dear Philip!

            Thanks a lot for answering and for your patience. Sorry for replying so late.

            That's not fine - you should import entities and tables from Designer repository first and if they are mapped there they will be mapped in Data Modeler. After that you can import physical definitions from database.

            Alright, that solved some of my problems.
            To sum it up: Importing entities from Designer and importing tables from database and expecting that SDDM maps them is a no go.
            The only useable way, at least for my approach, is to import all the tables from a database and then reverse engineer them to entities

            Details tab and related compare options has meaning when compare two objects. What do you expect to see when new object is created?
            Well, to explain. I create an entity and then I want to engineer it to the relational model. When I look at the details tab in the 'engineer to relational' window I only see the details of my entity but no details of the 'to_engineering_table'.
            And there is no possibility to change something in this detail tab. So I still think it is a useless thing.

            There is no free mapping tool - we have it in our plan. You need to tune your process:
            Ok, I got it and this answer helped me a lot

            Entity short name goes to table abbreviation during engineering so you can define template with table abbreviation and apply it. This works in each release of DM.
            Ok, I got that too. One has to build his templates and then one has to apply name translation with the entity and again with the generated table.

            best wishes
            Guenter