• Gopal Rathore (6/25/2010)


    Which is better to have either Numeric Candidate Key or Composite Key in the dependent table to make joins faster to execute say for example I have FormulaId field as primaryKey in Master table and FormulaId and RowId as Composite Key in Dependent table so this will be a better solution or I can put a Numeric Candidatekey in Primary and Dependent tables to allow joins faster?

    When you say "candidate key" you are meaning "surrogate key", aren't you?

    My preference is to use "natural keys" whenever possible. This preference accepts a few exceptions like certain cases of dimensional modeling for an Oracle based Data Warehouse environment.

    _____________________________________
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at Amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.