Engineering adds columns for relationship

I absolutely cannot understand the logic of the advanced engineering process.

Why it adds ADDITIONAL PK columns in my tables with a relationship?

For example, two tables: CLASS (class_id, name) and TYPE (type_id, class_id) with the 1-N relationship (class.class_id - type.class_id).

After engineering model logical relationship, in a last I can see new columns:

Class.class_id1, type.class_class_id1

How to avoid it? I want to use my own columns for relationship!

Hello

you have not a primary key for the entity in the logic model CLASS - that's fine. However, you have a PK existing in the table of CLASS in order to have the foreign key of the table TYPE of the table CLASS in the relational model.

So new surrogate key column is created - model default naming is {abbr table} _ID and since you have abbreviation table he takes the name of the table and creates the CLASS_ID column and it becomes CLASS_ID1 because you already have a column CLASS_ID.

For the creation of TYPE table - column foreign key referring to the assignment of default namespace model column - CLASS_ID1 is {table Ref} _ {Ref column} - this is how the name of the column has the value CLASS_CLASS_ID1.

If you don't want to create primary identifiers in the logic model, then you should not add attributes PK and FK in related entities - PK/FK columns will be automatically created during the engineering to the relational model - you will need to define related templates.

Otherwise, you can create identifier PK and related attributes added to FK attributes and it will continue automatically.

Philippe

Tags: Database

Similar Questions

  • Is it possible to add columns to explore details view customization

    Under XP it is possible to add columns for Windows Explorer details columns that are not the default choice?  I want to add a column "written by" and "reviewed by" and preferably have the name of the preparer (or reviewers) or initials and a date stamp

    Hello

    I suggest you to post your query in development issues General Windows Desktop for better eon helps the concern: http://social.msdn.microsoft.com/Forums/en-US/windowsgeneraldevelopmentissues/threads

  • Add aliases for columns

    Select
    (select where sum (w.inv_val) rm_xos w w.exp_cat_id = '1') as "exports of money."
    , (select where sum (w.inv_val) rm_xos w w.exp_cat_id = '2') as 'export on the basis of the Bill of lading.
    , (select sum (w.inv_val) in rm_xos w where w.exp_cat_id = '3') as 'balance balances. "
    ,
    , (select where sum (w.inv_val) rm_xos w w.exp_cat_id = '4') as "exports on the basis of payment beats".
    of rm_xos w

    I need the sum of the first three columns, as the fourth column, can I add aliases for columns?

    Having to do a full table for each column scan is extremely inefficient (as making purchases by buying a single point a time :()
    scanning table (I hope) only once

    select sum(case when w.exp_cat_id = '1' then w.inv_val end) as "Cash Exports",
           sum(case when w.exp_cat_id = '2' then w.inv_val end) as "Export on Consignment basis",
           sum(case when w.exp_cat_id = '3' then w.inv_val end) as "Undrawn balances",
           sum(case when w.exp_cat_id = '4' then w.inv_val end) as "Exports on def. payment basis",
           sum(case when w.exp_cat_id in ('1','2','3','4') then w.inv_val end) as "Sum of the four"
      from rm_xos w
    

    Concerning

    Etbin

    Edited by: Etbin the 26.8.2011 14:35
    You may also rotate

    select exp_cat_id,sum(inv_val) the_sum
      from rm_xos
     where exp_cat_id in ('1','2','3','4')
     group by rollup(exp_cat_id)
    

    Edited by: Etbin the 26.8.2011 14:41
    Note on efficiency

  • AdvancedDataGrid - add columns with ActionScript

    I am trying to add columns in an AdvancedDataGrid via ActionScript.

    I can't make it work.

    I tried two approaches - with an intermediary table to store the columns then set the adg in table columns; One where I assign columns directly to the table of columns of the adg.

    They are likely to fail in their own way.  The columns don't "take" and the adg uses the default values for dataProviders, or there are no columns at all.

    "adg_test.mxml" has the code AdvancedDataGrids. 

    'adg_test_renderer.mxml' is a rendering engine for one of the columns.

    Would appreciate learning what I'm doing wrong.

    Thanks for any help.

    = Adg_test_renderer.mxml START =.

    <? XML version = "1.0" encoding = "utf-8"? >
    " < = xmlns:mx mx:VBox ' http://www.Adobe.com/2006/MXML ">
    < mx:Button id = "btnTest" label = "Working Renderer" / >
    < / mx:VBox >

    = Adg_test_renderer.mxml END =.

    == Adg_test.mxml START =.

    <? XML version = "1.0"? >
    < mx:Application
    ' xmlns:mx = ' http://www.Adobe.com/2006/MXML "
    Initialize = "init ()" >

    < mx:Script >
    <! [CDATA]
    Import mx.collections.ArrayCollection;

    [Bindable]
    private var dpADGExplicit:ArrayCollection = new ArrayCollection([)
    {Artist: 'Pavement', Album: 'Slanted and enchanted', price: 11.99},.
    {Artist: 'Pavement', Album: 'Brighten the corners', price: 11.99},.
    {Artist: 'Saner', Album: 'A child once', price: 11.99},.
    {Artist: 'Saner', Album: 'Helium wings', price: 12.99},.
    {Artist: 'The doors', Album: 'The doors', price: 10.99},.
    {Artist: 'The doors', Album: "Morrison hotel", price: 12.99},.
    {Artist: 'Grateful Dead', Album: 'American Beauty', price: 11.99},.
    {Artist: 'Grateful Dead', Album: 'In the Dark', price: 11.99},.
    {Artist: 'Grateful Dead', Album: 'Shakedown Street', price: 11.99},.
    {Artist: 'The doors', Album: 'Strange Days', price: 12.99},.
    {Artist: 'The doors', Album: 'The best of the doors', price: 10.99}
    ]);

    [Bindable]
    private var dpADGActionScript:ArrayCollection = new ArrayCollection([)
    {Artist: 'Pavement', Album: 'Slanted and enchanted', price: 11.99},.
    {Artist: 'Pavement', Album: 'Brighten the corners', price: 11.99},.
    {Artist: 'Saner', Album: 'A child once', price: 11.99},.
    {Artist: 'Saner', Album: 'Helium wings', price: 12.99},.
    {Artist: 'The doors', Album: 'The doors', price: 10.99},.
    {Artist: 'The doors', Album: "Morrison hotel", price: 12.99},.
    {Artist: 'Grateful Dead', Album: 'American Beauty', price: 11.99},.
    {Artist: 'Grateful Dead', Album: 'In the Dark', price: 11.99},.
    {Artist: 'Grateful Dead', Album: 'Shakedown Street', price: 11.99},.
    {Artist: 'The doors', Album: 'Strange Days', price: 12.99},.
    {Artist: 'The doors', Album: 'The best of the doors', price: 10.99}
    ]);

    private function init (): void
    {
    var arr:Array = []; table of //Intermediary which became the AdvancedDataGridColumn table
    var col: AdvancedDataGridColumn = new AdvancedDataGridColumn();

    col.dataField = "artist";
    arr.push (col);

    col.dataField = 'Album ';
    Col.Visible = false;
    arr.push (col);

    col.dataField = "Price";
    col.itemRenderer = new ClassFactory (adg_test_renderer);
    arr.push (col);

    adgActionScript.columns = arr;

    UNSUCCESSFUL ALTERNATIVE APPROACH

    /*
    col.dataField = "artist";
    adgActionScript.columns.push (col);

    col.dataField = 'Album ';
    Col.Visible = false;
    adgActionScript.columns.push (col);

    col.dataField = "Price";
    col.itemRenderer = new ClassFactory (adg_test_renderer);
    adgActionScript.columns.push (col);
    */
    }

    []] >
    < / mx:Script >

    < mx:Label text = "Explicit columns" / >

    < mx:AdvancedDataGrid
    ID = "adgExplicit".
    Width = "100%" height = "100%".
    sortExpertMode = "true".
    dataProvider = "{dpADGExplicit}" >
    < mx:columns >
    < mx:AdvancedDataGridColumn dataField = "Artist" / >
    < mx:AdvancedDataGridColumn dataField = "Album" visible = "false" / >
    < mx:AdvancedDataGridColumn dataField = "Price" itemRenderer = "adg_test_renderer" / >
    < / mx:columns >
    < / mx:AdvancedDataGrid >

    < mx:Label text = "columns ActionScript (ActionScript so works: Arist column should be hidden.)" Should see Album with data columns and price with the buttons. / >

    < mx:AdvancedDataGrid
    ID = "adgActionScript".
    Width = "100%" height = "100%".
    sortExpertMode = "true".
    dataProvider = "{dpADGActionScript}" >
    < / mx:AdvancedDataGrid >

    < / mx:Application >

    == Adg_test.mxml END =.

    If you are looking to add columns with ActionScript, follow this.

    var _advancedDataGrid: AdvancedDataGrid = new AdvancedDataGrid();

    var columns: Array = _advancedDataGrid.columns;

    Columns.push (new AdvancedDataGridColumn ('field1'));

    Columns.push (new AdvancedDataGridColumn ('field2'));

    Columns.push (new AdvancedDataGridColumn ('field3'));

    _advancedDataGrid.columns = columns;

    _advancedDataGrid.validateNow ();

  • How to make the new messages show up on Windows mail? columns for messages sent and deleted without long appears. How to make a comeback?

    Original title: Messages a suddenly begin to appear new downstairs; How can I make them appear at the top?  In addition, the columns for messages sent and deleted no long appears.  How to make a comeback?

    It's the Windows Mail 06 comes with Vista.

    Hello

    Step 1:

    Follow these steps and check if that helps.

    (a) open Windows Mail.

    (b) click on view

    (c) select sort by , click on to.

    Do you view recent messages on top.

    Step 2:

    (a) in Windows Mail.

    (b) click on view

    (c) select Layout.

    (d) under the basic click toolbar. (To display the toolbar if it disappears).

    (e) click on customize the toolbar and add Send/recv current toolbar features.

    See also:

    http://Windows.Microsoft.com/en-us/Windows-Vista/troubleshoot-problems-with-Windows-Mail

    Hope this helps,

  • ALTER TABLE hf_altertest ADD COLUMN does not

    I am using ORACLE 11g and my FDI is Developer SQL 4.1.1

    It's all free PC version that has limits.

    I tried on:

    CREATE TABLE hf_altertest

    (

    contact_id INTEGER NOT NULL

    , name VARCHAR (25)

    , last_name VARCHAR (35)

    PRIMARY KEY (contact_id)

    );

    ALTER TABLE hf_altertest State to add a CHAR (2) COLUMN;

    But when I go to run the ALTER TABLE statement then I get following error:

    rror starting at line: 1 323 in command.

    ALTER TABLE hf_altertest State to add a CHAR (2) COLUMN

    Error report-

    SQL error: ORA-00904: invalid identifier

    00904, 00000 - '% s: invalid identifier '.

    * Cause:

    * Action:

    I can run the same code in MySQL without error.

    This leads me to think that maybe I'm just bumping into a limit in the free version of PC.

    Any thoughts?

    3003916 wrote:

    I am using ORACLE 11g and my FDI is Developer SQL 4.1.1

    It's all free PC version that has limits.

    ALTER TABLE hf_altertest State to add a CHAR (2) COLUMN;

    But when I go to run the ALTER TABLE statement then I get following error:

    rror starting at line: 1 323 in command.

    ALTER TABLE hf_altertest State to add a CHAR (2) COLUMN

    Error report-

    SQL error: ORA-00904: invalid identifier

    00904, 00000 - '% s: invalid identifier '.

    * Cause:

    * Action:

    I can run the same code in MySQL without error.

    This leads me to think that maybe I'm just bumping into a limit in the free version of PC.

    Any thoughts?

    There is no LIMIT to the 'free' version  If you read the error message he said THAT was not a valid identifier.  Just to show you that I tried your erroneous statement

    ALTER TABLE hf_altertest ADD COLUMN state2 CHAR(2);
    

    and here is the indicator error message in SQL +.

    SQL * more: Production of liberation 12.1.0.2.0 Tue Oct 15 14:34:57 2015

    Copyright (c) 1982, 2014, Oracle.  All rights reserved.

    Connected to:

    Oracle Database 11 g Enterprise Edition Release 11.2.0.4.0 - 64 bit Production

    With the partitioning, Real Application Clusters, Automatic Storage Management, OLAP

    and Data Mining options

    Add a COLUMN state2 TANK (2)

    *

    ERROR on line 2:

    ORA-00904: invalid identifier

    As you can see (and as the previous poster of response indicates), the 'COLUMN' KEYWORD is not necessary when adding new columns.  Only when 'RENAME' is used, then you add the keyword COLUMN.

    See the documentation for the syntax of ALTER TABLE here--> http://docs.oracle.com/database/121/SQLRF/statements_3001.htm#SQLRF01001

    See specific clause RENAME syntax here--> http://docs.oracle.com/database/121/SQLRF/statements_3001.htm#i2183480

  • Add column according to date

    Hello

    I want to add column as from Time_period conditon below

    If the review date is between the date of yesterday for a week, then it should display as "week1.

    If the review date is 2nd week, then it should display as "semaine2" and so on.

    I tried, but do not get the correct result.

    Can someone help me.

    Thank you

    with abc as

    (select 101 as id, to_date('21-JUL-2015','DD-MON-YYYY') as double union review

    Select 102, double union to_date('17-JUL-2015','DD-MON-YYYY')

    Select 103, to_date('13-JUL-2015','DD-MON-YYYY') of double union

    Select 104, to_date('12-JUL-2015','DD-MON-YYYY') of double union

    Select 105, double union to_date('01-JUL-2015','DD-MON-YYYY')

    Select 106, to_date('01-JUN-2015','DD-MON-YYYY') of double union

    Select 107, to_date('29-JUN-2015','DD-MON-YYYY') of double union

    Select 108, to_date('07-JUL-2015','DD-MON-YYYY') of double union

    Select 108, double to_date('03-JUL-2015','DD-MON-YYYY')

    )

    SELECT id,

    -case when trunc (review) between trunc (sysdate)-1 and trunc (sysdate)-7 then "week1.

    When trunc (review) between trunc (sysdate)-8 and trunc (sysdate)-15 then 'semaine2 '.

    When trunc (review) between trunc (sysdate)-16 and trunc (sysdate)-23 then "week3.

    Another 'other '.

    end as Time_period

    ABC

    Hello

    You must provide the lower date first in your between the declaration

    -case when trunc (review) between trunc (sysdate)-7 and trunc (sysdate)-1 then "week1.

    When trunc (review) between trunc (sysdate)-15 and trunc (sysdate)-8 then 'semaine2 '.

    When trunc (review) between trunc (sysdate)-23 and trunc (sysdate)-16 then 'week3.

    Concerning

    Marcus

  • How to use the transformation script to add columns to the PK?

    I'm working on a script transformation that:
    -create a table
    -Adds the columns to the table
    -create a primary key for the table

    See the below script.
    Now, I want to add the primary key column.
    Documentation fix r: class IndexColumnUsage

    The Index of the class has a getter: getIndexColumnUsageList()
    and the list apply: applyIndexColumnUsageList

    Someone at - it an idea how to use these methods to add the column to the PK?

    I thank in advance.


    relational = model.getDesign () .getFirstOpenRelationalDesign ();
    table = relational.getTableSet () .createTable (null);
    table.setName ("TABLE");
    column = table.createColumn (null);
    column.setName ("COLUMN");
    index = table.createIndex (null);
    index.setName ("PK");
    index.setIndexState ("primary obligation");

    Hello

    If you have the column and index (both belonging to the same table) use:

    the index. Add (Column);

    to remove the column:

    the index. Remove (Column)

    Philippe

  • Total of column for attribute BigDecimal - precision adjustment

    Hello

    I'm the total column in the column for an attribute BigDecimal foot. In the foot of the column, I see the value as 10356345.15000000037252902984619140625.

    How can I do this to show as 10356345.15?

    JDev - 11.1.2.3

    The attribute that allows you to calculate the total has a suspicion ui tab where you can specify a format, or add you the module format directly on the attribute in the page.

    Timo

  • Add columns

    Hi all

    11g.2 Oracle under OL 5.6

    I must add column in my paintings like the below:
    desc x ;
    id 
    name 
    sal 
    
    i want to add column comm 
    
    desc x;
    id 
    comm
    name
    sal
    in fact we have tables that hold the CDRs, but today I found the CDRs not uploaded in the database because of the team IN to increase the columns in the table
    We have a 40 column but it became 41 and the added column life team in position 32.
    so I need to know how to do to add the column in the middle of my table without re-creating the table again (contain data).


    Thank you

    I don't think there is any direct sql command to do so. But you can do something for this. This link will help you:

    http://www.orafaq.com/FAQ/how_does_one_add_a_column_to_the_middle_of_a_table

  • How to create an additional column for the description of the virtual computer object?

    Hi all

    I would like to know if it is possible to add a column more in the description of VMware vsphere, for the moment we have column / field called 'Notes' in which we can add our comments on a particular virtual machine / items.

    I wanted to add a column called the backup status, is it possible to add it to the database of the VM? which can be edited client VSphere.

    Any ideas would be greatly appreciated.

    Thank you

    AWT

    You can add fields for virtual machines.

    Click on a virtual machine.

    Then, go to the menu Manager

    Choose custom attributes.

    André

  • Looking for an add-on for FF button that launches TB (or any application). The add-on GetMailPlus I used is now broken

    There are several add-ons for FF to launch specific applications. A generic "Push the button, launch any application" would be more useful. Surely, this already exists?

    Hi, take a look at the buttons of toolbar - if it is not what you want, you can create one!

    If your question is resolved by this or another answer, please take a minute to let us know. Thank you.

  • Cannot install add-ons for Firefox for Android

    I have some add-ons installed. However, lately, when I try to install an add-on for Firefox for Android, I get an error message indicating that I have to install Firefox first.

    Only, I use Firefox on my Samsung Galaxy S5 and would like to install more modules. Is there a setting that might make it appear the error message?

    Any suggestions would be greatly appreciated.

    Thank you
    Michael

    Looks like you may have tried to install desktop Firefox extensions in Firefox Android.

    allplayer

    You can change the section at the top where it says other Applications.

  • Add-on for Print Edit does not work

    I just got my iMac cleaned for adware and now my add-on for print edit does not work. There is an error 2 - XPF to the catalog. I don't know the email address of support for developers?

    Hello

    Did you mean this extension:

    The contact details are on the right side of the page, next to the section 'on this add-on.

  • Is there a 'OK Google' add-on for Firefox or a "Firefox OK"

    Since I use a smartphone I have the habit to use Google OK and find that talking about a long query in browser results in more relevant results. I thought I have it add to Firefox to make navigation easier. I can't find an add-on for this and wonder if it is compatible with Firefox. If not, is there a Firefox OK/Hello/loan that will allow me to talk instead of type in the browser.

    Hi Figgerty,
    If Firefox is now the only api voice added to Gecko, so all Mozilla products can use the api. However, if you type in the url bar of Firefox for android, the keyboard will be the speech google ok text option.
    With respect to the office, it is still working on https://bugzilla.mozilla.org/show_bug.cgi?id=1003439

Maybe you are looking for