KEYSINDBMS
PRESENTED BY,
KANTA ANURAG SHAOO : -220301120178
Keys
Primary Key
Composite
Key
Super Key
Foreign Key
Candidate Key
Alternate Key
1
.
4
. 5
.
2
.
3
.
6
.
Primary key:-
II
 A primary key is the column or columns that contain values that uniquely identify each row in a table.
 The value of a primary key can’t be null.
 It should not allowed duplicate value
Candidate key:-
A candidate key is an attribute or set of attributes that can uniquely
identify a tuple(A tuple in DBMS is a collection of attribute values in which
no two unique items have the same name.).
Except for the primary key, the remaining attributes are considered a
candidate key.
 The candidate keys are as strong as the primary key
Alternate key:-
 It is a column or group of columns that uniquely identify every row in a table.
 A table can have multiple choices for a primary key but only one can be set as primary key
and rest are known as alternate key.
Composite key:-
 A composite key is a candidate key that consists of two or more attributes (table
columns) that together uniquely identify an entity occurrence (table row).
 Overall, composite keys are an important concept in database design and can be
used to ensure data integrity and create relationships between tables.
Super key:-
 In the context of databases, a super key is a set of one or more attributes or
columns in a table that can uniquely identify each row in that table.
 Unlike a primary key, a super key may not be minimal, meaning it may contain
additional attributes beyond those necessary to uniquely identify each row.
 It support null value.
Foreign key:-
 Foreign key are the column of an a table used to point to the primary
key.
 Foreign keys allow key values that are all NULL.
Thank you

key (1).pptx

  • 1.
  • 2.
    Keys Primary Key Composite Key Super Key ForeignKey Candidate Key Alternate Key 1 . 4 . 5 . 2 . 3 . 6 .
  • 3.
    Primary key:- II  Aprimary key is the column or columns that contain values that uniquely identify each row in a table.  The value of a primary key can’t be null.  It should not allowed duplicate value
  • 4.
    Candidate key:- A candidatekey is an attribute or set of attributes that can uniquely identify a tuple(A tuple in DBMS is a collection of attribute values in which no two unique items have the same name.). Except for the primary key, the remaining attributes are considered a candidate key.  The candidate keys are as strong as the primary key
  • 5.
    Alternate key:-  Itis a column or group of columns that uniquely identify every row in a table.  A table can have multiple choices for a primary key but only one can be set as primary key and rest are known as alternate key.
  • 6.
    Composite key:-  Acomposite key is a candidate key that consists of two or more attributes (table columns) that together uniquely identify an entity occurrence (table row).  Overall, composite keys are an important concept in database design and can be used to ensure data integrity and create relationships between tables.
  • 7.
    Super key:-  Inthe context of databases, a super key is a set of one or more attributes or columns in a table that can uniquely identify each row in that table.  Unlike a primary key, a super key may not be minimal, meaning it may contain additional attributes beyond those necessary to uniquely identify each row.  It support null value.
  • 8.
    Foreign key:-  Foreignkey are the column of an a table used to point to the primary key.  Foreign keys allow key values that are all NULL.
  • 9.