Data Modeler: How to prevent auto surrogate key in supertype/subtypes?

When forward engineering supertype/subtypes, how can I prevent the automatic creation of a surrogate key (propagated to all super/subs)? Data Modeler creates this SK only at the relational level. I have already defined a surrogate identifier in the logical; the intent is to engineer this to the relational model and propagate to each subtype.
Thanks,
Patrick

Thank you Philip for the explanation. I'd like to dig into this a little deeper, as I may be misinterpreting your explanation, and especially the last bit ( "...but foreign keys from subtype table to super-type table are not created" ).
My preferred super/subtype implementation consists of a supertype parent table (ideally with a [manually created] discriminator code value) and any number of subtype child tables, all referencing the parent (via FK column/RI). Note that RI is from the supertype/parent to each subtype/child table, not the other way round as Designer docs suggest (one of three different approaches: all-inclusive single-table, detail tables only, master/detail w/ RI from child to parent [arced]). The implementation I suggest ("the fourth way") allows the painless addition of a new subtype simply by creating a new child table and a new discriminator value for the parent. I've had consistent success using this approach with Designer for many years.
I've verified this successfully with a bare bones logical (3 levels), with appropriate UID on supertype/parent. All seems to transform well to relational model (i.e., all tables have inherited the parent PK, and individual attributes transformed to columns in the appropriate tables). The transform did not include a SurrogateID column.
However, the transform doesn't work quite so well in my full-blown Party model, even though I ensured that a UID was defined on the logical supertype/parent. also confirmed that Hierarchy relationships are defined between supertypes and subtypes. What else could I be doing wrong that causes the transform to create a SurrogateID column on each super/subtype table?
And on a similar note: are you suggesting that SQLDev Modeler transforms a supertype/subtype hierarchy with RI from detail tables to the parent table (i.e., backwards) when selecting "Table for each entity"? This approach would require a new FK column added to the parent table whenever a new subtype table was required.

Similar Messages

  • SQL data modeller -- how to create 1 to 1 relationship foreign key ?

    hi guys...
    i got 2 tables..
    table 1 - CFR
    CFR_ID = primary key
    table 2 - USER_PLAN
    USER_ID = primary key
    PLAN_ID,
    CFR_ID = foreign key reference (table 1)
    The business flows go like this..
    insdie CFR table, it contain all records / transactions of a particular user/plan. everytime a new transaction occurs for a plan/user, a new CFR_ID / row will be generated.
    after which, the newly generated CFR_ID for the new row , will be updated to the CFR_ID in USER_PLAN
    Thus, there is always a 1 to 1 relationship between the 2 table regardless how many CFR_ID is generated for a particular USER_PLAN. as the CFR_ID in the USEr_plan table will always be the latest one generated inside the CFR table.
    However, in the data modeller, i am unable to create such foreign key relationship... ANY idea how do i create a 1 on 1 foreign key relationship ? or there is no such way..
    Thanks and Best Regards,
    Noob

    Hi philips,
    Thanks for the wonderful reply..
    Just to double comfirm with you,
    even if i had set a unique constraint on CFR_ID(foreign key column), inside the relationship model, the relationship between the foreign key is still showing as a 1:m relationship right ?
    just that a character 'U' will appear beside the CFR_ID column.
    However the diagraphm is still showing a 1:M relationship.
    is this correct ?
    Regards,
    Noob

  • Data Modeler - how can I define a foreign key but disabled

    I am using SQL Developer Data Modeler Version 2.0.0 Build 570 on Mac OS X (Snow Leopard).
    When defining a foreign key constraint, is there a way to define it as disabled?
    When the DDL script is generated, the constraint is defined but it is always enabled, I want it to be disabled.
    This is possible in the Jdeveloper data modeler, but I am missing the method to do this in SQL Developer Data Modeler.
    Any help appreciated.

    OraTone wrote:
    I am using SQL Developer Data Modeler Version 2.0.0 Build 570 on Mac OS X (Snow Leopard).
    When defining a foreign key constraint, is there a way to define it as disabled?
    When the DDL script is generated, the constraint is defined but it is always enabled, I want it to be disabled.
    This is possible in the Jdeveloper data modeler, but I am missing the method to do this in SQL Developer Data Modeler.
    Any help appreciated.Create it and then disable it afterwards if you're using the Connections window to create them.
    If you are generating the DDL edit the ENABLED keyword to DISABLED

  • Sql Developer Data Modeler 3.0 EA1: Auto route off

    I admire that the data modeler tries to automatically position relationships and data flows. I am sure it is very hard to automate and I don't think it works very well in this tool.
    So, I am happy that you have the option of turning "auto route" off as I am quite particular about how diagrams should look.
    In the EA1 it seems that even with "auto route" turned of, all connected relationships and dataflows are automatically repositioned as soon as an entity or process box is resized or moved - even the tiniest bit.
    I think the tool should not reposition relationships or dataflows as long as their current position can be maintained after the connected entity/process is resized or moved. When lines have to be moved the tool should try to maintain a position as close to its original position as possible.
    Let me know if there is a way to achieve this.
    Also, when relationships or dataflows have to be repositioned by the tool, I think they should be placed as far away from each other as possible (giving more room for labels). Currently, it seems that the default behavior is to lump relationships and dataflows close together when they connect the same entities or processes.
    / Marc de Oliveira

    it's the same in Data modeler v. 2.0No, in version 2.0 it is not the same. The line stays in place if you move the entity or process in the same direction as the line, eg a vertical line is not repositioned if you move a connected entity or process vertically. The same goes for horizontal lines.
    Also, when resizing the right side or the bottom side of an entity or process, lines connected to it are not repositioned (as long as the box does not become too small).
    You can get lines "more" fixed if you introduce intermediate point Intermediate point? I never heard of that. Where do I learn more about that? I could not find it in the help file.
    / Marc de Oliveira

  • OS41: data modeler,  how to use it?

    Hi,
    I'd like to know how to use T-code OS41: data modeler, when do I need to use it? and How to use? Please kindly help.
    Thanks and Regards.

    Hi Steve
    <b>SD11-Data Modeler</b> is used, as its name implies, to model your processes.
    You can create entity types, connect tables or views to those entities, implement connections between entities and if needed, you can also insert business objects all in a hierarchical way. You can connect data models to each other as well.
    By this way, you document your own processes containing also some technical perspective.
    Hope this small piece will give some basic understanding.
    *--Serdar

  • New SQL Developer Data Modeler : name of attributes of foreign key

    Hi,
    with designer the name of column of foreign key was the " short name of entity/table master" + "_" + "the name of column attribute of the master table" .
    Instead in the sql developer D.M. the system uses directly the name of the column/attribute of the master table and if the name exists in the slave table it uses a number to distinguish them .
    So, if i have a table with short name gp and a primmary key id and a slave table with even a column id ,
    with the D.M i'll have in the slave table a column named id2; in the designer instead the new column is gp_id .
    Is possible to have the same behavior of designer even in the SQL Developer Data Modeler ?
    Regards
    Gianpaolo Giliberto

    Hi Gianpaolo,
    the columns of foreign keys are generated without the short name of master tablehow do you define that short name? Table and column have property "Abbreviation" - short name should be set there. You need also to set naming templates in "General Options>Naming Standard>Templates". Templates will be used when foreign key is created or you can apply them in Table dialog or for whole relational model using pop-up menu in the browser.
    no foreign key index is generated on foreign key columns I assume, you want it for DDL generation only - this is controlled in "General Options>DDL"
    Regards,
    Philip

  • Data Modeler - how to access it

    Howdy All,
    I've heard of somethin' called the data modeller that I should have access to as a developer...
    Does anyone know the transaction and how to use it?
    Thanking you all kindly.

    Hi Steve
    <b>SD11-Data Modeler</b> is used, as its name implies, to model your processes.
    You can create entity types, connect tables or views to those entities, implement connections between entities and if needed, you can also insert business objects all in a hierarchical way. You can connect data models to each other as well.
    By this way, you document your own processes containing also some technical perspective.
    Hope this small piece will give some basic understanding.
    *--Serdar

  • Data Modeler - How to move relationship lines?

    I can't figure out how to move the relationship lines on the data modeler.
    Tried a bunch of things that have worked in all the other modelers I've used, but no luck. Couldn't find anything in the help text about it, either.
    Edited by: David Wendelken on Nov 14, 2008 4:07 PM

    Hi Jim, David,
    AutoRoute (on/off) can be managed at diagram level - use right mouse click on empty space.
    In current published release (AutoRoute off) - straight lines (only two connection points) cannot be moved. You need intermediate points (at least one) for better arranging. Points (Elbows ) are created using Ctrl+mouse click.
    Connection points also can be moved in next EA release.
    Philip

  • Data Modeler - How to add foreign keys to physical model?

    I imported few tables from data dictionary and tried to generate a DDL file. The DDL didn't include foreign keys for some reason. Then I noticed that the foreign keys are in the relational model but not in the physical model. How do I get those foreign keys to the physical model?

    That's the place where I'm looking for the foreign keys in physical model. I noticed that in relational model the Generate check box of a foreign key was unchecked. When I checked it, the key appeared in the physical model. But why is it unchekced sometimes? This has happened only few times, usually the foreign keys do appear in the physical model. If I do something special during import, I don't know what it is...

  • How to prevent auto font substitution in Photoshop CS5?

    Previously in CS4 you could open a PSD with missing fonts and have the file still open and display the font properly on screen. Only if you tried to edit that type layer would it auto subsitute and force you to update the font. Now in CS5, just opening the PSD auto substitutes all missing fonts to Myriad. How do you prevent that from happening? It's really irratating. Thanks all that respond.

    Gotta agree with screenname_1001 here.
    I've seen several files open, warn me that a font is missing giving "OK" or "Cancel" options. Upon clicking "OK" the font is automatically substituted with Myriad Pro and there's no way of knowing what the original font was.
    I've opened files in Graphics Converter or Preview to simply figure out what the font name was.
    I have not ruled out font management software as the issue though. This may simply be a symptom of having FontAgent Pro installed.

  • Data Modeller: how to create and use collection type

    Hello,
    basically subj. I'm not clear how to ( for example ) create and use the data type based off the varray data type.
    Please advise.
    thank you
    andrew

    Hi Andrew,
    you can create collection types (varray/table) in two ways:
    1) in browser - find "Data Types">"Collection types" node use pop-up menu - it's just "create new collection type" there
    2) in Data types model diagram - you can create collection of "certain structured type" or collection of references to it - use "new Collection ..." tool and first click on referred structured type and after that on structured type that will hold the collection - new attribute is added in latter type and if there is no such collection type already defined new collection type is created and you can edit it later.
    Philip

  • In ALV display model ,how to accept the ENTER key event?

    Dear All,
    I have used ALV by  GRID DISPLAY model ,not class model.
        CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program       = sy-repid
          i_callback_pf_status_set = 'SET_PF_STATUS'
          i_callback_user_command  = 'USER_COMMAND'
          i_structure_name         = 'T_ITAB'
          is_layout                = gs_layout
          it_fieldcat              = t_fieldcat[]
          i_default                = 'X'
          i_save                   = 'A'
        TABLES
          t_outtab                 = t_itab
        EXCEPTIONS
          program_error            = 1
          OTHERS                   = 2.
    For example :
    IN ALV DISPLAY, there are two fields, one is MATNR, the other is MAKTX.
    When user input the material value in MATNR field and press ENTER, then ALV can run my code to select the MAKTX into MAKTX field and display it synchronization.
    Now I have realized update edit in ALV,but I found only I double click ALV row, then the MAKTX can update.
    Please give me help,
    Thanks
    Sun

    This is the document written by me on Interactive ALV.. hope this maybe helpful for u..
    When an Interactive Report is needed in Classical Display, we go for AT LINE-SELECTION. But when the same is needed in ALV Display, this method won't work. Instead, we need to use other way which is explained below:
    We use REUSE_ALV_GRID_DISPLAY for ALV Display. Now, normally we call that FM in the following way:
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
           EXPORTING
                i_callback_program      = 'PROGRAM_NAME'
                it_fieldcat             = tb_fieldcat
           TABLES
                t_outtab                = tb_output.
    When it is needed to get an Interactive ALV, call the same FM in the following manner:
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
           EXPORTING
                i_callback_program      = 'ZTEST75599_1'
                it_fieldcat             = tb_fieldcat
                i_callback_user_command = 'USER_COMMAND'
           TABLES
                t_outtab                = tb_output.
    Now, in the report, create a subroutine with the name USER_COMMAND as follows:
    FORM user_command  USING p_ucomm    LIKE sy-ucomm
                             p_selfield TYPE slis_selfield.
      CASE p_ucomm.
        WHEN '&IC1'.   " &IC1 - SAP standard code for double-clicking
    Based on the requirement, write the logic                          *
      ENDCASE.
    ENDFORM.
    No need to call the subroutine as PERFORM user_command. This will be takane care by REUSE_ALV_GRID_DISPLAY. We need to just write the subroutine in the report. That suffices.
    Some more useful points for Interactive ALV:
    1. If Hotspot is needed, then that should be done by declaring hotspot (one field in slis_t_fieldcat_alv) as 'X' in tb_fieldcat which is of type slis_t_fieldcat_alv. When hotspot is active, single click will be enough or else you should double click on the output data.
    2. In Classical Display, when it is needed to read the record on which we double clicked, we do that in following way:
       AT LINE-SELECTION.
           GET CURSOR LINE wf_line. " wf_line gives the line number on which it has been clicked
             READ LINE wf_line OF CURRENT PAGE.
      But this won't work for ALV. Instead, the following logic can be used:
    FORM user_command  USING p_ucomm    LIKE sy-ucomm
                             p_selfield TYPE slis_selfield.
      CASE p_ucomm.
        WHEN '&IC1'.   " &IC1 - SAP standard code for double-clicking
          READ TABLE tb_output INTO wa_output INDEX p_selfield-tabindex.
          IF sy-subrc EQ 0.
    Based on the requirement, write the logic                          *
          ENDIF.
      ENDCASE.
    ENDFORM.

  • TDMS "data model" - how to evaluate?

    We are using TDMS for quite some time now and I see certain data transfers which I do not understand:
    Table SRRELROLES
    That table is always transferred completely in our system (13 years of data, > 70.000.000 entries) even if I select to only transfer two months.
    After having opened an OSS call (155066/2009) I was told, that selection criteria is as following:
    ( ( OBJTYPE = 'IDC0'
    OR OBJTYPE = 'IDC1'
    OR OBJTYPE = 'IDCB'
    OR OBJTYPE = 'IDC4'
    OR OBJTYPE = 'IDC9'
    OR OBJTYPE = 'IDC8'
    OR OBJTYPE = 'IDCA'
    AND UTCTIME >= '20081001000000'
    OR
    ( ( NOT OBJTYPE = 'IDC0'
    AND NOT OBJTYPE = 'IDC1'
    AND NOT OBJTYPE = 'IDCB'
    AND NOT OBJTYPE = 'IDC4'
    AND NOT OBJTYPE = 'IDC9'
    AND NOT OBJTYPE = 'IDC8'
    AND NOT OBJTYPE = 'IDCA'
    If I do the select on our database:
    SQL> select count(*) from SRRELROLES where
      2  OBJTYPE = 'IDC0'
      3  OR OBJTYPE = 'IDC1'
      4  OR OBJTYPE = 'IDCB'
      5  OR OBJTYPE = 'IDC4'
      6  OR OBJTYPE = 'IDC9'
      7  OR OBJTYPE = 'IDC8'
      8  OR OBJTYPE = 'IDCA';
      COUNT(*)
             0
    So the first term of the SQL will not read anything, the second after the OR will read all.
    I don't understand that.
    I have a few other BIG tables, that are also completely transferred (PPOIX, PPOPX, IDOCREL) and if any of the data of those tables is the base for other data, then it's understandable, that our target systems are MUCH too big.
    Is there any method of finding out how the tables are "related" against each other and how the data is read?
    Regards,
    Markus

    Hi Markus,
    I don't know if you noticed, but SAP created note 1326118 to change the way that SRRELROLES is filtered. It might improve the results you get on your system, it did improve on mine.
    By the way, that note changes the standard config by updating CNVMBTSELGRPVAL, so it will give you an insight on what are the standard filters (and how to manipulate them if needed). It's also true, though, that some filters are hard-coded in the selection programs.
    Hope this help,
    Rui Dantas

  • What is data modeling how it is linked to BAPI?

    Hi,
    What is Datamodeling and how it is linked to BAPI?
    Immediate reply is highly appriciable?
    Regards,
    Chow.

    Datamodelling is much like all other modelling.
    First you create a drawing of the original object. Then you buy some plywood or other suitable material for your model and cut this according to your drawings and scale. If you are rich and have the time you can create a 3D-model of your object and get laser-cut plastic or metal parts for your model.
    When you have all your parts it is time to paint them. If you are lucky there is a shop specialising in everything for modellers, so they will have different kinds of paint in a good variety of colours.
    Finally you assemble everything, and - hey - there's your model. Now, that wasn't too difficult, was it?
    The answer to your second question is that datamodelling fits BAPI like a glove fits a fish. At least that is usually the case, but it depends...

  • Data Modeler: How to create a self reference in ER?

    e.g. I create the entity EMP in a logical Subview. Two attributes are here essential for a self-reference: EMPNO and MGR. So each Employee has a reference to his boss. And this information is stored in MGR.
    Now I create the entity EMP with the 8 columns from the SCOTT/TIGER schema. After that I define a 1:N-Relation between EMP and EMP. but it looks like I cannot define, which attributes are starting point of the relation and destination.
    Who can help me here?
    Gerd

    Gerd,
    you cannot select destination (as you said) attribute - they are automatically generated. However you can achieve what you want - it depends on your starting point:
    1) start from logical model (analysis first)
    - you create 1:n recursive relationship -
    - change the name of created FK attribute to MGR or what ever you want - this is controlled by "FK Attribute name synchronization" setting at "General options>Model>Logical" page
    2) start from relational model (reverse engineering of existing status)
    - create self reference foreign key - select MGR as FK column;
    - reverse engineer to logical model - you'll have FK attribute named MGR
    Philip

Maybe you are looking for