SlideShare a Scribd company logo
2
Most read
3
Most read
5
Most read
Presented by
Shalini
Indroduction
What Is Keys?
*keys are very important part of
relational data base.
*they are used to establish and
identify relation between tables.
* they also ensure that each record
within a table can be uniquely identified by
combination of one or more fields within a
table.
DBMS has five types of keys in it and they
all has different functionality.
The keys are all follows:
*Super key
*Candidate key
*Primary key
*Foreign key
*Composite key
 Super key:
A super key is a set of ONE or MORE
columns(Attributes) to uniquely identify rows in a
table.
Examples:
 Super keys:
 Empssn
 Empnum
 Empssn,empna
me
 Empssn,num,na
me
 Empnum,name
Empssn Empnum Empname
9876540098 Ca05 Shana
9876543210 Ca06 Shalini
1234567890 Ca07 Bhavani
2143658709 Ca08 Suvathi
6543210987 Ca09 Nithya
Candidate key:
*A SUPER KEY with no
redundant attribute is known as
Candidate Key.
Candidate keys :
*Empssn
*Empnum
Empssn Empnum Empnam
e
98765400
98
Ca05 Shana
987654321
0
Ca06 Shalini
123456789
0
Ca07 Bhavani
214365870
9
Ca08 Suvathi
654321098
7
Ca09 Nithya
Primary key:
*A Primary key is a column
or set of columns in a table that
uniquely identifies tubels(rows) in
that table.
Example:
Empssn Empid Empnam
e
98765400
98
Ca05 Shana
98765432
10
Ca06 Shalini
12345678
90
Ca07 Bhavani
21436587
09
Ca08 Suvathi
65432109
87
Ca09 Nithya
Empssn Empnum Empnam
987654009
8
Ca01 Oviya
907856341
2
Ca02 Raiza
123456789
0
Ca03 Bindhu
543210987
6
Ca04 Kajal
654321098
7
Ca10 Pragya
Foreign key:
*Foreign key are column of a table
that points to the primary key of another table.
*They act as a cross reference
between tables.
Example:
emp 1 emp 2
Empssn Empid Empnam
e
98765400
98
Ca05 Shana
98765432
10
Ca06 Shalini
12345678
90
Ca07 Bhavani
21436587
09
Ca08 Suvathi
65432109
87
Ca09 Nithya
Empssn Empnum Empnam
987654009
8
Ca01 Oviya
907856341
2
Ca02 Raiza
123456789
0
Ca03 Bindhu
543210987
6
Ca04 Kajal
654321098
7
Ca10 Pragya
Composite key:
*A key that consists of more
than one atributes to uniquely identify rows(also
known as records or tubels)in a table is called
COMPOSITE KEY.
Example :
Empssn Empnum Empname
9876543210 Ca05 Shana
1234567890 Ca06 Shalini
9078534127 Ca07 Bhavani
2143658709 Ca08 Suvathi
5432109876 Ca09 Nithya

More Related Content

PPTX
Types of keys dbms
PPTX
Integrity Constraints
PPTX
Types Of Keys in DBMS
PPTX
Database constraints
PPT
SQL Tutorial - Basic Commands
PPT
Database Keys
PPT
Including Constraints -Oracle Data base
Types of keys dbms
Integrity Constraints
Types Of Keys in DBMS
Database constraints
SQL Tutorial - Basic Commands
Database Keys
Including Constraints -Oracle Data base

What's hot (20)

PPTX
Intro to dbms
PPT
ER DIAGRAM TO RELATIONAL SCHEMA MAPPING
PPTX
Database keys
PDF
Database Systems - Normalization of Relations(Chapter 4/3)
PPTX
Dbms keys
PPTX
Slide 5 keys
PPT
SQL Queries
PPTX
sql function(ppt)
PPTX
Types of keys in database | SQL
PPTX
Oracle: Joins
PPT
PL/SQL Introduction and Concepts
PPTX
Basic sql Commands
PPTX
SQL Joins.pptx
PPTX
Sql joins inner join self join outer joins
PPT
Constraints In Sql
PDF
SQL Joins With Examples | Edureka
PPTX
Chapter 15 Lists
PDF
Complete SQL Tutorial In Hindi By Rishabh Mishra.pdf
PPTX
Dbms normalization
PPTX
Cardinality and participation constraints
Intro to dbms
ER DIAGRAM TO RELATIONAL SCHEMA MAPPING
Database keys
Database Systems - Normalization of Relations(Chapter 4/3)
Dbms keys
Slide 5 keys
SQL Queries
sql function(ppt)
Types of keys in database | SQL
Oracle: Joins
PL/SQL Introduction and Concepts
Basic sql Commands
SQL Joins.pptx
Sql joins inner join self join outer joins
Constraints In Sql
SQL Joins With Examples | Edureka
Chapter 15 Lists
Complete SQL Tutorial In Hindi By Rishabh Mishra.pdf
Dbms normalization
Cardinality and participation constraints
Ad

Similar to Keys in dbms (20)

PPTX
Keys of database
PDF
Keys in Database
PPTX
Keys presentation
PPTX
key.pptx
PDF
DBMS VHGFGJKFHVGFJKHHFVHGFHBBVVHGVVHGVBVHG
PPTX
Database manamement system_keys_sheikh_monirul_hasan
PPTX
Presentation OF DBMS-2.pptx
PPTX
Dbms keysppt
PPTX
Keys and its Importance in DBMS and RDBMS
PPTX
DBMS key topic Presentation slide 1.pptx
PPTX
Keys_in_DBMS_VALID_INFORMATION_IS_AVAILA
PPTX
DBMS Keys.pptx
PDF
computer-210809080138.pdf
PDF
DBMS_Concept of Keys_Primary_Candidate.pdf
PPTX
Key-Database Management
PPTX
PDF
slide5keys-140722233859-phpapp02.pdf
PPTX
Keys.pptx
PPTX
L5_Keys in DBMS Database Systems and Programming
Keys of database
Keys in Database
Keys presentation
key.pptx
DBMS VHGFGJKFHVGFJKHHFVHGFHBBVVHGVVHGVBVHG
Database manamement system_keys_sheikh_monirul_hasan
Presentation OF DBMS-2.pptx
Dbms keysppt
Keys and its Importance in DBMS and RDBMS
DBMS key topic Presentation slide 1.pptx
Keys_in_DBMS_VALID_INFORMATION_IS_AVAILA
DBMS Keys.pptx
computer-210809080138.pdf
DBMS_Concept of Keys_Primary_Candidate.pdf
Key-Database Management
slide5keys-140722233859-phpapp02.pdf
Keys.pptx
L5_Keys in DBMS Database Systems and Programming
Ad

Recently uploaded (20)

PPTX
GDM (1) (1).pptx small presentation for students
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PPTX
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
PDF
TR - Agricultural Crops Production NC III.pdf
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PDF
Basic Mud Logging Guide for educational purpose
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PDF
Pre independence Education in Inndia.pdf
PPTX
master seminar digital applications in india
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PPTX
Cell Structure & Organelles in detailed.
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PDF
01-Introduction-to-Information-Management.pdf
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
GDM (1) (1).pptx small presentation for students
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
TR - Agricultural Crops Production NC III.pdf
Module 4: Burden of Disease Tutorial Slides S2 2025
Pharmacology of Heart Failure /Pharmacotherapy of CHF
Basic Mud Logging Guide for educational purpose
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
STATICS OF THE RIGID BODIES Hibbelers.pdf
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
Pre independence Education in Inndia.pdf
master seminar digital applications in india
Renaissance Architecture: A Journey from Faith to Humanism
2.FourierTransform-ShortQuestionswithAnswers.pdf
Cell Structure & Organelles in detailed.
O5-L3 Freight Transport Ops (International) V1.pdf
01-Introduction-to-Information-Management.pdf
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx

Keys in dbms

  • 2. Indroduction What Is Keys? *keys are very important part of relational data base. *they are used to establish and identify relation between tables. * they also ensure that each record within a table can be uniquely identified by combination of one or more fields within a table.
  • 3. DBMS has five types of keys in it and they all has different functionality. The keys are all follows: *Super key *Candidate key *Primary key *Foreign key *Composite key
  • 4.  Super key: A super key is a set of ONE or MORE columns(Attributes) to uniquely identify rows in a table.
  • 5. Examples:  Super keys:  Empssn  Empnum  Empssn,empna me  Empssn,num,na me  Empnum,name Empssn Empnum Empname 9876540098 Ca05 Shana 9876543210 Ca06 Shalini 1234567890 Ca07 Bhavani 2143658709 Ca08 Suvathi 6543210987 Ca09 Nithya
  • 6. Candidate key: *A SUPER KEY with no redundant attribute is known as Candidate Key.
  • 7. Candidate keys : *Empssn *Empnum Empssn Empnum Empnam e 98765400 98 Ca05 Shana 987654321 0 Ca06 Shalini 123456789 0 Ca07 Bhavani 214365870 9 Ca08 Suvathi 654321098 7 Ca09 Nithya
  • 8. Primary key: *A Primary key is a column or set of columns in a table that uniquely identifies tubels(rows) in that table.
  • 9. Example: Empssn Empid Empnam e 98765400 98 Ca05 Shana 98765432 10 Ca06 Shalini 12345678 90 Ca07 Bhavani 21436587 09 Ca08 Suvathi 65432109 87 Ca09 Nithya Empssn Empnum Empnam 987654009 8 Ca01 Oviya 907856341 2 Ca02 Raiza 123456789 0 Ca03 Bindhu 543210987 6 Ca04 Kajal 654321098 7 Ca10 Pragya
  • 10. Foreign key: *Foreign key are column of a table that points to the primary key of another table. *They act as a cross reference between tables.
  • 11. Example: emp 1 emp 2 Empssn Empid Empnam e 98765400 98 Ca05 Shana 98765432 10 Ca06 Shalini 12345678 90 Ca07 Bhavani 21436587 09 Ca08 Suvathi 65432109 87 Ca09 Nithya Empssn Empnum Empnam 987654009 8 Ca01 Oviya 907856341 2 Ca02 Raiza 123456789 0 Ca03 Bindhu 543210987 6 Ca04 Kajal 654321098 7 Ca10 Pragya
  • 12. Composite key: *A key that consists of more than one atributes to uniquely identify rows(also known as records or tubels)in a table is called COMPOSITE KEY.
  • 13. Example : Empssn Empnum Empname 9876543210 Ca05 Shana 1234567890 Ca06 Shalini 9078534127 Ca07 Bhavani 2143658709 Ca08 Suvathi 5432109876 Ca09 Nithya