SlideShare a Scribd company logo
ASSIGNMENT # 2
SUBMITTED TO:
MISS AYESHA RASHID
SUBMITTED BY:
RABIA ZAFAR
17581556-045
BS IT (5TH
SEMESTER)
SECTION ‘A’
TOPIC:
KEYS IN DATABASE
Keys:
A key is a field, or combination of fields, in a database table used to retrieve and sort
rows in the table based on certain requirements. Keys are defined to speed up access to
data and, in many cases, to create links between different tables.
There are different types of keys in database:
1- Candidate key
2- Primary key
3- Super key
4- Composite key
5- Secondary key
6- Foreign key
Candidate Key:
The candidate keys in a table are defined as the set of keys that is minimal and
can uniquely identify any data row in the table.
Properties of Candidate key:
 It must contain unique values
 Candidate key may have multiple attributes
 Must not contain null values
 It should contain minimum fields to ensure uniqueness
 Uniquely identify each record in a table
Primary Key:
The primary key is selected from one of the candidate keys and becomes the
identifying key of a table. It can uniquely identify any data row of the table.
Rules for defining Primary key:
 Two rows can't have the same primary key value
 It must for every row to have a primary key value.
 The primary key field cannot be null.
 The value in a primary key column can never be modified or updated if any
foreign key refers to that primary key.
Super Key:
Super Key is the superset of primary key. The super key contains a set of
attributes, including the primary key, which can uniquely identify any data row in
the table.
Alternate key:
Primary key is selected from candidate key and the other entities are alternate
keys.
Composite Key:
If any single attribute of a table is not capable of being the key. It cannot identify
a row uniquely, then we combine two or more attributes to form a key. This is
known as a composite key.
Secondary Key:
Only one of the candidate keys is selected as the primary key. The rest of them
are known as secondary keys.
Foreign Key:
A foreign key is an attribute value in a table that acts as the primary key in
another. Hence, the foreign key is useful in linking together two tables. Data
should be entered in the foreign key column with great care, as wrongly entered
data can invalidate the relationship between the two tables.
An example to explain the different keys is:

More Related Content

What's hot

Doc 20191022-wa0041
Doc 20191022-wa0041Doc 20191022-wa0041
Doc 20191022-wa0041
university of Gujrat, pakistan
 
MS Sql Server: Joining Databases
MS Sql Server: Joining DatabasesMS Sql Server: Joining Databases
MS Sql Server: Joining Databases
DataminingTools Inc
 
Dbms keysppt
Dbms keyspptDbms keysppt
Dbms keysppt
ArunakumariAkula1
 
TLE
TLETLE
Ch 6
Ch 6Ch 6
Ch 6
muteddy
 
Key,ID Field and Tables Relationship
Key,ID Field and Tables Relationship Key,ID Field and Tables Relationship
Key,ID Field and Tables Relationship
ShouaQureshi
 
Mdst 3559-02-24-sql2
Mdst 3559-02-24-sql2Mdst 3559-02-24-sql2
Mdst 3559-02-24-sql2
Rafael Alvarado
 
Reconciliation Tool
Reconciliation ToolReconciliation Tool
Reconciliation Tool
Achal Kagwad
 
Primera forma normal
Primera forma normalPrimera forma normal
Primera forma normal
Adrian Miranda
 
Sql server ___________session_17(indexes)
Sql server  ___________session_17(indexes)Sql server  ___________session_17(indexes)
Sql server ___________session_17(indexes)
Ehtisham Ali
 
Advance sqlite3
Advance sqlite3Advance sqlite3
Advance sqlite3
Raghu nath
 
Index in sql server
Index in sql serverIndex in sql server
Index in sql server
Durgaprasad Yadav
 
Advance Sqlite3
Advance Sqlite3Advance Sqlite3
Advance Sqlite3
Raghu nath
 
Chapter 2 Relational Data Model-part1
Chapter 2 Relational Data Model-part1Chapter 2 Relational Data Model-part1
Chapter 2 Relational Data Model-part1
Eddyzulham Mahluzydde
 
chicago style handout two column format - Copy
chicago style handout two column format - Copychicago style handout two column format - Copy
chicago style handout two column format - Copy
Kali Brown
 
Database Systems - Relational Data Model (Chapter 2)
Database Systems - Relational Data Model (Chapter 2)Database Systems - Relational Data Model (Chapter 2)
Database Systems - Relational Data Model (Chapter 2)
Vidyasagar Mundroy
 
Index Tuning
Index TuningIndex Tuning
Index Tuning
sqlserver.co.il
 
DEE 431 Database keys and Normalisation Slide 2
DEE 431 Database keys and Normalisation Slide 2DEE 431 Database keys and Normalisation Slide 2
DEE 431 Database keys and Normalisation Slide 2
YOGESH SINGH
 
Chapter 2 Relational Data Model-part 3
Chapter 2 Relational Data Model-part 3Chapter 2 Relational Data Model-part 3
Chapter 2 Relational Data Model-part 3
Eddyzulham Mahluzydde
 
Database index
Database indexDatabase index
Database index
Riteshkiit
 

What's hot (20)

Doc 20191022-wa0041
Doc 20191022-wa0041Doc 20191022-wa0041
Doc 20191022-wa0041
 
MS Sql Server: Joining Databases
MS Sql Server: Joining DatabasesMS Sql Server: Joining Databases
MS Sql Server: Joining Databases
 
Dbms keysppt
Dbms keyspptDbms keysppt
Dbms keysppt
 
TLE
TLETLE
TLE
 
Ch 6
Ch 6Ch 6
Ch 6
 
Key,ID Field and Tables Relationship
Key,ID Field and Tables Relationship Key,ID Field and Tables Relationship
Key,ID Field and Tables Relationship
 
Mdst 3559-02-24-sql2
Mdst 3559-02-24-sql2Mdst 3559-02-24-sql2
Mdst 3559-02-24-sql2
 
Reconciliation Tool
Reconciliation ToolReconciliation Tool
Reconciliation Tool
 
Primera forma normal
Primera forma normalPrimera forma normal
Primera forma normal
 
Sql server ___________session_17(indexes)
Sql server  ___________session_17(indexes)Sql server  ___________session_17(indexes)
Sql server ___________session_17(indexes)
 
Advance sqlite3
Advance sqlite3Advance sqlite3
Advance sqlite3
 
Index in sql server
Index in sql serverIndex in sql server
Index in sql server
 
Advance Sqlite3
Advance Sqlite3Advance Sqlite3
Advance Sqlite3
 
Chapter 2 Relational Data Model-part1
Chapter 2 Relational Data Model-part1Chapter 2 Relational Data Model-part1
Chapter 2 Relational Data Model-part1
 
chicago style handout two column format - Copy
chicago style handout two column format - Copychicago style handout two column format - Copy
chicago style handout two column format - Copy
 
Database Systems - Relational Data Model (Chapter 2)
Database Systems - Relational Data Model (Chapter 2)Database Systems - Relational Data Model (Chapter 2)
Database Systems - Relational Data Model (Chapter 2)
 
Index Tuning
Index TuningIndex Tuning
Index Tuning
 
DEE 431 Database keys and Normalisation Slide 2
DEE 431 Database keys and Normalisation Slide 2DEE 431 Database keys and Normalisation Slide 2
DEE 431 Database keys and Normalisation Slide 2
 
Chapter 2 Relational Data Model-part 3
Chapter 2 Relational Data Model-part 3Chapter 2 Relational Data Model-part 3
Chapter 2 Relational Data Model-part 3
 
Database index
Database indexDatabase index
Database index
 

Similar to Keys used in database

key (1).pptx
key (1).pptxkey (1).pptx
key (1).pptx
KAnurag2
 
key.pptx
key.pptxkey.pptx
key.pptx
laptophp39
 
SQL_DBMS_KEYS.pptx
SQL_DBMS_KEYS.pptxSQL_DBMS_KEYS.pptx
SQL_DBMS_KEYS.pptx
rahulsharma571283
 
A Presentation of Types of Keys in RDBMS.pptx
A Presentation of Types of Keys in RDBMS.pptxA Presentation of Types of Keys in RDBMS.pptx
A Presentation of Types of Keys in RDBMS.pptx
harman6895ala
 
Dbms keys
Dbms keysDbms keys
Dbms keys
RUpaliLohar
 
DBMS Keys.pptx
DBMS Keys.pptxDBMS Keys.pptx
DBMS Keys.pptx
AryanGour1
 
V35 keys-c
V35  keys-cV35  keys-c
V35 keys-c
Dhirendra Chauhan
 
Keys presentation
Keys presentationKeys presentation
Keys presentation
mubeenkiran
 
Understanding Entity Relationship Models
Understanding Entity Relationship ModelsUnderstanding Entity Relationship Models
Understanding Entity Relationship Models
HamzaNadeem527928
 
computer-210809080138.pdf
computer-210809080138.pdfcomputer-210809080138.pdf
computer-210809080138.pdf
rahulsharma571283
 
Types Of Keys in DBMS
Types Of Keys in DBMSTypes Of Keys in DBMS
Types Of Keys in DBMS
PadamNepal1
 
Keys in Database
Keys in DatabaseKeys in Database
Keys in Database
A. S. M. Shafi
 
Keys.pptx
Keys.pptxKeys.pptx
Keys.pptx
revathi s
 
DBMS_Keys.pdf
DBMS_Keys.pdfDBMS_Keys.pdf
DBMS_Keys.pdf
DianneParaase
 
Keys in dbms(UNIT 2)
Keys in dbms(UNIT 2)Keys in dbms(UNIT 2)
Keys in dbms(UNIT 2)
SURBHI SAROHA
 
Types of keys in database | SQL
Types of keys in database | SQLTypes of keys in database | SQL
Types of keys in database | SQL
Sumit Pandey
 
Keys in DBMS.pptx
Keys in DBMS.pptxKeys in DBMS.pptx
Keys in DBMS.pptx
Revathy V R
 
B & c
B & cB & c
Database keys
Database keysDatabase keys
Database keys
Rahul Mishra
 
2 - Keys.pdf
2 - Keys.pdf2 - Keys.pdf
2 - Keys.pdf
gaurav70287
 

Similar to Keys used in database (20)

key (1).pptx
key (1).pptxkey (1).pptx
key (1).pptx
 
key.pptx
key.pptxkey.pptx
key.pptx
 
SQL_DBMS_KEYS.pptx
SQL_DBMS_KEYS.pptxSQL_DBMS_KEYS.pptx
SQL_DBMS_KEYS.pptx
 
A Presentation of Types of Keys in RDBMS.pptx
A Presentation of Types of Keys in RDBMS.pptxA Presentation of Types of Keys in RDBMS.pptx
A Presentation of Types of Keys in RDBMS.pptx
 
Dbms keys
Dbms keysDbms keys
Dbms keys
 
DBMS Keys.pptx
DBMS Keys.pptxDBMS Keys.pptx
DBMS Keys.pptx
 
V35 keys-c
V35  keys-cV35  keys-c
V35 keys-c
 
Keys presentation
Keys presentationKeys presentation
Keys presentation
 
Understanding Entity Relationship Models
Understanding Entity Relationship ModelsUnderstanding Entity Relationship Models
Understanding Entity Relationship Models
 
computer-210809080138.pdf
computer-210809080138.pdfcomputer-210809080138.pdf
computer-210809080138.pdf
 
Types Of Keys in DBMS
Types Of Keys in DBMSTypes Of Keys in DBMS
Types Of Keys in DBMS
 
Keys in Database
Keys in DatabaseKeys in Database
Keys in Database
 
Keys.pptx
Keys.pptxKeys.pptx
Keys.pptx
 
DBMS_Keys.pdf
DBMS_Keys.pdfDBMS_Keys.pdf
DBMS_Keys.pdf
 
Keys in dbms(UNIT 2)
Keys in dbms(UNIT 2)Keys in dbms(UNIT 2)
Keys in dbms(UNIT 2)
 
Types of keys in database | SQL
Types of keys in database | SQLTypes of keys in database | SQL
Types of keys in database | SQL
 
Keys in DBMS.pptx
Keys in DBMS.pptxKeys in DBMS.pptx
Keys in DBMS.pptx
 
B & c
B & cB & c
B & c
 
Database keys
Database keysDatabase keys
Database keys
 
2 - Keys.pdf
2 - Keys.pdf2 - Keys.pdf
2 - Keys.pdf
 

More from university of Gujrat, pakistan

Change management
Change management Change management
Change management
university of Gujrat, pakistan
 
Latest Trends in Digital Marketing
Latest Trends in Digital MarketingLatest Trends in Digital Marketing
Latest Trends in Digital Marketing
university of Gujrat, pakistan
 
Dark web (2)
Dark web (2)Dark web (2)
Code of ethics and professional conduct (1)
Code of ethics and professional conduct (1)Code of ethics and professional conduct (1)
Code of ethics and professional conduct (1)
university of Gujrat, pakistan
 
Certification accreditation and licensure (1)
Certification accreditation and licensure (1)Certification accreditation and licensure (1)
Certification accreditation and licensure (1)
university of Gujrat, pakistan
 
biggest technology trends
biggest technology trendsbiggest technology trends
biggest technology trends
university of Gujrat, pakistan
 
Freedom of information (1)
Freedom of information (1)Freedom of information (1)
Freedom of information (1)
university of Gujrat, pakistan
 
Individual cognition ppt (1)
Individual cognition ppt (1)Individual cognition ppt (1)
Individual cognition ppt (1)
university of Gujrat, pakistan
 
Top 10 highest (1)
Top 10 highest (1)Top 10 highest (1)
Top 10 highest (1)
university of Gujrat, pakistan
 
creativity and imagination
creativity and imagination creativity and imagination
creativity and imagination
university of Gujrat, pakistan
 
Brainstorming 078 (1)
Brainstorming 078 (1)Brainstorming 078 (1)
Brainstorming 078 (1)
university of Gujrat, pakistan
 
speeh-artificial intelligemce
speeh-artificial intelligemce speeh-artificial intelligemce
speeh-artificial intelligemce
university of Gujrat, pakistan
 
Pp dealing with problem complexity (1)
Pp dealing with problem complexity (1)Pp dealing with problem complexity (1)
Pp dealing with problem complexity (1)
university of Gujrat, pakistan
 
Motivation
MotivationMotivation
Vision of artificial intelligence (1)
Vision of artificial intelligence (1)Vision of artificial intelligence (1)
Vision of artificial intelligence (1)
university of Gujrat, pakistan
 
Entrepreneurship (1)
Entrepreneurship (1)Entrepreneurship (1)
Entrepreneurship (1)
university of Gujrat, pakistan
 
Role of professional societies
Role of professional societiesRole of professional societies
Role of professional societies
university of Gujrat, pakistan
 
Dealing with culticultural environment (1)
Dealing with culticultural environment (1)Dealing with culticultural environment (1)
Dealing with culticultural environment (1)
university of Gujrat, pakistan
 
Dealing with problem complexity (1)
Dealing with problem complexity (1)Dealing with problem complexity (1)
Dealing with problem complexity (1)
university of Gujrat, pakistan
 
cyber security and cyber crime
cyber security and cyber crime cyber security and cyber crime
cyber security and cyber crime
university of Gujrat, pakistan
 

More from university of Gujrat, pakistan (20)

Change management
Change management Change management
Change management
 
Latest Trends in Digital Marketing
Latest Trends in Digital MarketingLatest Trends in Digital Marketing
Latest Trends in Digital Marketing
 
Dark web (2)
Dark web (2)Dark web (2)
Dark web (2)
 
Code of ethics and professional conduct (1)
Code of ethics and professional conduct (1)Code of ethics and professional conduct (1)
Code of ethics and professional conduct (1)
 
Certification accreditation and licensure (1)
Certification accreditation and licensure (1)Certification accreditation and licensure (1)
Certification accreditation and licensure (1)
 
biggest technology trends
biggest technology trendsbiggest technology trends
biggest technology trends
 
Freedom of information (1)
Freedom of information (1)Freedom of information (1)
Freedom of information (1)
 
Individual cognition ppt (1)
Individual cognition ppt (1)Individual cognition ppt (1)
Individual cognition ppt (1)
 
Top 10 highest (1)
Top 10 highest (1)Top 10 highest (1)
Top 10 highest (1)
 
creativity and imagination
creativity and imagination creativity and imagination
creativity and imagination
 
Brainstorming 078 (1)
Brainstorming 078 (1)Brainstorming 078 (1)
Brainstorming 078 (1)
 
speeh-artificial intelligemce
speeh-artificial intelligemce speeh-artificial intelligemce
speeh-artificial intelligemce
 
Pp dealing with problem complexity (1)
Pp dealing with problem complexity (1)Pp dealing with problem complexity (1)
Pp dealing with problem complexity (1)
 
Motivation
MotivationMotivation
Motivation
 
Vision of artificial intelligence (1)
Vision of artificial intelligence (1)Vision of artificial intelligence (1)
Vision of artificial intelligence (1)
 
Entrepreneurship (1)
Entrepreneurship (1)Entrepreneurship (1)
Entrepreneurship (1)
 
Role of professional societies
Role of professional societiesRole of professional societies
Role of professional societies
 
Dealing with culticultural environment (1)
Dealing with culticultural environment (1)Dealing with culticultural environment (1)
Dealing with culticultural environment (1)
 
Dealing with problem complexity (1)
Dealing with problem complexity (1)Dealing with problem complexity (1)
Dealing with problem complexity (1)
 
cyber security and cyber crime
cyber security and cyber crime cyber security and cyber crime
cyber security and cyber crime
 

Recently uploaded

AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
IndexBug
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
Kumud Singh
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
Zilliz
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
kumardaparthi1024
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
Claudio Di Ciccio
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
SOFTTECHHUB
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Speck&Tech
 

Recently uploaded (20)

AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
 

Keys used in database

  • 1. ASSIGNMENT # 2 SUBMITTED TO: MISS AYESHA RASHID SUBMITTED BY: RABIA ZAFAR 17581556-045 BS IT (5TH SEMESTER) SECTION ‘A’ TOPIC: KEYS IN DATABASE
  • 2. Keys: A key is a field, or combination of fields, in a database table used to retrieve and sort rows in the table based on certain requirements. Keys are defined to speed up access to data and, in many cases, to create links between different tables. There are different types of keys in database: 1- Candidate key 2- Primary key 3- Super key 4- Composite key 5- Secondary key 6- Foreign key Candidate Key: The candidate keys in a table are defined as the set of keys that is minimal and can uniquely identify any data row in the table.
  • 3. Properties of Candidate key:  It must contain unique values  Candidate key may have multiple attributes  Must not contain null values  It should contain minimum fields to ensure uniqueness  Uniquely identify each record in a table Primary Key: The primary key is selected from one of the candidate keys and becomes the identifying key of a table. It can uniquely identify any data row of the table. Rules for defining Primary key:  Two rows can't have the same primary key value  It must for every row to have a primary key value.  The primary key field cannot be null.  The value in a primary key column can never be modified or updated if any foreign key refers to that primary key. Super Key: Super Key is the superset of primary key. The super key contains a set of attributes, including the primary key, which can uniquely identify any data row in the table. Alternate key: Primary key is selected from candidate key and the other entities are alternate keys. Composite Key: If any single attribute of a table is not capable of being the key. It cannot identify a row uniquely, then we combine two or more attributes to form a key. This is known as a composite key. Secondary Key: Only one of the candidate keys is selected as the primary key. The rest of them are known as secondary keys.
  • 4. Foreign Key: A foreign key is an attribute value in a table that acts as the primary key in another. Hence, the foreign key is useful in linking together two tables. Data should be entered in the foreign key column with great care, as wrongly entered data can invalidate the relationship between the two tables. An example to explain the different keys is: