SlideShare a Scribd company logo
Welcome to my Presentation
Submitted by :
Sheikh Monirul Hasan
Id: 162015077
Department: CSE
Green University of Bangladesh
Submitted to :
Biplob Chandra Debnath
Lecturer : CSE
1
• DBMS has Five types of Keys in it and they all has different functionality.
• The Keys are as follows:
• Primary Key
• Unique Key
• Super Key
• Candidate Key
• Foreign Key
Let’s discuss one by one all of the five keys with example.
Presentation topic – DBMS Keys
2
PRIMARY KEY
The Primary Key is an attribute or a set of attributes that uniquely identify a specific
instance of an entity.
Every entity in the data model must have a primary key whose values uniquely identify
instances of the entity.
3
PRIMARY KEY
Properties Of Primary Keys
To qualify as a primary key for an entity, an attribute must have the
following properties:
It must have a non-null value for each instance of the entity
The value must be unique for each instance of an entity
The values must not change or become null during the life of each entity instance
4
PRIMARY KEY
Example :
Roll_NO Name Address
1 Sheikh Monirul Hasan Mirpur, Dhaka , Bangladesh
2 Sakib Mohakhali
3 Safa shawrapara
5
Unique Key
Unique key
Unique key is one or more column in a table used to uniquely identify each row in the table . It can
contain NULL value.
Example:
student table :
Uu
Roll_No Name Address
1 Arafat Mirpur
- Mission Dhanmondi
3 Safa Shawrapara
6
SUPER KEY
Super Key is a set of attributes whose set of values can uniquely identify an entity
instance in the entity set.
A Super Key can contains one or more than one attributes.
Super Key is the broadest definition of unique identifiers of an entity in an entity
set.
7
Super Key
Example :
Roll_No Name Address
1 Arafat Mirpur
2 Mission Dhanmondi
3 Safa Shawrapara
{Roll_No}, {Roll_No,Name} , {Roll_No,Adderss}, {Roll_No, Name, Address} all these sets are super
key.
8
CANDIDATE KEY
Candidate key is a set of one or more attributes whose set of values can
uniquely identify an entity instance in the entity set.
Any attribute in the candidate key cannot be omitted without destroying the
uniqueness property of the Candidate key.
It is minimal Super Key.
9
CANDIDATE KEY
Example:
Roll_No Name Phone_No City
121 Anik 765368 Jamalpur
451 Jakir 982312 Magura
762 Ridoy 095421 Faridpur
876 Mokles 532134 Manikgonj
{Roll_No}, {Phone-No} are two candidate key. Because we can
consider any one of these as a primary key .
10
FOREIGN KEY
A Foreign key is an attribute that completes a relationship by identifying the parent
entity.
Foreign keys provide a method for maintaining integrity in the data (called referential
integrity) and for navigating between different instances of an entity.
Every relationship in the model must be supported by a foreign key.
11
Foreign Key
Example :
Roll_No Name Address
162015040 Arafat Mirpur
162015029 Mission Dhanmondi
162015015 Safa Shawrapara
Roll_No Semester Marks
162015040 III 80
162015029 V 70
162015015 VII 75
Here Roll_No of marks table is foreign key.
Student table :
Marks table :
12
COMPOSITE KEY
When a primary key is created from a combination of 2 or more columns, the
primary key is called a composite key.
Each column may not be unique by itself within the database table but when
combined with the other column(s) in the composite key, the combination is
unique.
13
COMPOSITE KEY
Example:
14
15
For the more information you can check out Sheikh Monirul Hasan
Connect with me in social media
Facebook
LinkedIn
Twitter
16

More Related Content

PPSX
Functional dependency
PPTX
ER model to Relational model mapping
PPTX
Cardinality and participation constraints
PDF
Java -lec-3
PPTX
Dbms keys
PDF
Mapping ER and EER Model
PPTX
Er diagrams presentation
PPTX
2- Introduction to java II
Functional dependency
ER model to Relational model mapping
Cardinality and participation constraints
Java -lec-3
Dbms keys
Mapping ER and EER Model
Er diagrams presentation
2- Introduction to java II

What's hot (20)

PPTX
Database - Entity Relationship Diagram (ERD)
PPTX
5- Overriding and Abstraction In Java
PPT
ER DIAGRAM TO RELATIONAL SCHEMA MAPPING
PPTX
Abstract Class Presentation
PPT
Er & eer to relational mapping
PPT
Mapping
PPTX
E-R diagram in Database
PPT
E R Diagram
PPTX
RDBMS
PPTX
Python revision tour -I
PPT
Special lecture er diagram
PPTX
Theory of dependencies in relational database
PPTX
FUNCTION DEPENDENCY AND TYPES & EXAMPLE
PPTX
Entity Relationship Diagram
PPT
Entity relationship diagram
PPTX
How to Draw an Effective ER diagram
PDF
Chapter3 the relational data model and the relation database constraints part2
PDF
RDBMS ERD
PPTX
Presentation database about ERD
PPTX
Entity relation(1)
Database - Entity Relationship Diagram (ERD)
5- Overriding and Abstraction In Java
ER DIAGRAM TO RELATIONAL SCHEMA MAPPING
Abstract Class Presentation
Er & eer to relational mapping
Mapping
E-R diagram in Database
E R Diagram
RDBMS
Python revision tour -I
Special lecture er diagram
Theory of dependencies in relational database
FUNCTION DEPENDENCY AND TYPES & EXAMPLE
Entity Relationship Diagram
Entity relationship diagram
How to Draw an Effective ER diagram
Chapter3 the relational data model and the relation database constraints part2
RDBMS ERD
Presentation database about ERD
Entity relation(1)
Ad

Similar to Database manamement system_keys_sheikh_monirul_hasan (20)

PPTX
DBMS key topic Presentation slide 1.pptx
PPTX
SQL_DBMS_KEYS.pptx
PPTX
DBMS Keys
PPTX
Keys_in_DBMS_VALID_INFORMATION_IS_AVAILA
PPTX
Types Of Keys in DBMS
PDF
computer-210809080138.pdf
DOCX
Keys used in database
PPTX
Types of keys in database | SQL
PPTX
PPTX
AASHUrdbms.pptx
PPTX
Types of keys dbms
PPT
DBMS Unit 2 ppt.ppt
PPT
Keys and its types in DBMS
PPTX
DBMS Keys.pptx
PPTX
DBMS
PPTX
DEE 431 Database keys and Normalisation Slide 2
PPTX
Dbms keysppt
DOCX
Doc 20191022-wa0041
PPTX
Presentation OF DBMS-2.pptx
PPTX
RELATIONALfsaaaaaaaaaaaakyagsgs MODEL.pptx
DBMS key topic Presentation slide 1.pptx
SQL_DBMS_KEYS.pptx
DBMS Keys
Keys_in_DBMS_VALID_INFORMATION_IS_AVAILA
Types Of Keys in DBMS
computer-210809080138.pdf
Keys used in database
Types of keys in database | SQL
AASHUrdbms.pptx
Types of keys dbms
DBMS Unit 2 ppt.ppt
Keys and its types in DBMS
DBMS Keys.pptx
DBMS
DEE 431 Database keys and Normalisation Slide 2
Dbms keysppt
Doc 20191022-wa0041
Presentation OF DBMS-2.pptx
RELATIONALfsaaaaaaaaaaaakyagsgs MODEL.pptx
Ad

Recently uploaded (20)

PPTX
Microbial diseases, their pathogenesis and prophylaxis
PPTX
Radiologic_Anatomy_of_the_Brachial_plexus [final].pptx
PDF
Updated Idioms and Phrasal Verbs in English subject
PDF
Trump Administration's workforce development strategy
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PDF
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
PPTX
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
PDF
Complications of Minimal Access Surgery at WLH
PDF
ChatGPT for Dummies - Pam Baker Ccesa007.pdf
PDF
Microbial disease of the cardiovascular and lymphatic systems
PPTX
master seminar digital applications in india
PDF
LDMMIA Reiki Yoga Finals Review Spring Summer
PDF
RTP_AR_KS1_Tutor's Guide_English [FOR REPRODUCTION].pdf
PDF
Yogi Goddess Pres Conference Studio Updates
PDF
Paper A Mock Exam 9_ Attempt review.pdf.
PPTX
UV-Visible spectroscopy..pptx UV-Visible Spectroscopy – Electronic Transition...
PPTX
Lesson notes of climatology university.
DOC
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
Microbial diseases, their pathogenesis and prophylaxis
Radiologic_Anatomy_of_the_Brachial_plexus [final].pptx
Updated Idioms and Phrasal Verbs in English subject
Trump Administration's workforce development strategy
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
Complications of Minimal Access Surgery at WLH
ChatGPT for Dummies - Pam Baker Ccesa007.pdf
Microbial disease of the cardiovascular and lymphatic systems
master seminar digital applications in india
LDMMIA Reiki Yoga Finals Review Spring Summer
RTP_AR_KS1_Tutor's Guide_English [FOR REPRODUCTION].pdf
Yogi Goddess Pres Conference Studio Updates
Paper A Mock Exam 9_ Attempt review.pdf.
UV-Visible spectroscopy..pptx UV-Visible Spectroscopy – Electronic Transition...
Lesson notes of climatology university.
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
school management -TNTEU- B.Ed., Semester II Unit 1.pptx

Database manamement system_keys_sheikh_monirul_hasan

  • 1. Welcome to my Presentation Submitted by : Sheikh Monirul Hasan Id: 162015077 Department: CSE Green University of Bangladesh Submitted to : Biplob Chandra Debnath Lecturer : CSE 1
  • 2. • DBMS has Five types of Keys in it and they all has different functionality. • The Keys are as follows: • Primary Key • Unique Key • Super Key • Candidate Key • Foreign Key Let’s discuss one by one all of the five keys with example. Presentation topic – DBMS Keys 2
  • 3. PRIMARY KEY The Primary Key is an attribute or a set of attributes that uniquely identify a specific instance of an entity. Every entity in the data model must have a primary key whose values uniquely identify instances of the entity. 3
  • 4. PRIMARY KEY Properties Of Primary Keys To qualify as a primary key for an entity, an attribute must have the following properties: It must have a non-null value for each instance of the entity The value must be unique for each instance of an entity The values must not change or become null during the life of each entity instance 4
  • 5. PRIMARY KEY Example : Roll_NO Name Address 1 Sheikh Monirul Hasan Mirpur, Dhaka , Bangladesh 2 Sakib Mohakhali 3 Safa shawrapara 5
  • 6. Unique Key Unique key Unique key is one or more column in a table used to uniquely identify each row in the table . It can contain NULL value. Example: student table : Uu Roll_No Name Address 1 Arafat Mirpur - Mission Dhanmondi 3 Safa Shawrapara 6
  • 7. SUPER KEY Super Key is a set of attributes whose set of values can uniquely identify an entity instance in the entity set. A Super Key can contains one or more than one attributes. Super Key is the broadest definition of unique identifiers of an entity in an entity set. 7
  • 8. Super Key Example : Roll_No Name Address 1 Arafat Mirpur 2 Mission Dhanmondi 3 Safa Shawrapara {Roll_No}, {Roll_No,Name} , {Roll_No,Adderss}, {Roll_No, Name, Address} all these sets are super key. 8
  • 9. CANDIDATE KEY Candidate key is a set of one or more attributes whose set of values can uniquely identify an entity instance in the entity set. Any attribute in the candidate key cannot be omitted without destroying the uniqueness property of the Candidate key. It is minimal Super Key. 9
  • 10. CANDIDATE KEY Example: Roll_No Name Phone_No City 121 Anik 765368 Jamalpur 451 Jakir 982312 Magura 762 Ridoy 095421 Faridpur 876 Mokles 532134 Manikgonj {Roll_No}, {Phone-No} are two candidate key. Because we can consider any one of these as a primary key . 10
  • 11. FOREIGN KEY A Foreign key is an attribute that completes a relationship by identifying the parent entity. Foreign keys provide a method for maintaining integrity in the data (called referential integrity) and for navigating between different instances of an entity. Every relationship in the model must be supported by a foreign key. 11
  • 12. Foreign Key Example : Roll_No Name Address 162015040 Arafat Mirpur 162015029 Mission Dhanmondi 162015015 Safa Shawrapara Roll_No Semester Marks 162015040 III 80 162015029 V 70 162015015 VII 75 Here Roll_No of marks table is foreign key. Student table : Marks table : 12
  • 13. COMPOSITE KEY When a primary key is created from a combination of 2 or more columns, the primary key is called a composite key. Each column may not be unique by itself within the database table but when combined with the other column(s) in the composite key, the combination is unique. 13
  • 15. 15 For the more information you can check out Sheikh Monirul Hasan Connect with me in social media Facebook LinkedIn Twitter
  • 16. 16