Adding a foreign key based on composite key of other table

Hi All,
I have two tables one named 'products' (T1) and other 'codes' (T2). The product_code column in T1 needs to reference code_id values where code_type="STREET" from T2. T2 primary key is based on two columns 'code_id' and 'code_type'.
The issue is t1 table has only one of the column from T2. i.e; product_code (T1) corresponds to code_id (T2) and code_type should always have value "STREET"
I am not getting how to implement the foreign key constraint on T1 in such scenario. Hope my explanation is clear. Feel free to ask for more clarifications. Please suggest.
Thanks
Edited by: user5108636 on 26/09/2011 21:20

user5108636 wrote:
Hi All,
I have two tables one named 'products' (T1) and other 'codes' (T2). The product_code column in T1 needs to reference code_id values where code_type="STREET" from T2. T2 primary key is based on two columns 'code_id' and 'code_type'.
The issue is t1 table has only one of the column from T2. i.e; product_code (T1) corresponds to code_id (T2) and code_type should always have value "STREET"
I am not getting how to implement the foreign key constraint on T1 in such scenario. Hope my explanation is clear. Feel free to ask for more clarifications. Please suggest.post CREATE TABLE statement for PRODUCTS & CODES tables

Similar Messages

  • How to find the Org.key based on Job key and Org Unit.

    Hi,
      Please Let me know how to find the Org.Key based on the Job Key and org Unit.
    Regards
    nagendra.

    On recent ThinkPad, the Product ID Key sticker has been moved from the bottom of the unit to behind the battery.
    You need to contact Lenovo technical support directly to ask about recovery media.

  • Creating a calendar of events based upon selections made in other tables

    I have a Sheet that I've started working on the includes a variety of pop-up menus that reference look up tables on another sheet that contain names and prices of products. In conjunction with the drop down menus are a series of check boxes for the months in which one would want to receive the products. in each group of drop downs the order of what is selected can vary and be for example, a,b,c, or a,c,b, etc...
    I want to create a calendar looking portion of the sheet that would then express in what month each product was being received.
    I have used a LOOKUP function successfully for most of this but it seems to be erroring out in odd places. I've created a third table that looks at the first one I described, does a LOOKUP by product name and then if the product name is found it looks in the columns containing checkboxes for each month and returns either a true or false. Then on the calendar sheet - An IF statement is used to find if TRUE and then it uses text formatted as webdings to fill the box.
    I hope that explains things well enough. Any help in deciphering either why the LOOKup feature is working most places but not all or in providing a more elegant solution would be appreciated.
    Thank you,
    mmranta3777

    Your situation seems a little too complicated to provide concrete, meaningful suggestions without actually seeing what you are doing. A screen shot might be helpful, but your spreadsheet seems complicated enough that even that might not be sufficient. I can give a couple of general comments that maybe you can put to good use.
    (1) I cannot remember a time when I used LOOKUP(); almost always VLOOKUP() is what is needed (and rarely HLOOKUP() given the standard way data is typically stored in tables).
    (2) As formulas are filled down and across (especially complicated ones) it is easy to mess up the absolute cell referencing for the ranges that the lookup functions require.

  • HowTo: construct Composite key using other composite key?

    Hello. I don' undestand how is it possible to do.
    Please, see my code:
    @Entity
    @Table(name = "Person", schema = SCHEMA)
    public class Person {
         @Id
         @GeneratedValue
         @Column(name = "id")
         private int id;
         private String medialogyUid;
         private String firstName;
         private String lastName;
         private String patronymic;
         private String biography;
    @Entity
    @IdClass(Convocation.PK.class)
    @Table(name = "Convocation", schema = SCHEMA)
    public class Convocation {
         @Id
         private int number;
         @Id
         @ManyToOne(fetch=FetchType.EAGER, cascade={CascadeType.MERGE, CascadeType.REFRESH, CascadeType.PERSIST})
         private Institution institution;
         private Date beginDate;
         private Date endDate;
         public Convocation(){
         public Convocation(Institution inst, int number, Date beginDate, Date endDate){
              this.institution = inst;
              this.number = number;
              this.beginDate = beginDate;
              this.endDate = endDate;
         public static final class PK implements Serializable {
              public int number;
              public int institution;
              public PK(){
              /**@param number is convocation,number
               * @param institution is convocation.institution.id
              public PK(int number, int institution){
                   this.number = number;
                   this.institution = institution;
              @Override
              public boolean equals(Object o) {
                   if (!(o instanceof PK))
                        return false;
                   PK oPK = (PK)o;
                   return this.number == oPK.number && this.institution  == oPK.institution;
              @Override
              public int hashCode() {
                   return ((number == 0) ? 0 : new Integer(number).hashCode()) ^ ((institution == 0) ? 0 : new Integer(institution).hashCode());
    //And finally the last class:
    @Entity
    @IdClass(DeputyMandate.PK.class)
    @Table(name = "DeputyMandate", schema = SCHEMA)
    public class DeputyMandate {
         @Id
        @ManyToOne(fetch=FetchType.EAGER, cascade={CascadeType.MERGE, CascadeType.REFRESH, CascadeType.PERSIST})
         private Person person;
         @Id
         @ManyToOne(fetch=FetchType.EAGER, cascade={CascadeType.MERGE, CascadeType.REFRESH, CascadeType.PERSIST})
         private Convocation convocation;
         private Date dateIn;
         private Date dateOut;
         public static final class PK implements Serializable {
                   //don't know what to use @Embeddable or what?
        }I want DeputyMandate to use composite key. This composite key is based on Person with simple key +(int id)+ and Convocation PK.
    Please, tell me how can I make composite key DeputyMandate.PK using simple key from Person and composite key from Convocation.
    Edited by: Holod on 27.08.2008 15:52

    And
    CONSTRAINT FK_CONFIG_OPTION_ID FOREIGN KEY (CONFIG_ITEM_ID,CONFIG_OPTION_ID) REFERENCES PRODUCT_CONFIG_OPTION(CONFIG_ITEM_ID,CONFIG_OPTION_ID)
    ?

  • Composite key in Time dimension

    Hi All,
    I would like to know Time dimension with Composite key. I have a requirement where I want to store 2 Calendars in Time dimension table. for e.g :
    for one calendar Weekstarts from SUN-SAT and for another it is from MON-TUE
    DateKey   Type WeekStart   WeekEnd
    20140101   1       Sun               Sat      
    20140101   2       Mon               Tue
    ..................etc
    I have a measure group which is related to Time dimension (DateKey and Type used a Composite key). This implementation has no issues for additive measures but there are few issues with semi-additive measures (last non-empty,...).
    Will composite Key have any effect on semi-additive measures ?
    what if i use surrogate key instead of composite key.
    Please suggest if the approach has any issue with Time intelligence. Advise if there is any better approach for the same.
    Ram MSBI Developer

    Hey.. Thanks!
    I am clear about the concept about defining annotation based composite key. Also, I read in the documentation that I'll be needing to define as direct, aggregate or one-to-one. But, I am not able to define and run the same in the project mapping xml of toplink.
    It would be great if you can share some sample code for defining the same. For e.g. in my mentioned example, there is TestEntity POJO having 'id' as the attribute which gets populated with the testEntityCode of the TestEntityKey POJO. Please suggest the same for the same:
    <opm:primary-key>
    <opm:attribute-name>id</opm:attribute-name>
    <opm:field table="TEST_ENTITY_B" name="TEST_ENT_CODE" xsi:type="opm:column"/>
    </opm:primary-key>
    Thanks!

  • Adding a foreign key constraint..........

    Hi,
    I have a table (num of rows 60,00,000). I am adding a foreign key constraint
    through alter table option but it is taking very long time to complete...
    Any other methods to enhance the performance......

    Please read about [url http://download-uk.oracle.com/docs/cd/B10501_01/server.920/a96524/c22integ.htm#6719]Constraint States in the manual.

  • Is it possible to create foreign key from composite key in other table.

    SQL> desc PRODUCT_CONFIG_OPTION;
    Name Null? Type
    CONFIG_ITEM_ID NOT NULL VARCHAR2(20) --composite primary key
    CONFIG_OPTION_ID NOT NULL VARCHAR2(20) --composite primary key
    CONFIG_OPTION_NAME VARCHAR2(100)
    DESCRIPTION VARCHAR2(255)
    SEQUENCE_NUM NUMBER(18)
    LAST_UPDATED_STAMP TIMESTAMP(6)
    LAST_UPDATED_TX_STAMP TIMESTAMP(6)
    CREATED_STAMP TIMESTAMP(6)
    CREATED_TX_STAMP TIMESTAMP(6)
    SQL> DESC PRODUCT_CONFIG_ITEM;
    Name Null? Type
    CONFIG_ITEM_ID NOT NULL VARCHAR2(20)
    CONFIG_ITEM_TYPE_ID VARCHAR2(20)
    CONFIG_ITEM_NAME VARCHAR2(100)
    DESCRIPTION VARCHAR2(255)
    LONG_DESCRIPTION CLOB
    IMAGE_URL VARCHAR2(255)
    LAST_UPDATED_STAMP TIMESTAMP(6)
    LAST_UPDATED_TX_STAMP TIMESTAMP(6)
    CREATED_STAMP TIMESTAMP(6)
    CREATED_TX_STAMP TIMESTAMP(6)
    SQL> desc product;
    Name Null? Type
    PRODUCT_ID NOT NULL VARCHAR2(20)
    PRODUCT_TYPE_ID VARCHAR2(20)
    PRIMARY_PRODUCT_CATEGORY_ID VARCHAR2(20)
    MANUFACTURER_PARTY_ID VARCHAR2(20)
    FACILITY_ID VARCHAR2(20)
    INTRODUCTION_DATE TIMESTAMP(6)
    SUPPORT_DISCONTINUATION_DATE TIMESTAMP(6)
    SALES_DISCONTINUATION_DATE TIMESTAMP(6)
    SALES_DISC_WHEN_NOT_AVAIL CHAR(1)
    INTERNAL_NAME VARCHAR2(255)
    BRAND_NAME VARCHAR2(100)
    COMMENTS VARCHAR2(255)
    =========
    CREATE TABLE PROD_CONFIG_PROD_CONFIG_OPTION (
    PRODUCT_ID VARCHAR2(20),
    CONFIG_ITEM_ID VARCHAR2(20),
    CONFIG_OPTION_ID VARCHAR2(20),
    PAGE_NUM_TO NUMBER(18),
    ALTERNATE_PAGE_NUM_TO1 NUMBER(18),
    ALTERNATE_PAGE_NUM_TO2 NUMBER(18),
    ALTERNATE_PAGE_NUM_TO3 NUMBER(18),
    LAST_UPDATED_STAMP TIMESTAMP(6),
    LAST_UPDATED_TX_STAMP TIMESTAMP(6),
    CREATED_STAMP TIMESTAMP(6),
    CREATED_TX_STAMP TIMESTAMP(6),
    CONSTRAINT PK_PROD_CAT_CONFIG_MOD PRIMARY KEY (PRODUCT_ID),
    CONSTRAINT FK_PRODUCT_ID FOREIGN KEY (PRODUCT_ID) REFERENCES PRODUCT(PRODUCT_ID),
    CONSTRAINT FK_CONFIG_ITEM_ID FOREIGN KEY (CONFIG_ITEM_ID) REFERENCES PRODUCT_CONFIG_ITEM(CONFIG_ITEM_ID),
    CONSTRAINT FK_CONFIG_OPTION_ID FOREIGN KEY (CONFIG_OPTION_ID) REFERENCES PRODUCT_CONFIG_OPTION(CONFIG_OPTION_ID) )
    TABLESPACE DATA_SMALL
    i try to create this table if i omit 3rd foreign key constraint then table successfully created.but including trd foreign key constraint it return error "ORA-02270: no matching unique or primary key for this column-list"
    i checked everything is it possible to create foreign key from composite key in other table.

    And
    CONSTRAINT FK_CONFIG_OPTION_ID FOREIGN KEY (CONFIG_ITEM_ID,CONFIG_OPTION_ID) REFERENCES PRODUCT_CONFIG_OPTION(CONFIG_ITEM_ID,CONFIG_OPTION_ID)
    ?

  • Primary key based on multiple fields which are of a custom class type

    Hello!
    I have the following two classes.
    public class Application
    protected String appName;
    protected Set moduleOptions = new HashSet(); //Set<ModuleOption>
    public class Option
    protected String name;
    protected Application application;
    Now, I need for Option to have a composite primary key based on both its
    fields. How do I do this?
    For starters, I just need a few hints on how this should be done in Kodo
    because I already have this thing working in JPOX and that solution does
    not map directly to Kodo. JPOX defines the OptionPK (primary key class)
    to contain field ApplicationPK, and not Application. But Kodo does not
    accept this because of a mismatch between fields in class and its primary
    key class. (Not implying that Kodo should accept the same kind of
    solution.)
    Btw, I'm evaluating version 3.2.3.
    Thanks in advance!

    Viktor,
    The typical Kodo pattern for doing this is to create a private field in
    Option for each primary key in Application, map those fields as
    primary-key (but not the field of type Application), and therefore put
    those fields in the OptionPK. These fields should then be mapped to the
    same columns as the Application reference. Then, set the primary key
    fields to the same value as they are in the related object.
    Kodo allows multiple fields to be mapped to the same column in the
    database, and throws an exception if your actions would set the column
    to different values. So, typically, this might look like:
    public class Application
    protected String appName; // I'm assuming that this is the PK
    protected Set moduleOptions = new HashSet ();
    public class Option
    protected String name; // pk
    protected Application application; // not pk
    private String applicationAppName; // pk
    public Option (String n, Application a)
    name = n;
    application = a;
    applicationAppName = a.appName;
    -Patrick
    Viktor Matic wrote:
    Hello!
    I have the following two classes.
    public class Application
    protected String appName;
    protected Set moduleOptions = new HashSet(); //Set<ModuleOption>
    public class Option
    protected String name;
    protected Application application;
    Now, I need for Option to have a composite primary key based on both its
    fields. How do I do this?
    For starters, I just need a few hints on how this should be done in Kodo
    because I already have this thing working in JPOX and that solution does
    not map directly to Kodo. JPOX defines the OptionPK (primary key class)
    to contain field ApplicationPK, and not Application. But Kodo does not
    accept this because of a mismatch between fields in class and its primary
    key class. (Not implying that Kodo should accept the same kind of
    solution.)
    Btw, I'm evaluating version 3.2.3.
    Thanks in advance!

  • Problem with object view with primary-key based object identifier

    Hello!
    I met such problem.
    t1 is persinstent-capable class:
    class t1 : public PObject { .... };
    T1OV is object view, based on object table T1OT
    I1 is primary key of the table T1OT.
    Next code:
    t1* t = new (conn, "T1OV") t1(...);
    conn->commit();
    try
    t->markDelete();
    conn->commit(); // exception throws here
    Works fine if T1OV defined as:
    create view t1ov of t1 with object identifier default
    as select * from t1ot;
    And throws an exception
    "ORA-22883: object deletion failed"
    if:
    create view t1ov of t1 with object identifier (I1)
    as select * from t1ot;
    Such problem also occurs when object view is based on relational table/view (OID is primary-key based).
    Also it occurs when
    t->markModified() used insted of t->markDelete()
    I am using Oracle 9i second release for windows and
    MS VC++
    Thank You

    http://download-uk.oracle.com/docs/cd/B10501_01/server.920/a96540/statements_85a.htm#2065512
    You can specify constraints on views and object views. You define the constraint at the view level using the out_of_line_constraint clause. You define the constraint as part of column or attribute specification using the inline_constraint clause after the appropriate alias.
    Oracle does not enforce view constraints. However, operations on views are subject to the integrity constraints defined on the underlying base tables. This means that you can enforce constraints on views through constraints on base tables.
    Restrictions on View Constraints
    View constraints are a subset of table constraints and are subject to the following restrictions:
    You can specify only unique, primary key, and foreign key constraints on views. However, you can define the view using the WITH CHECK OPTION clause, which is equivalent to specifying a check constraint for the view.
    Because view constraints are not enforced directly, you cannot specify INITIALLY DEFERRED or DEFERRABLE.
    View constraints are supported only in DISABLE NOVALIDATE mode. You must specify the keywords DISABLE NOVALIDATE when you declare the view constraint, and you cannot specify any other mode.
    You cannot specify the using_index_clause, the exceptions_clause clause, or the ON DELETE clause of the references_clause.
    You cannot define view constraints on attributes of an object column.
    Rgds.

  • Composite Key in Toplink Mapping File - equivalent to Hibernate?

    Hi,
    I have a POJO TestEntity which refers to primary key TestEntityKey. In Hibernate mapping hbm file, we define the entry as:
              <composite-id name="id" class="TestEntityKey">
                   <key-property name ="testEntityCode" column = "TEST_ENT_CODE" type = "string" />
              </composite-id>
    Please confirm how to create the composite id in Toplink means kindly help that how to map my id to key:
    <opm:primary-key>
         <opm:attribute-name>id</opm:attribute-name>
    <opm:field table="TEST_ENTITY_B" name="TEST_ENT_CODE" xsi:type="opm:column"/>
    </opm:primary-key>
    Thanks!

    Hey.. Thanks!
    I am clear about the concept about defining annotation based composite key. Also, I read in the documentation that I'll be needing to define as direct, aggregate or one-to-one. But, I am not able to define and run the same in the project mapping xml of toplink.
    It would be great if you can share some sample code for defining the same. For e.g. in my mentioned example, there is TestEntity POJO having 'id' as the attribute which gets populated with the testEntityCode of the TestEntityKey POJO. Please suggest the same for the same:
    <opm:primary-key>
    <opm:attribute-name>id</opm:attribute-name>
    <opm:field table="TEST_ENTITY_B" name="TEST_ENT_CODE" xsi:type="opm:column"/>
    </opm:primary-key>
    Thanks!

  • Trouble with a composite key & unique violation

    Hi all
    as mentioned yesterday I'm a novice so apologies in advance for any lack of clarity in my question:
    I'm doing the standard student estate agent database and I have come across an issue with a composite key.
    the table in question follows:
    CREATE TABLE Offer
    buyer_id CHAR(5) not null references buyer (buyer_id),
    property_id CHAR(5) not null references property (property_id),
    primary key (BUYER_ID, PROPERTY_ID),
    offer_date DATE not null,
    offer_time NUMBER(4) not null,
    offer_amount NUMBER(10,2) not null
    and I have all the other tables in position with data loaded. However, when I try to load data into this table the buyer_id & property_id can be duplicated (it makes sense a buyer could make several offers on the same property).
    I'm not sure how to get around it. When I simply remove the primary key line the the next line offer_date.... is not recognized. I'm I missing something obvious? I am not allowed to changed the structure of the table. Do I need another identifier for the composite key?
    thanks Jo

    If you want to stick with natural primary keys, you would probably need to use the combination of (buyer_id, property_id, offer_date), assuming that the same buyer wouldn't make simultaneous offers on the same property. Given that this creates a rather unwieldy key for any child tables to reference, and given that the BUYER and PROPERTY tables appear to have synthetic foreign keys, you would probably want to add an OFFER_ID column to your table that is the primary key for the table and is populated via a sequence.
    Justin

  • How to apply Foreign Keys on top of a Common Lookup table

    I have an issue where i am mandated to enforce RI on an applications database (a good thing). but I have several common lookup tables where many of the "codes" reside for many different code types. I also have the mandate that i cannot change the
    underlying DDL to make composite keys to match the codes table PK. I am currently looking at creating indexed views on top of the Codes table to seperate the logical tables it contains. This is several hundred views. Although doable is there another solution
    I am not seeing? I have scoured the web in search of an answer knowing I cannot be the only SQL developer in this situation. I do know that I do not want to write several hundred triggers to enforce RI. Table schema below, the CdValue column is the column
    that is used throughout the hundreds of tables that use this codes table, and their corresponding column is not named the same.
    CREATE TABLE dbo.CodesTable (
    PartyGrpId INT  NOT NULL
      , CdTyp  VARCHAR ( 8 ) NOT NULL
      , CompId INT  NOT NULL
      , CdValue VARCHAR ( 8 ) NOT NULL
      , CdValueDesc VARCHAR ( 255 ) NULL
      , AltValueDesc VARCHAR ( 100 ) NULL
      , DefaultInd CHAR ( 1 ) NULL
      , OrderNum SMALLINT NULL
      , ActiveCd CHAR ( 1 ) NULL
      , ExpireDtm SMALLDATETIME NULL
      , EffectDtm SMALLDATETIME NULL
      , ModById INT  NULL
      , ModDtm SMALLDATETIME NULL
      , CreateById INT  NULL
      , CreateDtm SMALLDATETIME NULL
      , CONSTRAINT PC_dbo_EcdDetail
        PRIMARY KEY CLUSTERED ( PartyGrpId ASC, CdTyp ASC, CompId ASC, CdValue ASC )
        ON FG_Data
    ) ON FG_Data;
    I did though run into one forum where a person brought up a great idea. Filtered Foreign Keys, what a novel concept, if it could work it would make so much less code to fix an issue like this. :)
    ALTER TABLE dbo.BusinessStatus WITH NOCHECK
    ADD CONSTRAINT FK_dbo_BusinessStatus_CodesTable FOREIGN KEY (LoanStsDtCd) REFERENCES dbo.CodesTable (CdValue) WHERE CdTyp = 'Status'
    U.S. Army Airborne! The only way to fly

    >> I have several common lookup tables where many of the "codes" reside for many different code types. <<
    No! This is called “Automobiles, S quids and Lady Gaga” SQL and laugh at you or fire you or both. A table is a set; a set has one and only one kind of element it it. This is the basis of RDBMS and First Normal Form. 
    This is so bad it has a name; OTLT for “One True Lookup Table” ;I give an example of how stupid this in one of my books where a Dewey Decimal Classification for Churches is the same as the ICD code for deformed testicles. 
    There is no such crap as a “generic_type_code” in RDBMS. It either a “<something in particular>_type” or a “<something in particular>_code” in data modeling and the ISO-11179 standards.
    You have more NULL-able columns in one table than you should have in an entire schema! 
    You have audit data (creation and modification) in the row under audit. This is both stupid and illegal. You cannot expose the audit trail to the data user by law. When you delete a row, you also destroy the audit trail –Doh! 
    You have no CHECK() constraint on the (effective_date, expiry_date) pair. 
    Putting “_table” in a table name is a design error called a “tibble” to make fun of how silly it. You might want to download the PDF of bad SQL code smells from Red Gate so you can avoid things like this. 
    >>  the CdValue column is the column that is used throughout the hundreds of tables that use this codes table, and their corresponding column is not named the same. <<
    “_value” and “_code” are both what ISO-1179 calls an attribute property. It is a silly as a list of adjectives without a noun. 
    Each encoding is a separate table in a valid schema, each with its own validation and verification. You have to stop doing this. This is fundamental!! 
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

  • DATE Field in composite key

    Hi experts.
    I have a small query.
    Is there any performance impact of having a date field along with four other fields as part of a composite key.

    When you add an index, there is definitely some overhead to get the index synchronized with newly added/updated data (so whether you have indexed NUMBER, CHARs or DATEs does not matter - but I could be wrong in saying this).
    Concerning your SELECTs, if your existing queries were using this index then they may or may not use the new index (due to cardinality and other factors); so you need to test this first.

  • GR slip - Number of copies to vary based on Country key

    Hi,
    We are a multinational company and we have a requirement related to GR slips. The number of copies of GR slip printed should vary based on the country key, where the user is printing the GR slip....for e.g. if it is US then it should be 3 copies, Germany should be 5 and so on.
    So the same form has to be printed, only the number of copies varies....based on the country where it is printed.
    How to accomplish this. We are using Inventory Management Output determination, with Output type WE03. Please help.
    Thanks !

    Hi,
    See if country key can be added to the condition table and insert it in the access sequence.  Define exclusion check box by maintaining this access as the first in your access sequence.  When you maintain condition record for country as one of the parameters, make your number of copied in its communication data as you wish.  It should print based on country key, the number of copies...
    Regards

  • Primary Key in DW and indexes - composite key of all dimensional FKs?

    Hi guys,
    I have a DW and indexing question. Our metadata DW and physical DW are the same (star schema, no snowflakes). Should all dimensional FKs (such as TIME_KEY, ORG_KEY) be included as a part of a fact table's PK (a composite key becomes a combination of the TIME_KEY, ORG_KEY, etc.) in the database. Second question is, should we create just 1 composite index per fact table (resembling fact table's PK) or should we build several indexes (1 per dimension) ? Also, does it pay to build indexes on dimension tables?
    I'm mostly worried about fact table with a few hundred million records that has 7 dimensional-FK columns(only numeric codes), 1 value column, and several ETL-related date columns. I wonder what's the best course scenario be for that one.
    Thank you.

    You can use bitmap indexes on foreign keys to enable star transformations to be carried out. There are full details in the Datawarehouse documentation. Unfortunately I can't access it at the moment to show you where!
    As with anything you can check your performance using oracle trace events (10046) to ensure its performing as you want.
    http://www.dwoptimize.com/2007/06/101010-answer-to-life-universe-and.html
    Edited by: Matt T on Oct 22, 2008 4:50 PM

Maybe you are looking for

  • Performanc​e measuremen​ts

    Hello. I'm trying to verify the CMRR specifications for the NI PXI5922 Digitizer using the two channels in differential mode, but I don't reach the specification. The signal source is a PXI 5441 AVG.  The CMRR is measured by applying the same signals

  • Exporting Slideshows in Different Formats

    Ok everyone, I'm having a few problems. I just recently ugraded to iPhoto 5.0.4 and everything is fine and dandy, but I'm wondering if there's any way that I can export slideshows that I create in different formats. Let me explain my situation; I'm a

  • IPhone 5s - software update wipes contacts and needs passcode

    Hi there. at 02:30 this morning my phone was fine. At some point in the next hour all my contacts had dissapeared, and I'd not touched my phone. I noticed it was telling me there was an update to do so I set it away. When it finished it said it woudl

  • How to Add Active Directory user to Admin Role

    Hi All, I am trying to figure out how to add a AD user to the Admin Role.. I am connected to AD and can see the user (myself), however, when I try to add myself to the admin role, it says user not found. I go to Security Realms > myreals > Roles and

  • Get AdditionalText from PI

    Hi Gurus, I´m working with abap proxy and I need to get some text from de message that PI returns. Currently if there is an exception when calling abap proxy (CX_AI_SYSTEM_FAULT) program displays the exception text, however such text is too much gene