Primary Key & Logical Key in Hierarchy

Am a bit confused with the primary key in Dimensions.....
1. Can anyone explain the use of Primary key and the criteria to define the primary key for a level if the level has more than one level keys....
2. If a level has more than 2 logical keys and both of them are used for drilldown (use for drilldown checked) then what will happen.... lets say we have 2 keys key1 & key2 then which key is used for drilldown in answers.....

1. Can anyone explain the use of Primary key and the criteria to define the primary key for a level if the level has more than one level keys....The level key defines the unique elements in each logical level. The dimension table logical key has to be associated with the lowest level of a dimension and has to be the level key for that level.A logical level can have multiple level keys. When that is the case, specify the key that is the primary key of that level.
2. If a level has more than 2 logical keys and both of them are used for drilldown (use for drilldown checked) then what will happen.... lets say we have 2 keys key1 & key2 then which key is used for drilldown in answers.....With "use for drilldown" checked for 2 logical keys , when you drill form the parent level both the keys will be displayed in the report.
Rgds,
Dpka

Similar Messages

  • How to determine the logical Keys of logical fact table in BMM layer?

    Hello guys
    I'd like to know more about how to know what columns of the logical fact table should be used as key in BMM layer. How OBIEE behaving differently when different keys are selected?
    In my situation, I have 1 fact table that physically joins to 20 dimensions in physical layer. Therefore, in physical layer, this fact table has about 20 foreign keys but no primary keys..
    In the logical layer, this fact table is logically joined to the same group of dimension tables. So in this case, how do I know what columns in logical fact table I should use as keys?
    Please advice
    Thanks

    thanks for the reply...
    The interesting thing I notice is that, when I start using fragmentation with the fact tables in its LTS, if not primary key is defined in the logical fact table, then I will be getting errors:
    [nQSError: 10058] A general error has occurred. [nQSError: 14023] None of the fact sources for columns are compatible with the detail filter []. (HY000)
    When I create the key by choosing random columns from the fact table as the logical key columns, this error goes way and the correct SQL is generated according to the frag..
    Because of such behavior, I'd really like to know how logical key really works in BMM layer.

  • What is the use of logical key in logical tabls in bmm

    hi
    can any one tell me why we have to create logical key for logical table in bmm
    Thanks
    sreedhar

    See the links below
    why we have to create logical key at  levels in Hierarchies
    Re: Business Model - Logical Primary key
    Regards,
    Sandeep
    Edited by: Sandeep Saini on 15-Sep-2010 05:17

  • Basic doubt about Primary Key/Foreign Key in Oracle Tables

    Hi,
    I have a doubt whether Primary Keys/Foreign Keys are allowed in Oracle. Some of the people I know are telling me that Oracle does not encourage having Primary Keys/Foreign keys in its database tables.
    However if I go to the ETRM and look for information about some of the Oracle Tables, I am informed that Primary Keys do exist. However I am being told that ETRM is not a reliable way of having correct information about table structure.
    It would be great if any one of you provides me with some insight in this. Any pointers to a document would be great.
    Thanks

    It is not that PK/FKs are disallowed in Oracle Apps (there are some on the standard Oracle Apps tables), but they are typically not used. I am not positive what the logic behind this is, but my guess is that it was party due to the earlier versions of Oracle Apps pre-dating declarative database referential integrity in Oracle DB and also on performance issues with the standard referential integrity with the earlier versions of declarative database referential integrity.
    As far as eTRM is concerned - I understood that the data is based on a design repository rather than a physical Oracle Apps DB. So all of the information in there is logically correct, but not necessarily enforced via the standard Oracle DB declarative referential integrity (rather by the application code or APIs).

  • Define logical Key on Logical Dimension Table

    It's recommended to define a logical key for any logical dimension table - in 10g there was a function on the right mouse button, as far as I remember - but in 11g there is no such functionality ? the foreign key can be added by "green plus" button, but not the primary key ?? you have to type in the name of the key, then you can choose the column and then you select as primary key ... funny.
    bug or undocumented feature?

    Hi Srini,
    Since my main logical fact table consists of two LTS and the dimension being created from this table will also have 2 LTS, the content level will be set to all levels on which the fact is joined.
    So I would like to create a logical dimension based out of my dimension and then assign the content level at the detail level.
    Please let me know if I am not clear.
    Thanks

  • Why we have to create logical key at  levels in Hierarchies

    hi
    i have one doubt that what is the use of logical key at levels in hierarchies directly we can create logical primary key and we can enable for drill down option
    what is the use of creating logical key at levels (what i known is that is for unique column in the logical level)
    i need small example for this
    apart from that why we have to create logical key in logical tables in bmm layer so what is the need of it
    Thanks
    Sreedhar

    hi Sreedhar,
    I suggest you to go through
    http://download.oracle.com/docs/cd/E12103_01/books/admintool/admintool_BusModSetup20.html#wp1005703
    will clarify your doubts :-)
    Thanks,
    Saichand.v

  • PRIMARY KEY-FOREIGN KEY 관계 찾기(MASTER TABLE CONSTRAINT 정보 찾는 SQL)

    제품 : ORACLE SERVER
    작성날짜 : 2003-06-19
    PRIMARY KEY-FOREIGN KEY 관계 찾기
    =================================
    PURPOSE
    이 자료는 MASTER TABLE CONSTRAINT 정보를 찾는 SQL이다.
    Explanation
    SCOTT의 EMP table의 Foreign Key와 부모 제약 조건을 찾으려면
    다음의 질의문을 사용하여 찾을 수 있다.
    SQL> alter table dept add constraint dept_pk primary key (deptno);
    Table altered.
    SQL> alter table emp add constraint emp_dept_fk foreign key(deptno)
    references dept(deptno);
    Table altered.
    SQL> select c.constraint_name as "foreign key",
    p.constraint_name as "referenced key",
    p.constraint_type,
    p.owner,
    p.table_name
    from dba_constraints c, dba_constraints p
    where c.owner = 'SCOTT'
    and c.table_name = 'EMP'
    and c.constraint_type = 'R'
    and c.r_owner = p.owner
    and c.r_constraint_name = p.constraint_name;
    foreign key referenced key C OWNER TABLE_NAME
    EMP_DEPT_FK DEPT_PK P SCOTT DEPT
    Example
    none
    Reference Documents
    <Note:1010844.6>

    I don't have intimate knowledge of SQL Server, but to me, your code seems reasonable. I guess there is some "fine point" (a bug?) to using self referenceing foreign keys in SQL Server. It doesn't seem plausible that the error originates with the driver, unless it's a very intelligent kind of driver.
    A "Gordian Knot" kind of solution to your problem is to ask whether you really need the foreign key constraint in the db schema. Is the table used by something other than your EJB? Anyway, putting logic responsible for the correct functioning of your EJB into the db schema is often a bad practice, as it makes the code harder to understand, maintain, port etc.

  • Sync logic key commands?

    hi.
    anyone know if its possible to sync logic key commands with more than one mac?
    the sharing prefs in logic dont work and i dont use mobileme anymore.
    thanks.

    benjamingordon wrote:
    the sharing prefs in logic dont work
    Hi
    Yes they do, but they can be a bit fiddly to get right.
    Step 1
    All Macs on the same Local Network?
    Step 2
    Preferences:Sharing
    On the 'Primary' Mac tick the "Key Commands" box in the Bonjour section. You might want to do this for all Macs on the network?
    On the "Slave" Macs, tick the box to look for Shared Data on the LAN (might want to do this for all Macs on the LAN?)
    Step 3
    On the 'Primary Mac', save the current Key Commands using the Options:Export function in the Key Commands window.
    Step 4
    Depending on your firewall preferences, you may need to restart Logic on the slave Macs (and you may get an alert about in-coming network/firewall messages... Accept).
    Step 5
    On the Slave Mac, open the key commands window; Options:Presets.... under Bonjour, you should see your "Primary' key commands listed.
    Alternatively, Save (Export) the KC's from one Mac, copy the file to the others, then open them using KC Window:Options:Presets.
    The KC files are saved in
    <User>:Library:Application Support:Logic:Key Commands
    CCT

  • Lack of Primary and Foreign Keys and Efficiency

    I am reverse engineering a Maximo database. I am shock that it does not have Primary or foreign keys define for 590 out of 620 tables.
    My question is does the lack of Primary and Foreign key relationships adversely impact the efficiency of an Oracle database? I think it does IBM techs do not think it does.
    Anyone has the answer?

    does the lack of Primary and Foreign key relationships adversely impact the efficiency of an Oracle database? Not necessarily. There are many large OLTP databases that do not define PKs and FKs.
    It is true that the presence of constraint defintions is used by the optimizer. However,
    what matters is how the application is written and how the optimizer handles it.
    Remember that Oracle Databases have been in production since before constraint definitions were introduced.
    Hemant K Chitale
    Edited by: Hemant K Chitale on Jun 9, 2010 10:05 AM

  • Logical Key for Degenerate Dimension

    Hi Gurus,
    Need some help on the degenerate dimensions in the BMM layer.
    I have one fact table with dimension attributes and I would like to move the attributes into separate logical table and treat it as dimension.
    Now my newly created dimension has the Fact LTS and I would like to assign a logical key to the newly created table and then create the logical dimension.
    Can anyone provide some inputs on we can assign the logical key to the column?
    Thanks

    Hi Srini,
    Since my main logical fact table consists of two LTS and the dimension being created from this table will also have 2 LTS, the content level will be set to all levels on which the fact is joined.
    So I would like to create a logical dimension based out of my dimension and then assign the content level at the detail level.
    Please let me know if I am not clear.
    Thanks

  • Ms sql - {"The referenced table must have a primary or candidate key. [ FK Name = ForeignKeyB_Details ]"}

    I have a txt file which has all the sqltext in it separated by semi colon .Then I try to run a query one by one like this-
                var conn = new SqlCeConnection(ConnectionString);
                conn.Open();
                var cmdArray = Regex.Split(sqlText, ";");
                var cmd = new SqlCeCommand(null, conn);
                foreach (var text in cmdArray)
                    cmd.CommandText = text;
                    if (!text.Equals(string.Empty))
                        cmd.ExecuteNonQuery();
                    else
                        break;
                conn.Close();
    I get the error {"The referenced table must have a primary or candidate key. [ FK Name = ForeignKeyB_Details  ]"}
    here is part of my txt file-
    CREATE TABLE A
           PrimaryId nvarchar(10) NOT NULL REFERENCES C(PrimaryId),
           UserId nvarchar(20) NOT NULL,
           FirstName nvarchar(30) NOT NULL,
           MiddleInitial nvarchar(1) NULL,
           LastName nvarchar(30) NOT NULL,
           MobileNumber nvarchar(20) NULL,
           PhoneNumber nvarchar(10) NOT NULL,
           PhoneExtension nvarchar(6) NULL,
           FaxNumber nvarchar(20) NULL,
           EmailAddress nvarchar(50) NOT NULL,
      CONSTRAINT PrimaryKeyA PRIMARY KEY(PrimaryId, UserId)
    CREATE TABLE B(
       MarketId int NOT NULL references E(MarketId),
       UserId nvarchar(20) NOT NULL,
       UserFirstName nvarchar(30) NOT NULL,
       UserMiddleInitial nvarchar(1) NOT NULL,
       UserLastName nvarchar(30) NOT NULL,
       PhoneNbr nvarchar(10) NOT NULL,
       Extension nvarchar(6) NOT NULL,
       FaxNbr nvarchar(20) NOT NULL,
       Email nvarchar(50) NOT NULL,
       ShortName nvarchar(10) NOT NULL,
    PublicIdFlag nvarchar(6) NOT NULL references D(publicId),
            CONSTRAINT PrimaryKeyB PRIMARY KEY( MarketId, UserId)
    ALTER TABLE B ADD CONSTRAINT ForeignKeyB_Details FOREIGN KEY(UserId, UserFirstName, UserMiddleInitial, UserLastName, PhoneNbr, Extension, FaxNbr, Email) REFERENCES A(UserId, FirstName, MiddleInitial, LastName, PhoneNumber, PhoneExtension, FaxNumber, EmailAddress);

    Hi,
    Foreign key columns are frequently used in join criteria when the data from related tables is combined in queries by matching the column or columns in the FOREIGN KEY constraint of one table with the primary or unique key column or columns in the other table.
    For more information about the foreign key constraint, please refer to this link:
    http://msdn.microsoft.com/en-us/library/ms175464.aspx
    Here is a similar thread for your reference:
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/5a71948b-dfb1-46a5-8688-ccab9317e959/error-message-the-referenced-table-must-have-a-primary-or-candidate-key-fk-name-fktblatblb-?forum=sqlce
    Thanks.
    Tracy Cai
    TechNet Community Support

  • Basic doubt about Primary Keys/Foreign Keys in Oracle Tables

    Hi,
    I have a doubt whether Primary Keys/Foreign Keys are allowed in Oracle or not. I have been informed that Oracle does not encourage having Primary Keys/Foreign keys in its database tables. Instead it urges users to have unique constraints on the requisite columns.
    However if I go to the ETRM and look for information about some of the Oracle Tables, I am informed that Primary Keys do exist. At the same time, I am being told that ETRM is not a reliable way of having correct information about table structure (at least the Primary Key information).
    It would be nice if any one of you provides me with some insight in this. Any pointers to a document would be welcome.
    Thanks

    FYI,
    There is seprate forum for Core Sql quieries
    PL/SQL
    Thanks

  • Can I create constraints "Primary key - Foreign key" on materialized views?

    Hello!
    Can I create constraints "Primary key - Foreign key" on materialized views like on tables?
    My purpose - is to make DB schema "COPY" with set of materialized views or tables, which take data from time to time from other tables situated.into another schema "ORIGINAL".
    Also - I want to use reporting tool, like Crystal Reports, to make nice reports from schema "COPY". To make nice reports, I need primary-foreign relationships between materialized views or tables in schema "COPY".
    Is it possible to use materialized views?
    Or I should use only tables to get such result?
    Thank you in advance.
    Edited by: kogotok1 on Dec 3, 2010 5:01 PM

    What happens when you try it? Or search the manuals.
    http://download.oracle.com/docs/cd/E11882_01/server.112/e17118/statements_6002.htm#i2105365
    http://download.oracle.com/docs/cd/E11882_01/server.112/e10706/repmview.htm#REPLN360

  • RGDIR already contains an entry with the same logical key

    Hi Gurus,
    We are getting the error"RGDIR already contains an entry with the same logical key" when we re-run the payroll in ECC 5.0
    Is this a Standard bug in the Payroll program or else configuration error .
    Found some note :776262 related to the same error in 4.0 to 4.7.But not for ECC 5.0.
    Let me know if there are any support packs available...
    Best Regards,
    Srikanth

    Hello Srikanth,
    Regarding your description, it seems there is an inconsistence in the payroll results.
    To analyze the exact problem in the cluster of this employee, You can run the report RPUDIR00.
    Additionally, you can make a test using the standard payroll schema, to see if you get the same error message.
    Kind regards,
    Graziela Dondoni

  • BAPI_OPPORTUNITY_CREATEMULTI : Logical Key in INPUT_FIELDS

    Hi All,
    I am trying to create oppurtunity using BAPI_OPPORTUNITY_CREATEMULTI . I need to populate the product details . I need to know what is this <b>Logical Key</b> in <b>INPUT_FIELDS</b> structure? What will be the value of Logical Key for Product? Can somebody help me on this.
    Thanks in Advance.

    Pratik,
    Thanks for your reply.
    Can you give me a sample code for both <b>PRODUCT</b> and <b>INPUT_FIELDS</b> parameters. I tried giving product guid but, it does not seem to work.

Maybe you are looking for