You must Sign In to post a response.
  • Category: Software

    Difference between primary and secondary key?

    Can anybody tell me the difference between primary key and secondary key in DBMS, at least 3 points?
  • #30462
    Hi Vijay,

    The difference between Primary Key and Secondary Key are stated below:-

    Primary Key
    1) Is used for Unique Identification of Rows
    2) We have only one Primary Key per table
    3) A Primary Key is one of the Candidate Keys or you can say one of the irreducible super key, depends on database designer which one he needs.

    Secondary Key
    1) Is used for Identification of Rows but not usually Unique
    2) We can have multiple Secondary Key per table
    3) Attribute used for Secondary key are not the ones used for Super Key i.e. Secondary Key is not even be one of the Super Key.

    Also if you require more information on DBMS Keys and there examples then please visit the below page
    http://www.indiastudychannel.com/resources/101302-DBMS-Keys.aspx

    Thanks,
    Arvind

  • #30463
    Hi Vijay,

    The difference between Primary Key and Secondary Key are stated below:-

    Primary Key
    1) Is used for Unique Identification of Rows
    2) We have only one Primary Key per table
    3) A Primary Key is one of the Candidate Keys or you can say one of the irreducible super key, depends on database designer which one he needs.

    Secondary Key
    1) Is used for Identification of Rows but not usually Unique
    2) We can have multiple Secondary Key per table
    3) Attribute used for Secondary key are not the ones used for Super Key i.e. Secondary Key is not even be one of the Super Key.

    Also if you require more information on DBMS Keys and there examples then please visit the below page
    http://www.indiastudychannel.com/resources/101302-DBMS-Keys.aspx

    Thanks,
    Arvind


Sign In to post your comments