Saturday, October 23, 2021

Difference between SQL Primary Key and Candidate Key in Oracle

  • Primary Key:
    • A Primary Key is a column or a combination of columns that uniquely identify a record. Only one Candidate Key can be Primary Key.
  • Candidate Key: 
    • A Candidate Key can be any column or a combination of columns that can qualify as unique key in database. 
    • There can be multiple Candidate Keys in one table. 
    • Each Candidate Key can qualify as Primary Key.
One needs to be very careful in selecting the Primary Key as an incorrect selection can adversely impact the database architect and future normalization. For a Candidate Key to qualify as a Primary Key, it should be Non-NULL and Unique in any domain.

No comments:

Post a Comment

SupplierAddressImportTemplate.xlsm South Africa Suburb Field mapping in POZ_SUPPLIER_ADDRESSES_INT

Suburb mpping in Supplier Address Import Template will be mapped to Address Element Attribute2 (HZ_LOCATIONS. ADDR_ELEMENT_ATTRIBUTE2)