logical foreign key

Hi all

I'm sorry to bring the similar question. .
I am able to create the logical foreign key for table logic with A new (A.2 = B.2) (2 is calculated logical column).
However there are still some physical join foreign key with the old constitution (A1 = B. 1). When I deploy this RPD, it generates sql with (A1 = B. 1) join condition.

Then, I removed this RPD physical foreign key join and received a warning "logical dimension B has a source which don't happen with any fact table" in the consistency check.

Always after the deployment of the Dre, I get the error message [nQSError: 14025] indeed no table exists at the level of detail requested: in the report.

I'm missing something. The logical foreign key has join condition correct that he is still not on the physical join of riding.

Thank you for going through this question,

http://Tinypic.com/r/2qiwmrr/6

Based on your comments, I am looking at the documentation:
I found a Note: a logical key to a fact table should consist of key columns that join the tables of attribute. Logical foreign key joins may be necessary if the Oracle's BI server should be used as an ODBC data source for some queries and third party reporting tools.

I need to see why ODBC, and unlike the foreign logic key join is not the substitution of the physical layer to join.

BTW: Since you want to go with a join defined using logical column, you can use the same expression in physical join using the expression builder?

It should work.

EX: T43770. Department_id = case when T43764. Department_id > 10 then T43764. Department_id 0 otherwise end

Published by: Srini VIEREN on 18 January 2013 16:52

Tags: Business Intelligence

Similar Questions

  • actually logical foreign keys

    Hello

    Can I define foreign keys in the logical fact table? I need to use '= count distinct aggregation rule' column of the foreign key in my reports.

    Thank you.

    Andy

    Hi Andy,.

    You can add foreign keys to your fact table as a measure column (aggregate distinct count).

    Do not use these foreign keys to create foreign key joins in the logic layer. Always use complex joins (http://obibb.wordpress.com/2010/08/06/joins-in-oracle-bi-ee/)

    Good luck

    Daan Bakboord
    http://obibb.WordPress.com

  • Foreign keys of a logical Table

    Hi all

    I want to know in what scenarios, we create the foreign key of a logical Table. Once we have create the foreign key for the logical table, this means he automatically substitute if joins are here.


    Physical table A, B (without physical joins)

    Logic table A, B (B (Sun)--> (Fact) A logical join)

    created the foreign key in the logical table A with b. (A.1 = B.1)

    The RPD will generate sql with A.1 = B.1 join condition for the reports.

    I tried to create the logical foreign key for table logical, I couldn't see any option from the table. Here is his
    http://Tinypic.com/r/jq1gkz/6


    Thank you

    Virat

    In general when we go to the complex joins in the physical layer, we opt for logical foreign key joins in layer MDB, best examples is SCD Type II.

    Physical table A, B (without physical joins)
    --> You must have a physical join so that it can be override by layer MDB

    created the foreign key in the logical table A with b. (A.1 = B.1) the RPD will generate sql with A.1 = B.1 join condition for the reports.
    --> Yes, you can see this join in the physical BI query.

    I tried to create the logical foreign key for table logical, I couldn't see any option from the table. Here is his
    --> 2 cases: 1) you must remove existing logical joins 2) you could not have involved physical layer.

    Hope this helps
    Let me know for questions

    Published by: Srini VIEREN on 18 January 2013 13:29

    BTW: You got a very good reputation, why don't update you your profile to see your name instead of a number

    Published by: Srini VIEREN on 18 January 2013 13:29

  • Can I remove Logical columns that I will not use in the layer of presentation as the id or foreign key columns?

    Hello

    Can I remove Logical columns at the level of the business layer that I'm not going to use the layer of presentation as the ID or foreign key columns? It will not affect the relations to the business layer?

    Kind regards

    Nestor

    Hi Nestor,.

    It won't unless they are used as keys, columns sort order, the ID column or the likes. But you can leave them in the MDB layer and expose just in the presentation layer - just in case you need it later. It is not use all the resources or generate overhead. More: Developer of the RPD should be used to work with loads of columns

  • Administration tool of BI - physical foreign key corresponding MDB logical join?

    Hello

    Can anyone explain why when you create a join (physical foreign key) in the physical layer for example

    Then view the corresponding logic join in the MDB layer it is the other way round? that is the "one" table in appears on the right and the "an array much ' on the left.

    It seems fair that logically, I would have expected the "one" table will appear on the left and the "table several" on the right as it does in the physical layer?

    Kind regards

    Tom Rowe

    Hello

    Thanks for your answer Yes, indeed the cardinality is the important thing here, and the query gives the expected results. However also personally find this confusion not to mention that I have since found it also seems to be incompatible, that is. some logical joins are shown round track that I know and others aren't, I redefine the joins that do not have the table 'a' appearing on the left and the "a table much" appearing on the left. This also has the advantage of showing all the table 1 in the form of tables table 2 as fact in the Manager of joint tables and dimension.

    Appears not to be a minor bug / irritation me may therefore raise a SR with Oracle.

    Kind regards

    Tom Rowe.

  • What should I do to have a foreign key that is displayed in the SEO of the entities on the LOGIC DIAGRAM

    What should I do to have a foreign key that is displayed in the SEO of the entities on the DIAGRAM LOGIC...

    I am trying to set options for this logical diagram will be displayed with the attributes of foreign keys referring to entities (target).

    I've implemented all show options (found on the forums of DM suggestions) for schema settings and all the attributes of entity entities.on level. But still no change, while in the entity of all major aattributes are seen.

    I use the version 4.0.2.840 Data Modeler (logical diagram).

    Thanks for the reply,

    Hello

    FK attributes do not appear in the Barker notation, then you have to change the rating.

    Philippe

  • Creating a relationship creates no foreign key attribute (s)

    Hello

    In my logical model, I have an entity supertype/subtype with 2 subtypes with no own attributes (each subtype has only 1: m relationship). When I create the relationship of 1:m of subtype to another entity (the entity-side m), there is no attribute generated FK. I found a trick to create the relationship first of Supertype in the other entity, and then reconnect it to the subtype. Then, the foreign key is generated (I see that in the dialogue relationship property > FK attributes).

    So I guess it's a bug.

    Robert

    Hi Robert,.

    Thanks for reporting the issue that is fixed in 4.1.2 code

    Philippe

  • Term plurals changes the name of the foreign key in the relational model

    Hello

    I use a glossary with plurals for entities such as Budget turned to the budgets of the table in the relational model. Unfortunately (for me) it also changes the name of the foreign key. In the related entity, an attribute (for example) is Budget_fiscal year, I expect in the relational model, being the same, but it is transformed into budgets_fiscal_year (budgets in the plural rather than keep him in singular form).

    How can I avoid any change in the attribute names (in the process of engineering in the relational model) but always turn the names of entities from the singular to the plural names for tables?

    Thank you and best regards

    Robert

    Hi Philippe

    Your suggestion 1) works - thank you! budgets_fiscal_year is the attribute of pk exercise in my budget of the entity. It seems a standard behavior of the Data Modeler to compose the UID of the relationship of budgets_fiscal_year (for some reason, this column is not taken the logical model, but the relational model). I would prefer that it be appointed budget_fiscal_year.

    I have not defined any parameter for this (intentionally). But maybe somewhere there by default. Could you tell me where the design parameters in Data Modeler to learn how to configure the definitions mentioned in 2)?

    As I'm always busy with the model of reverse engineering data, I'll wait for DM 4.1.1.888.

    Best regards

    Robert

  • Oracle cannot validate the composite foreign key when NULLs comes into play

    Hi all

    When a composite foreign key is used in a schema. Oracle does not check the necessary rules correctly, as indicated below.

    create the table parent_tab
    (
    x int,
    int y,
    z int,
    primary key for constraint p_key (x, y)
    );

    create the table child_tab
    (
    x int,
    int y,
    z int,
    Constraint f_key foreign key (x, y) refers to parent_tab (x, y)
    );

    insert into child_tab (x, y, z) values (1, NULL, 4);
    commit;

    Select count(x|| y) from parent_tab;

    0


    Select count(x|| y) from child_tab;

    1

    Tom Kyte says the following for an explanation.

    The database is unable to validate a foreign key when it is partially null. To assert the rule MATCH FULL for composite foreign keys, you add a constraint to your table:

    The constraint will ensure that either

    • All columns have NULL value in the foreign key, or
    • None of the columns are set to NULL in the foreign key

    As long as this constraint is in place, your foreign key will work as you probably think that it should.

    However, it does not explain WHY? I mean why Oracle is unable to validate the foreign key when it is partially NULL?

    Concerning

    John Spencer wrote:

    He thinks logically.  You have a composite PK of two columns, so 1, 1 is a valid key, as these are the 1, 2 and 1, 3 and 1.42.  In the child table, you have a line 1, the null value.

    What parent should have the child?

    I wish that it would be logical about this. Unfortunately, Oracle applies different rules in different cases. For example, parent of the value 1, NULL value and 1 child, NULL is not the same as NULL is equal or not equal to null. At the same time, one constraint unique index / unique Treaty, 1, NULL, equal to another 1, NULL NULL treatment as being equal to NULL and don't let several lines with 1, the NULL value.

    SY.

  • Foreign key, check force

    Hello

    This is the structure of two two table.

    Untitled.png

    DDL:

    CREATE TABLE TEST_PARENT
      (
        PARENT_KEY NUMBER (22),
        PARENT_ID NUMBER (22),
        PARENT_NAME VARCHAR2 (255 CHAR),
        EFFECTIVE_START_DATE DATE DEFAULT sysdate NOT NULL ,
        EFFECTIVE_END_DATE   DATE
      ) ;
    ALTER TABLE TEST_PARENT ADD CONSTRAINT PK_TEST_PARENT PRIMARY KEY ( PARENT_KEY ) ;
    
    
    CREATE TABLE TEST_CHANNEL
      (
    
    
        CHANNEL_KEY NUMBER (22),
        CHANNEL_ID NUMBER (22),
        CHANNEL_NAME VARCHAR2 (255 CHAR),
        EFFECTIVE_START_DATE DATE DEFAULT sysdate NOT NULL ,
        EFFECTIVE_END_DATE   DATE 
      ) ;
    ALTER TABLE TEST_CHANNEL ADD CONSTRAINT PK_TEST_CHANNEL PRIMARY KEY ( CHANNEL_KEY ) ;
    

    Logic:

    Parent_id is always fixed to a Parent. But a Parent can have different attributes (parent_name here). Where the attributes are changing it will end the bu previous records put a value to effective_end_date and it will create a new line. New line will have the PARENT_KEY new PARENT_NAME with new effective_start_date and null in effective_end_date.

    Same logic applies to the CHILD table as well.

    What is the best way to put a reference to the type of the foreign key in the CHILD table that in case, will ensure that a child cannot exist without a parent now. I can't take PARENT_KEY as a foreign key to the same parent can change the PARENT_KEY and a child must always point to the parent ASSET (EFFECTIVE_END_DATE as null) folder.

    Thanks in advance.

    I would enrich your datamodel by tables of the object/version as:

    CREATE TABLE TEST_PARENT_OT
    (
    NUMBER OF PARENT_KEY (22) NOT NULL
    ) ;

    ALTER TABLE TEST_PARENT_OT ADD CONSTRAINT PK_TEST_PARENT_OT PRIMARY KEY (PARENT_KEY);

    CREATE TABLE TEST_PARENT_VT
    (
    NUMBER OF PARENT_KEY (22) NOT NULL,
    NUMBER of VERSION_ID (22) not null,
    PARENT_NAME VARCHAR2 (255 CHAR),
    EFFECTIVE_START_DATE DATE default sysdate NOT NULL,
    DATE OF EFFECTIVE_END_DATE
    ) ;

    ALTER TABLE TEST_PARENT_VT ADD CONSTRAINT PK_TEST_PARENT_VT PRIMARY KEY (PARENT_KEY, VERSION_ID);
    ALTER TABLE TEST_PARENT_VT add CONSTRAINT FK_PARENT_VT_PARENT_OT foreign key (parent_key) refers to test_parent_ot (parent_key);

    CREATE TABLE TEST_CHANNEL_OT
    (
    NUMBER OF CHANNEL_KEY (22) NOT NULL
    ) ;

    ALTER TABLE TEST_CHANNEL_OT ADD CONSTRAINT PK_TEST_CHANNEL_OT PRIMARY KEY (CHANNEL_KEY);

    CREATE TABLE TEST_CHANNEL_VT
    (
    NUMBER OF CHANNEL_KEY (22) NOT NULL,
    NUMBER OF VERSION_ID (22) NOT NULL,
    PARENT_KEY NUMBER (22) NOT NULL,
    CHANNEL_NAME VARCHAR2 (255 CHAR),
    EFFECTIVE_START_DATE DATE default sysdate NOT NULL,
    DATE OF EFFECTIVE_END_DATE
    ) ;

    ALTER TABLE TEST_CHANNEL_VT ADD CONSTRAINT PK_TEST_CHANNEL_VT PRIMARY KEY (CHANNEL_KEY, VERSION_ID);
    ALTER TABLE TEST_CHANNEL_VT add CONSTRAINT FK_CHANNEL_VT_CHANNEL_OT FOREIGN KEY (channel_key) REFERENCES TEST_CHANNEL_OT (channel_key);
    ALTER TABLE TEST_CHANNEL_VT add CONSTRAINT FK_CHANNEL_VT_PARENT_OT FOREIGN KEY (PARENT_key) REFERENCES test_parent_ot (parrent_key);

    Using this you will not have to reallocate your child of the lines when a new version of parent is created and you will be able to have the independent channel versions of the parent versions (so no need to change all the children when the parents ends).

    the construction of views of parents and the channels which only show active lines.

    The problem you may have is to be sure to have for each point in time an active version and so I would not implement of an effective_end date, but inherit the effective end of the effective next to (which is a little more work but you will help gapelessness if necessary)

    HTH

  • name of the foreign key column

    I'm new to the SQL Developer Data Modeler, I try to use it so that I can recommend to peers.

    in the logic model, I created 2 entities:

    entity: order_headers

    attributes: header_id (primary key), order_number

    entity: order_lines

    attributes: line_id (primary key), item_code

    and then I create a relationship 1: n to order_headers to order_lines

    Now if I find out the attributes of order_lines, there are 3 attributes:

    line_id, item_code and header_id

    I do an "engineer of the relational model

    in the Relational_1, I see that my order_lines table has a field: order_headers_header_id

    How can I configure step 'Engineer to the relational model' to use 'header_id' instead of 'order_headers_header_id '?

    I use Oracle SQL Developer Data model version 4.0.1.836 build 836

    Hello

    You must change the name for "Foreign key column" model in the design properties dialog box - "settings > Naming Standard > models.

    It should be {column Ref} only to get required name.

    Philippe

  • Question: Is foreign key references to a different column in the same table

    Hello

    I'm not grasp this concept. Would you be able to provide the logic how and why you need to create a foreign key that references a column of the same table?

    For example, referencing the schema, SupervisorNo @ here is a FOREIGN KEY to the "EmpNo" column in the same table.

    EMPLOYEE (EmpNo, title, Fname, Lname, phone, Email, date of birth, sex, salary, HireDate, OutNo, SupervisorNo @)


    Why would you want to do this and how can it be used? If you are filling out the data in the table, and this constraint is enabled, you will not be able to load whatever it is because the "EmpNo" column will be empty.


    Any input you can provide me with this would be greatly appreciated. Thank you!



    His name

    Self-referential integrity constraints

    Lets say that we have the table emp with emp_no and mgr_no columns.

    Now all managers should also be an employee too. How can I check this when inserting data into this table? I applied auto integrity constraint. It would help me to make sure no handler (doesn't mean no mgr_no) must be registered if this Manager is not an employee of this organization. Which means, I won't be able to enter any mgr_no in the column until and unless that the same employee also is an employee (emp_no from the same table).

    Check the link as well below.

    Data integrity

    Thank you

    Ishan

  • foreign keys different files randomly

    Hello dear members,

    Here is my table

    MY_TABLE
    --------------------
    PRIMARY_KEY FOREIGN_KEY
    1A
    1 b
    3A
    4 B
    5 B
    6 B
    8 m
    8 C
    9 C
    10 D

    I want to fetch random files N where these records N foreign keys must be different.

    Example outouts:
    N = 2
    1
    4

    N = 3
    1
    7
    9


    I'm sure there is a quick and logical way to achieve this goal, but I couldn't find that either by myself or through google.
    Thanks for your replies.

    brkmhr wrote:
    Hello

    Are you sure that's the answer? Because I'm not!

    Stew of solution is really COOL, but your sentence unfortunately does not show satisfaction.

    If you want to try its solution with a slight change, you exactly what you need:

    with mydata AS
    (
       SELECT 1  pk, 'A' fk FROM DUAL UNION ALL
       SELECT 2  pk, 'A' fk FROM DUAL UNION ALL
       SELECT 3  pk, 'A' fk FROM DUAL UNION ALL
       SELECT 4  pk, 'B' fk FROM DUAL UNION ALL
       SELECT 5  pk, 'B' fk FROM DUAL UNION ALL
       SELECT 6  pk, 'B' fk FROM DUAL UNION ALL
       SELECT 7  pk, 'B' fk FROM DUAL UNION ALL
       SELECT 8  pk, 'C' fk FROM DUAL UNION ALL
       SELECT 9  pk, 'C' fk FROM DUAL UNION ALL
       SELECT 10 pk, 'D' fk FROM DUAL
    )
    SELECT pk
      FROM (  SELECT a.*
                   , ROW_NUMBER () OVER (PARTITION BY fk ORDER BY DBMS_RANDOM.random) rn
                FROM mydata a
            ORDER BY fk)
     WHERE rn = 1
       AND ROWNUM <= 3  -- this is your N
    ;
    

    Simply replace the number in the last line of the n you want.

    Next time try the solution before giving these answers.

    Kind regards.
    Al

  • How to make a primary foreign key?

    I'm working on my data model and I can't understand how a foreign key to be a primary foreign key... I'll make a primary foreign key for this specific table 2...
    I tried to do the foreign key checked as the primary_UID... but this isn't the solution... I want to show in the relational model indicated as "PF" or the primary foreign key

    Anyone know? Thanks in advance

    Hi Delos,

    What version of SQL Developer Data Modeler do you use?
    For me, it works in 3.1.1.703 and 3.1.2.704.
    Can you provide more details.
    For the logic model you can use the Unique identifier dialog box and add links to the list of used objects.

    Philippe

  • Renaming of the foreign keys in the relational model

    Hello


    I'm new to the Data Modeler, we use v 3.0.0.66.5 and Oracle 11 g, and I am trying to build a logic and a relational model for a new application.

    We always call our primary keys as the ID, this causes me a problem with my names of foreign keys in the relational model, as they show as ID #. Is it possible to add the abbreviated of the table of the foreign key?

    Thanks in advance

    Sue

    Yes it is.

    Take a look at the tools > preferences, select Data Modeler > naming Standard > model, you can specify the standard you want to use for your foreign key. You can apply this designation to existing models and all new created FK uses the same model. To apply the standard to existing templates, select the relational model in the browser, right-click to display the context menu and select the menu "apply Naming standards... ».

    Sue

Maybe you are looking for

  • Linux without removing Vista L300D - 11M

    I heard there is a way to install Linux but in addition to Vista without remove the latter and lose all the data on the hard drive.Could someone explain this or give a link to a good guide please? And what Linux distribution can be recommended to ins

  • regarding the password in Access Manager

    I forgot my password for my user account control how to recover

  • Pavilion dv6-6170ee... I can't find the drivers and support... Please help me

    I bought yesterday pavilion hp DV6-6170ee, but I can't find the drivers on the internet no support for drivers and updates there aren't just for the dv6-6170 us & dv6 - 6170esthe name of my model is dv6-6170eeHelp me please

  • Access to the files on the system volume

    How can I access the system on my external hard drive volume information.  I tried everything, but it says "access denied." I tried to delete some restore points but it says access denied.  I think that there is a virus hidden in the files, because I

  • Create Image hard drive dead

    Okay, so dying was a bit hyperbolic.  2 problems: I found some bad sectors on my hard drive that the check disk window does not reach the difficulty (even after the execution of SEVERAL times).  Any ideas on alternatives to the disk of the window che