SlideShare a Scribd company logo
1 of 3
KEYS:
Primary Key:
• An attribute or set of attributes that
uniquely identifies a row or record in a
relation/table is known as primary key.
• A relation can have only one Primary Key.
• Each value in Primary Key attribute must be
unique.
• Primary Key cannot contain null values.
 Candidate Key:
• The attributes or set of attributes that
can be used as primary key is called
Candidate Key.
Reg No Name Class
10 Asad C.A
20 Mohsin P.H.D
30 Zeeshan M.B.B.S
The attribute Reg No is Primary
Key.
KEYS:
 Alternate Key:
• The candidate keys
that are not selected
as primary key are
know as Alternate
Keys.
 Composite Key:
• A primary key that
consists of two or
more attributes is
known as Composite
Key.
KEYS:
 Secondary Key:
• An attribute or set of
attributes that is bases for
retrieval is called S.K
• One Secondary Key value
may refer to many records.
• Secondary Key can be a
non-unique attribute.
 Foreign Key:
• A Foreign Key is an
attribute or set of
attributes in a
relation/table whose
values match a primary
key in another relation.

More Related Content

More from Ranjit273515

More from Ranjit273515 (6)

41- Ranjit CE 4th Sem.(P and I Notes).pdf
41- Ranjit CE 4th Sem.(P and I Notes).pdf41- Ranjit CE 4th Sem.(P and I Notes).pdf
41- Ranjit CE 4th Sem.(P and I Notes).pdf
 
question3.pdf
question3.pdfquestion3.pdf
question3.pdf
 
question3.pdf
question3.pdfquestion3.pdf
question3.pdf
 
question2.pdf
question2.pdfquestion2.pdf
question2.pdf
 
dbms notes.ppt
dbms notes.pptdbms notes.ppt
dbms notes.ppt
 
SQL.ppt
SQL.pptSQL.ppt
SQL.ppt
 

Recently uploaded

Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 

Recently uploaded (20)

Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 

dbms keys.pptx

  • 1. KEYS: Primary Key: • An attribute or set of attributes that uniquely identifies a row or record in a relation/table is known as primary key. • A relation can have only one Primary Key. • Each value in Primary Key attribute must be unique. • Primary Key cannot contain null values.  Candidate Key: • The attributes or set of attributes that can be used as primary key is called Candidate Key. Reg No Name Class 10 Asad C.A 20 Mohsin P.H.D 30 Zeeshan M.B.B.S The attribute Reg No is Primary Key.
  • 2. KEYS:  Alternate Key: • The candidate keys that are not selected as primary key are know as Alternate Keys.  Composite Key: • A primary key that consists of two or more attributes is known as Composite Key.
  • 3. KEYS:  Secondary Key: • An attribute or set of attributes that is bases for retrieval is called S.K • One Secondary Key value may refer to many records. • Secondary Key can be a non-unique attribute.  Foreign Key: • A Foreign Key is an attribute or set of attributes in a relation/table whose values match a primary key in another relation.