SlideShare a Scribd company logo
Page 1Classification: Restricted
Business Analysis
Training
Database Keys
Page 2Classification: Restricted
Agenda
• Keys
• Candidate Key
• Primary Key
• Compound Key
• Surrogate Key
• Foreign Key
• Key Notation
Page 3Classification: Restricted
Keys
A key is a field or set of fields whose values uniquely identify a record.
In this example, we could use SCN as a key because it uniquely identifies a
pupil record. No other pupil can have the same SCN (Scottish Candidate
Number).
No other fields can uniquely identify each pupil record
Page 4Classification: Restricted
Candidate Key
Any field or set of fields which can be considered as a key is known as a
candidate key
In this example, both Employee Number and Email are candidate keys,
because both can uniquely identify the employee record in the table
Page 5Classification: Restricted
Primary Key
The primary key is the candidate key which is chosen to be used
In the example above, it's possible that the company may change the
structure of staff email addresses. Given this, it would be better to use
Employee Number as a primary key as this is less likely to change.
A primary key consisting of only one field is known as an atomic key
Page 6Classification: Restricted
Compound Key
It is possible in some tables that no one column can act as a primary key, and
that a combination of columns are required to create the key. This is known
as a compound key.
Order ID cannot be a primary key as it does not uniquely identify a record
Product ID cannot be a primary key as it does not uniquely identify a record
Page 7Classification: Restricted
Compound Key
It is possible in some tables that no one column can act as a primary key, and
that a combination of columns are required to create the key. This is known
as a compound key.
A compound key of Order ID and Product ID could be used because this is
unique for each record.
Page 8Classification: Restricted
Surrogate Key
A surrogate key is a special key which has no meaning or purpose other than
to uniquely identify each record. Surrogate keys are often a combination of
letters and numbers. A new column is created to be the primary key.
Page 9Classification: Restricted
Surrogate Key
A surrogate key is a special key which has no meaning or purpose other than
to uniquely identify each record. Surrogate keys are often a combination of
letters and numbers. A new column is created to be the primary key.
In this example, KTV have been interviewing passers-by for the evening news
bulletin. The production team take a note of the interviewee's name and the
duration of the interview.
As these people are not related to KTV in anyway, a surrogate key must be
created in order to uniquely identify them.
Page 10Classification: Restricted
Surrogate Key
A surrogate key is a special key which has no meaning or purpose other than
to uniquely identify each record. Surrogate keys are often a combination of
letters and numbers. A new column is created to be the primary key.
In this example, KTV have been interviewing passers-by for the evening news
bulletin. The production team take a note of the interviewee's name and the
duration of the interview.
As these people are not related to KTV in anyway, a surrogate key must be
created in order to uniquely identify them.
Page 11Classification: Restricted
Foreign Key
A foreign key is a column which is added to one table to create a relationship
with another table.
In this example we have two tables, teachers and departments in a school.
But there is no way to see which teacher works in which department.
Page 12Classification: Restricted
Foreign Key
A foreign key is a column which is added to one table to create a relationship
with another table.
By adding the foreign key Department Code to the Teacher table, we can
create a relationship between the two tables.
Page 13Classification: Restricted
Key Notation
We represent primary keys by underlining them.
We represent foreign keys with an asterisk.
Page 14Classification: Restricted
Key Notation
We represent primary keys by underlining them.
We represent foreign keys with an asterisk.
young scot card (card_num, name, expiry_date, photo)
pupil (candidate_num, forename, surname, dob, card_num*)
Page 15Classification: Restricted
Key Notation
We represent primary keys by underlining them.
We represent foreign keys with an asterisk.
pupil (candidate_num, forename, surname, dob, postcode)
exam (exam_id, subject, level, duration)
result (candidate_num*, exam_id*, grade)
Page 16Classification: Restricted
Key Notation
We represent primary keys by underlining them.
We represent foreign keys with an asterisk.
movie (movie_id, name, certificate, rating)
cinema (cinema_id, city, telephone)
screening (cinema*, movie*, date, time)
Page 17Classification: Restricted
Thank You!

More Related Content

What's hot

Chapter 4 functions, views, indexing
Chapter 4  functions, views, indexingChapter 4  functions, views, indexing
Chapter 4 functions, views, indexing
baabtra.com - No. 1 supplier of quality freshers
 
Flags registers
Flags registersFlags registers
Flags registers
saman Iftikhar
 
Triggers in SQL | Edureka
Triggers in SQL | EdurekaTriggers in SQL | Edureka
Triggers in SQL | Edureka
Edureka!
 
DLD Lecture No 18 Analysis and Design of Combinational Circuit.pptx
DLD Lecture No 18 Analysis and Design of Combinational Circuit.pptxDLD Lecture No 18 Analysis and Design of Combinational Circuit.pptx
DLD Lecture No 18 Analysis and Design of Combinational Circuit.pptx
SaveraAyub2
 
Integration testing
Integration testingIntegration testing
Integration testing
queen jemila
 
Object-Oriented Analysis & Design (OOAD) Domain Modeling Introduction
  Object-Oriented Analysis & Design (OOAD)  Domain Modeling Introduction  Object-Oriented Analysis & Design (OOAD)  Domain Modeling Introduction
Object-Oriented Analysis & Design (OOAD) Domain Modeling IntroductionDang Tuan
 
Excel presentation data validation
Excel presentation   data validationExcel presentation   data validation
Excel presentation data validation
Nagamani Y R
 
basic structure of SQL FINAL.pptx
basic structure of SQL FINAL.pptxbasic structure of SQL FINAL.pptx
basic structure of SQL FINAL.pptx
Anusha sivakumar
 
VB PPT by ADI PART3.pdf
VB PPT by ADI PART3.pdfVB PPT by ADI PART3.pdf
VB PPT by ADI PART3.pdf
Prof. Dr. K. Adisesha
 
Cookies in servlets.ppt
Cookies in servlets.pptCookies in servlets.ppt
Cookies in servlets.ppt
Swetha S
 
Relational Calculus
Relational CalculusRelational Calculus
Relational Calculus
Dr. C.V. Suresh Babu
 
All About PL/SQL Collections
All About PL/SQL CollectionsAll About PL/SQL Collections
All About PL/SQL Collections
Steven Feuerstein
 
DBMS unit-2.pdf
DBMS unit-2.pdfDBMS unit-2.pdf
DBMS unit-2.pdf
Prof. Dr. K. Adisesha
 
FP304 DATABASE SYSTEM PAPER FINAL EXAM AGAIN
FP304 DATABASE SYSTEM  PAPER FINAL EXAM AGAINFP304 DATABASE SYSTEM  PAPER FINAL EXAM AGAIN
FP304 DATABASE SYSTEM PAPER FINAL EXAM AGAIN
Syahriha Ruslan
 
Oracle Database Sequence
Oracle Database SequenceOracle Database Sequence
Oracle Database Sequence
Eryk Budi Pratama
 
6. Integrity and Security in DBMS
6. Integrity and Security in DBMS6. Integrity and Security in DBMS
6. Integrity and Security in DBMSkoolkampus
 
Reusability
ReusabilityReusability
Constraints In Sql
Constraints In SqlConstraints In Sql
Constraints In SqlAnurag
 
Code Review
Code ReviewCode Review
Code Review
Mikalai Alimenkou
 

What's hot (20)

Chapter 4 functions, views, indexing
Chapter 4  functions, views, indexingChapter 4  functions, views, indexing
Chapter 4 functions, views, indexing
 
Flags registers
Flags registersFlags registers
Flags registers
 
Triggers in SQL | Edureka
Triggers in SQL | EdurekaTriggers in SQL | Edureka
Triggers in SQL | Edureka
 
DLD Lecture No 18 Analysis and Design of Combinational Circuit.pptx
DLD Lecture No 18 Analysis and Design of Combinational Circuit.pptxDLD Lecture No 18 Analysis and Design of Combinational Circuit.pptx
DLD Lecture No 18 Analysis and Design of Combinational Circuit.pptx
 
Integration testing
Integration testingIntegration testing
Integration testing
 
Object-Oriented Analysis & Design (OOAD) Domain Modeling Introduction
  Object-Oriented Analysis & Design (OOAD)  Domain Modeling Introduction  Object-Oriented Analysis & Design (OOAD)  Domain Modeling Introduction
Object-Oriented Analysis & Design (OOAD) Domain Modeling Introduction
 
Excel presentation data validation
Excel presentation   data validationExcel presentation   data validation
Excel presentation data validation
 
basic structure of SQL FINAL.pptx
basic structure of SQL FINAL.pptxbasic structure of SQL FINAL.pptx
basic structure of SQL FINAL.pptx
 
VB PPT by ADI PART3.pdf
VB PPT by ADI PART3.pdfVB PPT by ADI PART3.pdf
VB PPT by ADI PART3.pdf
 
Cookies in servlets.ppt
Cookies in servlets.pptCookies in servlets.ppt
Cookies in servlets.ppt
 
Relational Calculus
Relational CalculusRelational Calculus
Relational Calculus
 
SQL Views
SQL ViewsSQL Views
SQL Views
 
All About PL/SQL Collections
All About PL/SQL CollectionsAll About PL/SQL Collections
All About PL/SQL Collections
 
DBMS unit-2.pdf
DBMS unit-2.pdfDBMS unit-2.pdf
DBMS unit-2.pdf
 
FP304 DATABASE SYSTEM PAPER FINAL EXAM AGAIN
FP304 DATABASE SYSTEM  PAPER FINAL EXAM AGAINFP304 DATABASE SYSTEM  PAPER FINAL EXAM AGAIN
FP304 DATABASE SYSTEM PAPER FINAL EXAM AGAIN
 
Oracle Database Sequence
Oracle Database SequenceOracle Database Sequence
Oracle Database Sequence
 
6. Integrity and Security in DBMS
6. Integrity and Security in DBMS6. Integrity and Security in DBMS
6. Integrity and Security in DBMS
 
Reusability
ReusabilityReusability
Reusability
 
Constraints In Sql
Constraints In SqlConstraints In Sql
Constraints In Sql
 
Code Review
Code ReviewCode Review
Code Review
 

Similar to Database Keys

Database Keys
Database KeysDatabase Keys
Database Keys
Forrester High School
 
ISDD Database Keys N5
ISDD Database Keys N5ISDD Database Keys N5
ISDD Database Keys N5
Forrester High School
 
Doc 20191022-wa0041
Doc 20191022-wa0041Doc 20191022-wa0041
Doc 20191022-wa0041
university of Gujrat, pakistan
 
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
 
Presentation OF DBMS-2.pptx
Presentation OF DBMS-2.pptxPresentation OF DBMS-2.pptx
Presentation OF DBMS-2.pptx
ShumailaSajjad
 
DBMS key topic Presentation slide 1.pptx
DBMS key topic Presentation slide 1.pptxDBMS key topic Presentation slide 1.pptx
DBMS key topic Presentation slide 1.pptx
sonudhakad173
 
Natural vs.surrogate keys
Natural vs.surrogate keysNatural vs.surrogate keys
Natural vs.surrogate keysRon Morgan
 
2.2 keys
2.2 keys2.2 keys
2.2 keysELIMENG
 
Difference between fact tables and dimension tables
Difference between fact tables and dimension tablesDifference between fact tables and dimension tables
Difference between fact tables and dimension tables
Kamran Haider
 
B & c
B & cB & c
Advance database system (part 3)
Advance database system (part 3)Advance database system (part 3)
Advance database system (part 3)
Abdullah Khosa
 
DB Keys.ppt
DB Keys.pptDB Keys.ppt
DB Keys.ppt
ArhamBaloch1
 
DB Keys.ppt
DB Keys.pptDB Keys.ppt
DB Keys.ppt
ArhamBaloch1
 
DBMS-Unit-2.pptx
DBMS-Unit-2.pptxDBMS-Unit-2.pptx
DBMS-Unit-2.pptx
Abhinayacheekati
 
Example Of A Research Essay In Mla Format
Example Of A Research Essay In Mla FormatExample Of A Research Essay In Mla Format
Example Of A Research Essay In Mla Format
Tameka Howard
 
Resume Theory 101
Resume Theory 101Resume Theory 101
Resume Theory 101
James Crook
 
Dbms keys
Dbms keysDbms keys
Dbms keys
pyingkodi maran
 
Keys in DBMS
Keys in DBMSKeys in DBMS
Keys in DBMS
Pyingkodi Maran
 
2.2 career progression handouts
2.2 career progression handouts2.2 career progression handouts
2.2 career progression handoutsIan Jobe
 

Similar to Database Keys (20)

Database Keys
Database KeysDatabase Keys
Database Keys
 
ISDD Database Keys N5
ISDD Database Keys N5ISDD Database Keys N5
ISDD Database Keys N5
 
Doc 20191022-wa0041
Doc 20191022-wa0041Doc 20191022-wa0041
Doc 20191022-wa0041
 
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
 
Presentation OF DBMS-2.pptx
Presentation OF DBMS-2.pptxPresentation OF DBMS-2.pptx
Presentation OF DBMS-2.pptx
 
DBMS key topic Presentation slide 1.pptx
DBMS key topic Presentation slide 1.pptxDBMS key topic Presentation slide 1.pptx
DBMS key topic Presentation slide 1.pptx
 
Natural vs.surrogate keys
Natural vs.surrogate keysNatural vs.surrogate keys
Natural vs.surrogate keys
 
2.2 keys
2.2 keys2.2 keys
2.2 keys
 
Difference between fact tables and dimension tables
Difference between fact tables and dimension tablesDifference between fact tables and dimension tables
Difference between fact tables and dimension tables
 
B & c
B & cB & c
B & c
 
Advance database system (part 3)
Advance database system (part 3)Advance database system (part 3)
Advance database system (part 3)
 
DB Keys.ppt
DB Keys.pptDB Keys.ppt
DB Keys.ppt
 
DB Keys.ppt
DB Keys.pptDB Keys.ppt
DB Keys.ppt
 
DBMS-Unit-2.pptx
DBMS-Unit-2.pptxDBMS-Unit-2.pptx
DBMS-Unit-2.pptx
 
Example Of A Research Essay In Mla Format
Example Of A Research Essay In Mla FormatExample Of A Research Essay In Mla Format
Example Of A Research Essay In Mla Format
 
Resume Theory 101
Resume Theory 101Resume Theory 101
Resume Theory 101
 
DBMS Keys
DBMS KeysDBMS Keys
DBMS Keys
 
Dbms keys
Dbms keysDbms keys
Dbms keys
 
Keys in DBMS
Keys in DBMSKeys in DBMS
Keys in DBMS
 
2.2 career progression handouts
2.2 career progression handouts2.2 career progression handouts
2.2 career progression handouts
 

More from Sunil-QA

Step by Step Guide to Learn SDLC
Step by Step Guide to Learn SDLCStep by Step Guide to Learn SDLC
Step by Step Guide to Learn SDLC
Sunil-QA
 
Workflow Diagram
Workflow DiagramWorkflow Diagram
Workflow Diagram
Sunil-QA
 
Business Functional Requirements
Business Functional RequirementsBusiness Functional Requirements
Business Functional Requirements
Sunil-QA
 
Agile User Stories
Agile  User StoriesAgile  User Stories
Agile User Stories
Sunil-QA
 
Enterprise Analysis
Enterprise AnalysisEnterprise Analysis
Enterprise Analysis
Sunil-QA
 
SDLC
SDLCSDLC
SDLC
Sunil-QA
 
Introduction to Business Analysis
Introduction to Business Analysis Introduction to Business Analysis
Introduction to Business Analysis
Sunil-QA
 
Types of Databases
Types of DatabasesTypes of Databases
Types of Databases
Sunil-QA
 
Introduction to UML
Introduction to UMLIntroduction to UML
Introduction to UML
Sunil-QA
 
Stakeholder Analysis
Stakeholder AnalysisStakeholder Analysis
Stakeholder Analysis
Sunil-QA
 
Developing A Business Case
Developing A Business CaseDeveloping A Business Case
Developing A Business Case
Sunil-QA
 
Business Analysis Techniques
Business Analysis TechniquesBusiness Analysis Techniques
Business Analysis Techniques
Sunil-QA
 
Requirement Elicitation Techniques
Requirement Elicitation TechniquesRequirement Elicitation Techniques
Requirement Elicitation Techniques
Sunil-QA
 
Case Study British Airways Stakeholder Analysis
Case Study British Airways Stakeholder AnalysisCase Study British Airways Stakeholder Analysis
Case Study British Airways Stakeholder Analysis
Sunil-QA
 
Introduction to Agile
Introduction to AgileIntroduction to Agile
Introduction to Agile
Sunil-QA
 
Agile User Stories
Agile User StoriesAgile User Stories
Agile User Stories
Sunil-QA
 
Agile - User Stories
Agile - User StoriesAgile - User Stories
Agile - User Stories
Sunil-QA
 
Case Study British Airways Stakeholder Analysis
Case Study British Airways Stakeholder AnalysisCase Study British Airways Stakeholder Analysis
Case Study British Airways Stakeholder Analysis
Sunil-QA
 
Business Analysis Question and Answers
Business Analysis Question and AnswersBusiness Analysis Question and Answers
Business Analysis Question and Answers
Sunil-QA
 
Types of Databases
Types of DatabasesTypes of Databases
Types of Databases
Sunil-QA
 

More from Sunil-QA (20)

Step by Step Guide to Learn SDLC
Step by Step Guide to Learn SDLCStep by Step Guide to Learn SDLC
Step by Step Guide to Learn SDLC
 
Workflow Diagram
Workflow DiagramWorkflow Diagram
Workflow Diagram
 
Business Functional Requirements
Business Functional RequirementsBusiness Functional Requirements
Business Functional Requirements
 
Agile User Stories
Agile  User StoriesAgile  User Stories
Agile User Stories
 
Enterprise Analysis
Enterprise AnalysisEnterprise Analysis
Enterprise Analysis
 
SDLC
SDLCSDLC
SDLC
 
Introduction to Business Analysis
Introduction to Business Analysis Introduction to Business Analysis
Introduction to Business Analysis
 
Types of Databases
Types of DatabasesTypes of Databases
Types of Databases
 
Introduction to UML
Introduction to UMLIntroduction to UML
Introduction to UML
 
Stakeholder Analysis
Stakeholder AnalysisStakeholder Analysis
Stakeholder Analysis
 
Developing A Business Case
Developing A Business CaseDeveloping A Business Case
Developing A Business Case
 
Business Analysis Techniques
Business Analysis TechniquesBusiness Analysis Techniques
Business Analysis Techniques
 
Requirement Elicitation Techniques
Requirement Elicitation TechniquesRequirement Elicitation Techniques
Requirement Elicitation Techniques
 
Case Study British Airways Stakeholder Analysis
Case Study British Airways Stakeholder AnalysisCase Study British Airways Stakeholder Analysis
Case Study British Airways Stakeholder Analysis
 
Introduction to Agile
Introduction to AgileIntroduction to Agile
Introduction to Agile
 
Agile User Stories
Agile User StoriesAgile User Stories
Agile User Stories
 
Agile - User Stories
Agile - User StoriesAgile - User Stories
Agile - User Stories
 
Case Study British Airways Stakeholder Analysis
Case Study British Airways Stakeholder AnalysisCase Study British Airways Stakeholder Analysis
Case Study British Airways Stakeholder Analysis
 
Business Analysis Question and Answers
Business Analysis Question and AnswersBusiness Analysis Question and Answers
Business Analysis Question and Answers
 
Types of Databases
Types of DatabasesTypes of Databases
Types of Databases
 

Recently uploaded

GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
g2nightmarescribd
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 

Recently uploaded (20)

GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 

Database Keys

  • 1. Page 1Classification: Restricted Business Analysis Training Database Keys
  • 2. Page 2Classification: Restricted Agenda • Keys • Candidate Key • Primary Key • Compound Key • Surrogate Key • Foreign Key • Key Notation
  • 3. Page 3Classification: Restricted Keys A key is a field or set of fields whose values uniquely identify a record. In this example, we could use SCN as a key because it uniquely identifies a pupil record. No other pupil can have the same SCN (Scottish Candidate Number). No other fields can uniquely identify each pupil record
  • 4. Page 4Classification: Restricted Candidate Key Any field or set of fields which can be considered as a key is known as a candidate key In this example, both Employee Number and Email are candidate keys, because both can uniquely identify the employee record in the table
  • 5. Page 5Classification: Restricted Primary Key The primary key is the candidate key which is chosen to be used In the example above, it's possible that the company may change the structure of staff email addresses. Given this, it would be better to use Employee Number as a primary key as this is less likely to change. A primary key consisting of only one field is known as an atomic key
  • 6. Page 6Classification: Restricted Compound Key It is possible in some tables that no one column can act as a primary key, and that a combination of columns are required to create the key. This is known as a compound key. Order ID cannot be a primary key as it does not uniquely identify a record Product ID cannot be a primary key as it does not uniquely identify a record
  • 7. Page 7Classification: Restricted Compound Key It is possible in some tables that no one column can act as a primary key, and that a combination of columns are required to create the key. This is known as a compound key. A compound key of Order ID and Product ID could be used because this is unique for each record.
  • 8. Page 8Classification: Restricted Surrogate Key A surrogate key is a special key which has no meaning or purpose other than to uniquely identify each record. Surrogate keys are often a combination of letters and numbers. A new column is created to be the primary key.
  • 9. Page 9Classification: Restricted Surrogate Key A surrogate key is a special key which has no meaning or purpose other than to uniquely identify each record. Surrogate keys are often a combination of letters and numbers. A new column is created to be the primary key. In this example, KTV have been interviewing passers-by for the evening news bulletin. The production team take a note of the interviewee's name and the duration of the interview. As these people are not related to KTV in anyway, a surrogate key must be created in order to uniquely identify them.
  • 10. Page 10Classification: Restricted Surrogate Key A surrogate key is a special key which has no meaning or purpose other than to uniquely identify each record. Surrogate keys are often a combination of letters and numbers. A new column is created to be the primary key. In this example, KTV have been interviewing passers-by for the evening news bulletin. The production team take a note of the interviewee's name and the duration of the interview. As these people are not related to KTV in anyway, a surrogate key must be created in order to uniquely identify them.
  • 11. Page 11Classification: Restricted Foreign Key A foreign key is a column which is added to one table to create a relationship with another table. In this example we have two tables, teachers and departments in a school. But there is no way to see which teacher works in which department.
  • 12. Page 12Classification: Restricted Foreign Key A foreign key is a column which is added to one table to create a relationship with another table. By adding the foreign key Department Code to the Teacher table, we can create a relationship between the two tables.
  • 13. Page 13Classification: Restricted Key Notation We represent primary keys by underlining them. We represent foreign keys with an asterisk.
  • 14. Page 14Classification: Restricted Key Notation We represent primary keys by underlining them. We represent foreign keys with an asterisk. young scot card (card_num, name, expiry_date, photo) pupil (candidate_num, forename, surname, dob, card_num*)
  • 15. Page 15Classification: Restricted Key Notation We represent primary keys by underlining them. We represent foreign keys with an asterisk. pupil (candidate_num, forename, surname, dob, postcode) exam (exam_id, subject, level, duration) result (candidate_num*, exam_id*, grade)
  • 16. Page 16Classification: Restricted Key Notation We represent primary keys by underlining them. We represent foreign keys with an asterisk. movie (movie_id, name, certificate, rating) cinema (cinema_id, city, telephone) screening (cinema*, movie*, date, time)