Foreign key changing name...

Hi again, and again...! (at least I always punch the helpful and correct buttons ...:P)
Clearly, I lack knowledge about foreign keys.
Of course I searched the web before posting.
!http://img264.imageshack.us/img264/9602/dsdv.png!
This is the strange DSD...
The Team table (equipe) is connected to Rencontre (Meeting)
During a meeting (NoR 1,2 ... incrementation), there is TWO teams : NoEH (Host team) and NoEV (Visiting team)... these are FK for NoE (Team number)
This is so strange...
The Partie (Match) occurs from 3 to 5 times during a Meeting, and the winner is put on the H_ or V_, which only says which team wins... visiting or host
How am I suppose to make a select table stating which team (NoE!!!! not NoeH! or NoeV?!!) won how many games, how many games played, wtc...
Anyone know a tactic to approach this problem?
I was thinking of maybe creating a view for each team to add their wins...?

Hi,
For this case can you post scripts for creation of tables and a minimal data? And also please post the specific problem you are having.
Regards,

Similar Messages

  • How to create a Foreign key relationship between 2 user defined tables...

    Hi Folks,
    I have created two user defined tables... Where in i want to create foriegn key relationship between the 2 tables.... Can anyone guide the step by step procedure to do this scenario...
    Any help would be highly appreciated...
    Thanks

    Hi
    1.  In the 2nd table call the field of the 1st table which is a primary key.
    2.  Give the same field and dataelement name.
    3.  Select that field and then click on the foreign key field icon which is beside Search Help button.
    4. Then give short text, and the 1st table name.
    5. Then in the below box give the 2nd table name and 2nd table field name which you have called from 1st table.
    6. Then click on copy, then u will be able to see Check table name and check table field name beside foreign key table name.
    7. Then again click on copy.
    Regards
    Haritha.

  • Problem with foreign key in entity bean in WSED..Plzzzzz help!!!!!

    hi all,
    m very new to ejb...m crerating container managed entity bean in wsed..The steps I have followed r as follows,
    i) created 2 tables in database,one is PARENT with fields ID(Primary Key) and NAME and another is CHILD with fields ID1(Foreign Key) and NAME.
    ii)created 2 entity beans... 1st is parent with fields id(key field) and name(promote getter & setter methods to local interface)...2nd is child
    (choosed parent as bean super type) with fields id1 (promote getter & setter methods to local interface) and name (promote getter & setter methods to local interface)...
    iii)Generated EJB to RDB mapping(choosed crreate new backend folder->meet in the middle->use existing connection->choosed the tables parent & child in the database->match by name->finish)
    now m getting an error in Map.mapxmi--->"The table PARENT does not have a discriminator column"...and a warning--->"A primary key does not exist for table: CHILD in file: platform:/resource/NewFK/ejbModule/META-INF/backends/DB2UDBNT_V8_1/Map.mapxmi.     Map.mapxmi     NewFK/ejbModule/META-INF/backends/DB2UDBNT_V8_1     L/NewFK/ejbModule/META-INF/backends/DB2UDBNT_V8_1/Map.mapxmi"

    Hi Sandra,
    Many thanks for your response and providing time of yours.
    Now, I have done exactly the same thing, but still it is the same.
    I have created two new tables as below:
    ZAAVREF (Check table)
    MANDT (PK)
    COUNTRY (PK) Domain:ZAACOUNT (CHAR 10)
    ZAAV1 (Foreign key table)
    MANDT (PK)
    COUNTRY (PK) Domain:ZAACOUNT (CHAR 10)
    Then I have created FK on country of foreign key table ZAAV1 and then SE16 (for table ZAAVREF)->Create Entries-> Entered values for Country only->Save....Records entered with valid Country values.
    After that SE16 (for table ZAAV1)->Create Entries-->Entered an Invalid country->Save->Still the record entered to the Database successfully....
    Could you please let me know where I am going wrong.
    I am using SAP R/3 4.7 and creating tables using Tools->ABAP Workbench->Development->ABAP dictionary

  • Foreign key creation is very slow

    Hello,
    We are about to migrate a database from 9iR2 to 10g by doing export/import.
    One of the last steps of the migration, after the import, is to create constraints and indexes. The foreign key creation process is lasting about 7 hours, and this is something we cannot afford. How could we speed up this process of foreign key creation?
    Thanks in advance,
    Eva

    Look at the statement (using enterprise manager, SQL*Plus, sql trace or whatever) while the foreign keys are enabled/created. Basically for following tables:
    SQL> create table big as select * from dba_source;
    Table created.
    SQL> create table big1 as select * from dba_source;
    Table created.
    SQL> alter table big add constraint big_pk primary key (owner, name, type, line, text);
    Table altered.and following foreign key:
    SQL> alter table big1 add constraint big1_big_fk
      2  foreign key (owner, name, type, line, text)
      3  references big (owner, name, type, line, text);the statement is:
    select /*+ all_rows ordered */ A.rowid, :1, :2, :3
    from
    "GINTS"."BIG1" A , "GINTS"."BIG" B where( "A"."OWNER" is not null and
      "A"."NAME" is not null and "A"."TYPE" is not null and "A"."LINE" is not
      null and "A"."TEXT" is not null) and( "B"."OWNER" (+)= "A"."OWNER" and
      "B"."NAME" (+)= "A"."NAME" and "B"."TYPE" (+)= "A"."TYPE" and "B"."LINE" (+)
      = "A"."LINE" and "B"."TEXT" (+)= "A"."TEXT") and( "B"."OWNER" is null or
      "B"."NAME" is null or "B"."TYPE" is null or "B"."LINE" is null or
      "B"."TEXT" is null)As usually such statement can be executed using various execution plans. And as usual some are better than other for example I could manage 2 variants:
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.00          0          0          0           0
    Execute      1      0.00       0.00          0          3          0           0
    Fetch        1     59.48      74.29      77125   10217945          0           0
    total        3     59.48      74.30      77125   10217948          0           0
    Misses in library cache during parse: 1
    Misses in library cache during execute: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: SYS   (recursive depth: 1)
    Rows     Row Source Operation
          0  CONCATENATION  (cr=10217945 pr=77125 pw=0 time=74294598 us)
          0   FILTER  (cr=2043589 pr=15557 pw=0 time=16167973 us)
    1014081    NESTED LOOPS OUTER (cr=2043589 pr=15557 pw=0 time=16234254 us)
    1014081     TABLE ACCESS FULL BIG1 (cr=15425 pr=15265 pw=0 time=4065256 us)
    1014081     INDEX UNIQUE SCAN BIG_PK (cr=2028164 pr=292 pw=0 time=10314886 us)(object id 125287)
          0   FILTER  (cr=2043589 pr=15331 pw=0 time=14522620 us)
    1014081    NESTED LOOPS OUTER (cr=2043589 pr=15331 pw=0 time=16225336 us)
    1014081     TABLE ACCESS FULL BIG1 (cr=15425 pr=15331 pw=0 time=4056358 us)
    1014081     INDEX UNIQUE SCAN BIG_PK (cr=2028164 pr=0 pw=0 time=8736590 us)(object id 125287)
          0   FILTER  (cr=2043589 pr=15413 pw=0 time=15081218 us)
    1014081    NESTED LOOPS OUTER (cr=2043589 pr=15413 pw=0 time=16257085 us)
    1014081     TABLE ACCESS FULL BIG1 (cr=15425 pr=15413 pw=0 time=4087642 us)
    1014081     INDEX UNIQUE SCAN BIG_PK (cr=2028164 pr=0 pw=0 time=9114281 us)(object id 125287)
          0   FILTER  (cr=2043589 pr=15412 pw=0 time=14470176 us)
    1014081    NESTED LOOPS OUTER (cr=2043589 pr=15412 pw=0 time=16260121 us)
    1014081     TABLE ACCESS FULL BIG1 (cr=15425 pr=15412 pw=0 time=4091125 us)
    1014081     INDEX UNIQUE SCAN BIG_PK (cr=2028164 pr=0 pw=0 time=8833532 us)(object id 125287)
          0   FILTER  (cr=2043589 pr=15412 pw=0 time=14052583 us)
    1014081    NESTED LOOPS OUTER (cr=2043589 pr=15412 pw=0 time=15224595 us)
    1014081     TABLE ACCESS FULL BIG1 (cr=15425 pr=15412 pw=0 time=4069696 us)
    1014081     INDEX UNIQUE SCAN BIG_PK (cr=2028164 pr=0 pw=0 time=8607611 us)(object id 125287)
    Elapsed times include waiting on following events:
      Event waited on                             Times   Max. Wait  Total Waited
      ----------------------------------------   Waited  ----------  ------------
      db file scattered read                       4906        0.12         13.62
      db file sequential read                       362        0.11          1.78and
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.01       0.00          0          0          0           0
    Execute      1      0.00       0.00          0          0          0           0
    Fetch        1      4.57      23.10      22563      30850          0           0
    total        3      4.59      23.11      22563      30850          0           0
    Misses in library cache during parse: 1
    Misses in library cache during execute: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: SYS   (recursive depth: 1)
    Rows     Row Source Operation
          0  FILTER  (cr=30850 pr=22563 pw=0 time=23106976 us)
    1014081   HASH JOIN OUTER (cr=30850 pr=22563 pw=0 time=20989057 us)
    1014081    TABLE ACCESS FULL BIG1 (cr=15425 pr=10342 pw=0 time=6122826 us)
    1014081    TABLE ACCESS FULL BIG (cr=15425 pr=12221 pw=0 time=4079771 us)
    Elapsed times include waiting on following events:
      Event waited on                             Times   Max. Wait  Total Waited
      ----------------------------------------   Waited  ----------  ------------
      db file scattered read                       4114        0.21         13.20
      db file sequential read                      1849        0.22          5.55Obviously the second one is about 2 times better than the first one.
    So I'v managed to get it using:
    1) dbms_stats to compute stats on these table so that Oracle understand that these are really large tables
    2) altering session to use manual workarea size policy and give more resources for hash joins and sorts:
    SQL> alter session set workarea_size_policy= manual;
    Session altered.
    Elapsed: 00:00:00.01
    SQL> alter session set sort_area_size = 1000000000;
    Session altered.
    Elapsed: 00:00:00.01
    SQL> alter session set hash_area_size = 1000000000;So the trick is - understand the bottleneck and trying to do something about it. In my case I cannot do much more because everything now is dependant on disks and I cannot make my pc much faster :)))
    Another options is to create FKses either disabled and enable them later on or create enabled but not validate them. This is almost instantenous as you can see in the following code snippet. Of course that might give some implications later, especially if you create them disabled :)
    SQL> alter table big1 add constraint big1_big_fk
      2  foreign key (owner, name, type, line, text)
      3  references big (owner, name, type, line, text)
      4  disable;
    Table altered.
    Elapsed: 00:00:00.03
    SQL> alter table big1 drop constraint big1_big_fk;
    Table altered.
    Elapsed: 00:00:00.01
    SQL> alter table big1 add constraint big1_big_fk
      2  foreign key (owner, name, type, line, text)
      3  references big (owner, name, type, line, text)
      4  enable novalidate;
    Table altered.
    Elapsed: 00:00:00.03
    SQL> Gints Plivna
    http://www.gplivna.eu

  • Changing foreign key name in physical model

    If I change foreign key name in physical model, it does not change in relational model. But when I change the name in relational model, the new name appears in physical model. This happens in Data Modeler 2 and 3EA2. Is it a bug or an intentional feature?

    it's not a bug - the name in physical model "follows" the name in relational model until name in physical model is changed. It keeps the same value and changes in relational model do not affect it. original behavior can be restored if you set the same name as it is in relational model.
    If I change foreign key name in physical model, it does not change in relational modelYou can look at physical model as specific implementation of relational model - changes do not go back in relational model.
    Philip

  • Data Modeler foreign key names

    Hi,
    I've been using Data modeller for a while now and it works beautifully, anyhow there is an issue I would appreciate if anybody can help me in.
    For foreign keys, if the master table primary key is names ID, the foriegn key will be ID also, and if already there is an ID column column in the detail table, it will be ID1, ID2 ....
    Can I change the naming method to be like the oracle designer, or any convention I would like ??
    Thanks
    AK

    I'm using the Logical Model V 1.5.1Paul,
    it's pre-production release. Data Modeler is free now and you can download current published release - it.s version 2.0.0.584.
    There is "Attributes" page in relationship dialog (version 2.0) and you can see attributes generated by that relationship.
    For foreign keys in relational model - there is "Associated columns" page, you also can see referred key there.
    Naming templates for FK columns and attributes can be defined in version 2.0.0.584.
    Philip

  • How to change a massive amount of foreign keys?

    Hi to all!
    I'm a newbie here, and I hope I'll find a solution to my problem...
    Well, I have to create a copy of row within the same table, with same values except of primary key. That part is ok. Then, I have to change values of that primary key (from old value, to new value) in all foreign keys which references to that column/primary key in parent table. Let's say that isn't problem too, using system tables and informations about constraints and indexes...
    But, tricky part comes. Some of those foreign keys are primary keys for their tables, and there are other foreign keys which references to these primary keys, including a column which is primary key in very first (parent) table. And also, that line of primary key-foreign key can go on...
    I don't know how deep to check for those keys. Any help with some piece of code (in PL/SQL)? Also, how to start to change value of that, particular column, in line of primary key-foreign key?

    Sounds like you need to add a copy function to your application. This will allow you to create a copy of an existing import/export but each will be unique. This would provide you with the ability to change the import/export and retain the old and new details.
    A small example using a header and detail table;
    select * from orders;
      ORDER_ID ORDER_DATE
             1 27/05/2010
    select * from order_lines;
       LINE_ID   ORDER_ID
             1          1
             2          1
             3          1A function that makes a copy of a certain order;
    create or replace function copy_order(p_order_id orders.order_id%type)
      return number is
      l_new_order_id orders.order_id%type;
    begin
      select orders_seq.nextval
      into l_new_order_id
      from dual;
      insert into orders
        (order_id, order_date)
        select l_new_order_id, sysdate
        from orders
        where order_id = p_order_id;
      insert into order_lines
        (line_id, order_id)
        select order_lines_seq.nextval, l_new_order_id
        from order_lines
        where order_id = p_order_id;
      return l_new_order_id;
    end;
    Function createdCall the function with order_id 1;
    var n number
    exec :n := copy_order(1);
    PL/SQL procedure successfully completed
    print n
    n
    2There are now 2 similar orders;
    select * from orders;
      ORDER_ID ORDER_DATE
             1 27/05/2010
             2 28/05/2010
    select * from order_lines;
       LINE_ID   ORDER_ID
             1          1
             2          1
             3          1
             4          2
             5          2
             6          2
    6 rows selectedThe first order can be canceled (using a status column or similar) and the second order can be updated, ie add additional lines, etc. or left as is.

  • Delete a user from a table whose name is a foreign key in other tables

    Dear All;
    I am trying to figure out an easy way to do this. I just recently took someone application who utilized 500 tables. I am trying to delete a user from a table called member_table. However, I am having problems doing so because the user name is a foreign key in other tables which has a relationship with this member_table. I really can't naviagte through all 500 different tables and start deleting the user from each table . hence, I would like to figure out a way to delete the user from the member_table without getting the error message
    ORA - 02292 "Integrity Constraint (....) violated child record found

    Unless you want to find and re-create all of the FK's that point to that field so you can make them ON DELETE CASCADE (note it is the FK not the PK that has that attribute), you will need to either delete that member id from each of the child tables individually or update each one individually to either null or some valid value in member_table before you can delete the id from member_table.
    You can find all of the tables, and the corresponding column_name that have an FK relationship to memeber_table with the following:
    SELECT c.table_name, col.column_name
    FROM user_constraints c, user_cons_columns col
    WHERE c.constraint_name = col.constraint_name and
          c.r_constraint_name = (SELECT constraint_name
                                 FROM user_constraints
                                 WHERE table_name = 'MEMBER_TABLE' and
                                       constraint_type = 'P') and
         c.constraint_type = 'R';If there are a lot of these, you could use something similar to generate the set of delete/update statements that would be needed.
    John

  • Unable to create foreign key: InvalidArgument=Value of '0' is not valid for 'index'. Parameter name: index

    I am running an SQL(CE) script to create a DB. All script commands succeed, but the DB get "broken" after creating the last costaint: after running the script, viewing table properties of Table2 and clicking on "Manage relations" gives the following error: Unable to create foreign key: InvalidArgument=Value of '0' is not valid for 'index'. Parameter name: index. Wondering what does that refer to...
    Here it is the script. Please note that no error is thrown by running the following queries (even from code that passing the queries by hand, one-by-one to sql server management studio).
    CREATE TABLE [table1] (
    [id_rubrica] numeric(18,0) NOT NULL
    , [id_campo] numeric(18,0) NOT NULL
    , [nome] nvarchar(100) NOT NULL
    GO
    ALTER TABLE [table1] ADD PRIMARY KEY ([id_rubrica],[id_campo]);
    GO
    CREATE UNIQUE INDEX [UQ__m_campi] ON [table1] ([id_campo] Asc);
    GO
    CREATE TABLE [table2] (
    [id_campo] numeric(18,0) NOT NULL
    , [valore] nvarchar(4000) NOT NULL
    GO
    ALTER TABLE [table2] ADD PRIMARY KEY ([id_campo],[valore]);
    GO
    ALTER TABLE [table2] ADD CONSTRAINT [campo_valoriFissi] FOREIGN KEY ([id_campo]) REFERENCES [table1]([id_campo]);
    GO
    Sid (MCP - http://www.sugata.eu)

    I know this is kind of old post, but did this realy solved your problem?
    I'm getting this same error message after adding a FK constraint via UI on VS2008 Server Explorer.
    I can add the constraint with no errors, but the constraint is not created on the DataSet wizard (strongly typed datasets on Win CE 6) and when I click "Manage Relations" on the "Table Properties" this error pop out:
    "InvalidArgument=Value or '0' is not valid for 'index'.
    Parameter name: index"
    Even after vreating my table with the relation in SQL the same occurs:
    CREATE TABLE pedidosRastreios (
        idPedidoRastreio INT NOT NULL IDENTITY PRIMARY KEY,
        idPedido INT NOT NULL CONSTRAINT FK_pedidosRastreios_pedidos REFERENCES pedidos(idPedido) ON DELETE CASCADE,
        codigo NVARCHAR(20) NOT NULL

  • Query the name of the parent table in a foreign key constraint

    Hello,
    Does anyone know how to query for the parent table name in a foreign key constraint? I don't see that relationship in ALL_CONS_COLUMNS or ALL_CONSTRAINTS.
    Thanks in advance,
    Michael

    or try this...
    SELECT rc.TABLE_NAME "PK_Table_Name",cc.TABLE_NAME "FK_Table_Name",
           case when cc.column_name = rc.column_name
                then c.TABLE_NAME || '(' || cc.COLUMN_NAME || ')'
                else r.TABLE_NAME || '(' || rc.COLUMN_NAME || ') = ' ||c.TABLE_NAME || '(' || cc.COLUMN_NAME || ')' end as "TABLE_NAME(COLUMN_NAME)"
    from all_constraints c,
         all_constraints r,
         all_cons_columns cc,
         all_cons_columns rc
    WHERE
         r.table_name = upper('emp')
    and      c.CONSTRAINT_TYPE = 'R'
    and     c.R_OWNER = r.OWNER
    and     c.R_CONSTRAINT_NAME = r.CONSTRAINT_NAME
    and     c.CONSTRAINT_NAME = cc.CONSTRAINT_NAME
    and     c.OWNER = cc.OWNER
    and     r.CONSTRAINT_NAME = rc.CONSTRAINT_NAME
    and     r.OWNER = rc.OWNER
    and     cc.POSITION = rc.POSITION
    ORDER BY r.TABLE_NAME;

  • FOREIGN KEY CONSTRAINT 의 MASTER TABLE NAME 의 확인

    제품 : ORACLE SERVER
    작성날짜 : 1995-11-02
    FOREIGN KEY CONSTRAINT 의 MASTER TABLE NAME 의 확인
    ===================================================
    다음은 FOREIGN KEY CONSTRAINT 이름으로 REFERENCE 하는 TABLE
    (MASTER TABLE)을 찾는 SQL SCRIPT이다.
    col Primary_key_table format a20
    col Constraint_name format a20
    select a.object_name Primary_Key_table,
    c.name Constraint_name
    from dba_objects a,
    sys.cdef$ b,
    sys.con$ c
    where c.name = 'EMP_FOREIGN_KEY' -- CONSTRAINT NAME
    and b.con# = c.con#
    and b.robj# = a.object_id
    /

    The set of constraints as you show it is valid, but will likely result in a lot of violations since both child columns are larger than the parent. The Oracle 2256 error has nothing to do with data validation, nor with the different lengths of the columns. The documentation says
    02256, 00000, "number of referencing columns must match referenced columns"
    // *Cause: The number of columns in the foreign-key referencing list is not
    //         equal to the number of columns in the referenced list.
    // *Action: Make sure that the referencing columns match the referenced
    //          columns.Look at the actual statement that the client ran. It will be different than the one you posted. one of the two column lists will have more columns than the other.

  • How To Change Key Figure Name

    Hi Gurus,
    Is it possible to change the name of a Key Figure in Demand Planning? For example, in DP, i have a Key Figure name 'Sales Forecast'. The 'Sales Forecast' currently appears in every Planning book it was set.
    Now, for alignment of understanding, I need to change the name from 'Sales Forecast' to 'Sales Demand' . Basically, i just need to change the text that appear in the Planning book and in the extracted BI reports.
    Logic of Key Figure will remain the same. Is this possible? How do I go about this? I only know of how to add a Key Figure but never thought of how to change the Key Figure name/description.
    Thanks in advance!
    Nap

    Hi,
    You can change it in 2 ways.
    1] Go to each Planning Book in Edit mode.
        In that go to a Tab called Key Figure Attributes.
        Select your Sales Forecast Key figure from the dropdown   against Key Figure.
       Then in Description click the radio button Free Text and give your new name which is Sales Demand.
    This you have to do for all the PB in which this KF is used.
    2] Go to RSA1 : Admin Workbench
    Under Modeling section go to InfoObject.
    Select your KF. Double Click on it. Or right click and go to Change mode.
    Then change the Long and Short Description of the KF as desired.
    Save & Activate the KF.
    This will change your KF description for all the PB in which you have used the same PA.
    Hope this helps.
    Thanks,
    Pushkar

  • How can I show Foreign Key name in the Data model Table window

    Hi,
    In one of my table, I had a Foreign Key, but that is not indexed. I want to display the name with in the table second window in realtional data model. If it is indexed, then it is showing in third window. How I can show without indexing that column?
    Thanks.

    I want to show Foreign Key name in the second window.
    Thank you for considering my question,
    Sundar

  • Option to name foreign key?

    I've got an odd issue, or I could be overlooking the obvious. I've got foreign keys, & I've given them names; but in user objects, user_constraints, etc. the foreign key isn't listed by the name I've given it. For example:
    create table info (
    id number(10),
    constraint info_id_pk primary key (id)
    create table other (
    id number(10),
    constraint info_other_fk foreign key (id)
    references info(id)
    If I input this, in the output I get from user_objects or user_constraints it lists info_id_pk only. I get the impression info_other_fk (i.e., the foreign key constraint) is there, but is given a name by Oracle other than the one I indicated. Is this an oversight, or not an option, or am I identifying the intended name incorrectly? I imagine it ought not be an issue, or I've got to be overlooking the obvious on this..
    Noel Whelan

    Not sure what your problem is, man.
    Check it out, APC
    SQL> create table info (
      2  id number(10),
      3  constraint info_id_pk primary key (id)
      4  );
    Table created.
    SQL>
    SQL> create table other (
      2  id number(10),
      3  constraint info_other_fk foreign key (id)
      4  references info(id)
      5  );
    Table created.
    SQL>
    SQL> set pages 2000
    SQL> select * from user_constraints where table_name in ('INFO', 'OTHER')
      2  /
    OWNER                          CONSTRAINT_NAME                C
    TABLE_NAME
    SEARCH_CONDITION
    R_OWNER                        R_CONSTRAINT_NAME              DELETE_RU STATUS
    DEFERRABLE     DEFERRED  VALIDATED     GENERATED      BAD RELY LAST_CHAN
    TST2                           INFO_ID_PK                     P
    INFO
                                                                            ENABLED
    NOT DEFERRABLE IMMEDIATE VALIDATED     USER NAME               27-FEB-03
    TST2                           INFO_OTHER_FK                  R
    OTHER
    TST2                           INFO_ID_PK                     NO ACTION ENABLED
    NOT DEFERRABLE IMMEDIATE VALIDATED     USER NAME               27-FEB-03
    SQL>

  • 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

Maybe you are looking for

  • ICloud backups multiple devices

    Hi. I currently have a iPad 2, iPhone 4S and a iPhone 5 (work phone). I currently use 1 iTunes account but have noticed that my iCloud is getting full for backups. So my question. Should I create 3 separate accounts? Then can these be merged. 15gig!

  • Adjusting Down payments

    Hi All, I had created a down payment Request using F-47 and paid using F110. After that i had adjsuted the down payment against vendor invoice(created using fb60) using the tcode -F-53. This had created a request but when i try to pay the remaining a

  • Need Code For ZoomIn/ZoomOut Effect

    Dear Friends, I need a small help from you guys... I want to do a simple thing in Flash CS3, but some how i am unable to do it. Actually my requirement was....OnRollOver of a Button I want to slightly zoom it and OnRollOut i want to slightly zoom out

  • Dealing with HTML stored in database

    I am trying to fetch data from one data source into XML, apply a stylesheet, and then save the resultant HTML into another table (using Java). The source data has some HTML tags embedded in it (which I want to maintain as tags), but during the proces

  • Error in Workbook

    Hello, When i am refreshing my workbook instead of getting the variable selection screen i am getting the error message 'Error value 1 for user- exit TP_VERS1 is invalid ' and when i am opening the query designer this variable is not showing under an