SlideShare a Scribd company logo
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
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
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.
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.
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.
Key Notation
We represent primary keys by underlining them.
We represent foreign keys with an asterisk.
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*)
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)
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)

More Related Content

What's hot

DBMS: Types of keys
DBMS:  Types of keysDBMS:  Types of keys
DBMS: Types of keys
Bharati Ugale
 
Eer >r.model
Eer >r.modelEer >r.model
Eer >r.modellavya3
 
The Relational Database Model
The Relational Database ModelThe Relational Database Model
The Relational Database Model
Shishir Aryal
 
Database - Entity Relationship Diagram (ERD)
Database - Entity Relationship Diagram (ERD)Database - Entity Relationship Diagram (ERD)
Database - Entity Relationship Diagram (ERD)
Mudasir Qazi
 
Special lecture er diagram
Special lecture er diagramSpecial lecture er diagram
Special lecture er diagram
Niaz Ali
 
Entity relationship diagram for dummies
Entity relationship diagram for dummiesEntity relationship diagram for dummies
Entity relationship diagram for dummies
www.myassignmenthelp.net
 
Dbms keys
Dbms keysDbms keys
Dbms keys
RUpaliLohar
 
Database Keys & Relationship
Database Keys & RelationshipDatabase Keys & Relationship
Database Keys & Relationship
Bellal Hossain
 
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
 
Entity relationship diagram
Entity relationship diagramEntity relationship diagram
Entity relationship diagram
Haseeb
 
A2 long assessment explanation (for anonymous posting)
A2 long assessment explanation (for anonymous posting)A2 long assessment explanation (for anonymous posting)
A2 long assessment explanation (for anonymous posting)
brogdale
 
A2 short assessment explanation (for anonymous posting)
A2 short assessment explanation (for anonymous posting)A2 short assessment explanation (for anonymous posting)
A2 short assessment explanation (for anonymous posting)
brogdale
 
Entity Relationship design issues
Entity Relationship design issuesEntity Relationship design issues
Entity Relationship design issues
Megha Sharma
 
Entity Relationship Diagram2
Entity Relationship Diagram2Entity Relationship Diagram2
Entity Relationship Diagram2
sadeenedian08
 
Entity Relationship Diagram
Entity Relationship DiagramEntity Relationship Diagram
Entity Relationship Diagram
Siti Ismail
 

What's hot (20)

DBMS: Types of keys
DBMS:  Types of keysDBMS:  Types of keys
DBMS: Types of keys
 
Eer >r.model
Eer >r.modelEer >r.model
Eer >r.model
 
RDBMS ERD
RDBMS ERDRDBMS ERD
RDBMS ERD
 
The Relational Database Model
The Relational Database ModelThe Relational Database Model
The Relational Database Model
 
Database - Entity Relationship Diagram (ERD)
Database - Entity Relationship Diagram (ERD)Database - Entity Relationship Diagram (ERD)
Database - Entity Relationship Diagram (ERD)
 
L7 er2
L7 er2L7 er2
L7 er2
 
ExitExamResults
ExitExamResultsExitExamResults
ExitExamResults
 
Special lecture er diagram
Special lecture er diagramSpecial lecture er diagram
Special lecture er diagram
 
Entity relationship diagram for dummies
Entity relationship diagram for dummiesEntity relationship diagram for dummies
Entity relationship diagram for dummies
 
Dbms keys
Dbms keysDbms keys
Dbms keys
 
Database Keys & Relationship
Database Keys & RelationshipDatabase Keys & Relationship
Database Keys & Relationship
 
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)
 
L8 design1
L8 design1L8 design1
L8 design1
 
Entity relationship diagram
Entity relationship diagramEntity relationship diagram
Entity relationship diagram
 
dbms
dbmsdbms
dbms
 
A2 long assessment explanation (for anonymous posting)
A2 long assessment explanation (for anonymous posting)A2 long assessment explanation (for anonymous posting)
A2 long assessment explanation (for anonymous posting)
 
A2 short assessment explanation (for anonymous posting)
A2 short assessment explanation (for anonymous posting)A2 short assessment explanation (for anonymous posting)
A2 short assessment explanation (for anonymous posting)
 
Entity Relationship design issues
Entity Relationship design issuesEntity Relationship design issues
Entity Relationship design issues
 
Entity Relationship Diagram2
Entity Relationship Diagram2Entity Relationship Diagram2
Entity Relationship Diagram2
 
Entity Relationship Diagram
Entity Relationship DiagramEntity Relationship Diagram
Entity Relationship Diagram
 

Viewers also liked

National 5 Computing Science - Fetch Execute Cycle
National 5 Computing Science - Fetch Execute CycleNational 5 Computing Science - Fetch Execute Cycle
National 5 Computing Science - Fetch Execute Cycle
Forrester High School
 
N5 Computing Science - Machine Code
N5 Computing Science - Machine CodeN5 Computing Science - Machine Code
N5 Computing Science - Machine Code
Forrester High School
 
SD & D Vector Graphics
SD & D Vector GraphicsSD & D Vector Graphics
SD & D Vector Graphics
Forrester High School
 
N5 ISDD Testing
N5 ISDD TestingN5 ISDD Testing
N5 ISDD Testing
Forrester High School
 
N5 ISDD Hardware Requirements
N5 ISDD Hardware RequirementsN5 ISDD Hardware Requirements
N5 ISDD Hardware Requirements
Forrester High School
 
ISDD Database Structure N5
ISDD Database Structure N5ISDD Database Structure N5
ISDD Database Structure N5
Forrester High School
 
Field Types
Field TypesField Types
ISDD Environmental Impact
ISDD Environmental ImpactISDD Environmental Impact
ISDD Environmental Impact
Forrester High School
 
ISDD User Interface
ISDD User InterfaceISDD User Interface
ISDD User Interface
Forrester High School
 
ISDD Networking & Connectivity
ISDD Networking & ConnectivityISDD Networking & Connectivity
ISDD Networking & Connectivity
Forrester High School
 
ISDD Standard File Formats
ISDD Standard File FormatsISDD Standard File Formats
ISDD Standard File Formats
Forrester High School
 
Purpose, features and functionality
Purpose, features and functionalityPurpose, features and functionality
Purpose, features and functionality
Forrester High School
 

Viewers also liked (12)

National 5 Computing Science - Fetch Execute Cycle
National 5 Computing Science - Fetch Execute CycleNational 5 Computing Science - Fetch Execute Cycle
National 5 Computing Science - Fetch Execute Cycle
 
N5 Computing Science - Machine Code
N5 Computing Science - Machine CodeN5 Computing Science - Machine Code
N5 Computing Science - Machine Code
 
SD & D Vector Graphics
SD & D Vector GraphicsSD & D Vector Graphics
SD & D Vector Graphics
 
N5 ISDD Testing
N5 ISDD TestingN5 ISDD Testing
N5 ISDD Testing
 
N5 ISDD Hardware Requirements
N5 ISDD Hardware RequirementsN5 ISDD Hardware Requirements
N5 ISDD Hardware Requirements
 
ISDD Database Structure N5
ISDD Database Structure N5ISDD Database Structure N5
ISDD Database Structure N5
 
Field Types
Field TypesField Types
Field Types
 
ISDD Environmental Impact
ISDD Environmental ImpactISDD Environmental Impact
ISDD Environmental Impact
 
ISDD User Interface
ISDD User InterfaceISDD User Interface
ISDD User Interface
 
ISDD Networking & Connectivity
ISDD Networking & ConnectivityISDD Networking & Connectivity
ISDD Networking & Connectivity
 
ISDD Standard File Formats
ISDD Standard File FormatsISDD Standard File Formats
ISDD Standard File Formats
 
Purpose, features and functionality
Purpose, features and functionalityPurpose, features and functionality
Purpose, features and functionality
 

Similar to ISDD Database Keys N5

Database Keys
Database KeysDatabase Keys
Database Keys
Forrester High School
 
Keys in DBMS
Keys in DBMSKeys in DBMS
Keys in DBMS
Pyingkodi Maran
 
Keys in Database
Keys in DatabaseKeys in Database
Keys in Database
A. S. M. Shafi
 
Presentation OF DBMS-2.pptx
Presentation OF DBMS-2.pptxPresentation OF DBMS-2.pptx
Presentation OF DBMS-2.pptx
ShumailaSajjad
 
Database Keys
Database KeysDatabase Keys
Database Keys
Sunil-QA
 
Doc 20191022-wa0041
Doc 20191022-wa0041Doc 20191022-wa0041
Doc 20191022-wa0041
university of Gujrat, pakistan
 
DBMS-Unit-2.pptx
DBMS-Unit-2.pptxDBMS-Unit-2.pptx
DBMS-Unit-2.pptx
Abhinayacheekati
 
B & c
B & cB & c
Whats the Schema Table Column Row Attribute Entity Pri.pdf
Whats the Schema  Table  Column  Row  Attribute  Entity  Pri.pdfWhats the Schema  Table  Column  Row  Attribute  Entity  Pri.pdf
Whats the Schema Table Column Row Attribute Entity Pri.pdf
exxonzone
 
DBMS Unit 2 ppt.ppt
DBMS Unit 2 ppt.pptDBMS Unit 2 ppt.ppt
DBMS Unit 2 ppt.ppt
PraveenS761061
 
FD.pdf
FD.pdfFD.pdf
FD.pdf
BijayNag1
 
2. Relational_Data_Model_Keys_10b.pptx
2. Relational_Data_Model_Keys_10b.pptx2. Relational_Data_Model_Keys_10b.pptx
2. Relational_Data_Model_Keys_10b.pptx
vidyahulkman
 
Module 2 dbms.pptx
Module 2 dbms.pptxModule 2 dbms.pptx
Module 2 dbms.pptx
VijishK
 
Database and Math Relations
Database and Math RelationsDatabase and Math Relations
Database and Math Relations
Prof Ansari
 
ER diagram
ER diagramER diagram
ER diagram
mitalimaniyar
 
Database Assignment
Database AssignmentDatabase Assignment
Database Assignment
Jayed Imran
 
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
 
Types of keys dbms
Types of keys dbmsTypes of keys dbms
Types of keys dbms
Surkhab Shelly
 
Relational model
Relational modelRelational model
Relational modelJihin Raju
 
Relational model
Relational modelRelational model
Relational modelJihin Raju
 

Similar to ISDD Database Keys N5 (20)

Database Keys
Database KeysDatabase Keys
Database Keys
 
Keys in DBMS
Keys in DBMSKeys in DBMS
Keys in DBMS
 
Keys in Database
Keys in DatabaseKeys in Database
Keys in Database
 
Presentation OF DBMS-2.pptx
Presentation OF DBMS-2.pptxPresentation OF DBMS-2.pptx
Presentation OF DBMS-2.pptx
 
Database Keys
Database KeysDatabase Keys
Database Keys
 
Doc 20191022-wa0041
Doc 20191022-wa0041Doc 20191022-wa0041
Doc 20191022-wa0041
 
DBMS-Unit-2.pptx
DBMS-Unit-2.pptxDBMS-Unit-2.pptx
DBMS-Unit-2.pptx
 
B & c
B & cB & c
B & c
 
Whats the Schema Table Column Row Attribute Entity Pri.pdf
Whats the Schema  Table  Column  Row  Attribute  Entity  Pri.pdfWhats the Schema  Table  Column  Row  Attribute  Entity  Pri.pdf
Whats the Schema Table Column Row Attribute Entity Pri.pdf
 
DBMS Unit 2 ppt.ppt
DBMS Unit 2 ppt.pptDBMS Unit 2 ppt.ppt
DBMS Unit 2 ppt.ppt
 
FD.pdf
FD.pdfFD.pdf
FD.pdf
 
2. Relational_Data_Model_Keys_10b.pptx
2. Relational_Data_Model_Keys_10b.pptx2. Relational_Data_Model_Keys_10b.pptx
2. Relational_Data_Model_Keys_10b.pptx
 
Module 2 dbms.pptx
Module 2 dbms.pptxModule 2 dbms.pptx
Module 2 dbms.pptx
 
Database and Math Relations
Database and Math RelationsDatabase and Math Relations
Database and Math Relations
 
ER diagram
ER diagramER diagram
ER diagram
 
Database Assignment
Database AssignmentDatabase Assignment
Database Assignment
 
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
 
Types of keys dbms
Types of keys dbmsTypes of keys dbms
Types of keys dbms
 
Relational model
Relational modelRelational model
Relational model
 
Relational model
Relational modelRelational model
Relational model
 

More from Forrester High School

Program Design
Program DesignProgram Design
Program Design
Forrester High School
 
Database Evaluation
Database EvaluationDatabase Evaluation
Database Evaluation
Forrester High School
 
Testing SQL
Testing SQLTesting SQL
SQL
SQLSQL
Database Query Design
Database Query DesignDatabase Query Design
Database Query Design
Forrester High School
 
Data Dictionary
Data DictionaryData Dictionary
Data Dictionary
Forrester High School
 
Compound Keys
Compound KeysCompound Keys
Compound Keys
Forrester High School
 
Entity Occurrence Diagrams
Entity Occurrence DiagramsEntity Occurrence Diagrams
Entity Occurrence Diagrams
Forrester High School
 
Entity Relationship Diagrams
Entity Relationship DiagramsEntity Relationship Diagrams
Entity Relationship Diagrams
Forrester High School
 
Database Analysis
Database AnalysisDatabase Analysis
Database Analysis
Forrester High School
 
Software Evaluation
Software EvaluationSoftware Evaluation
Software Evaluation
Forrester High School
 
Software Testing
Software TestingSoftware Testing
Software Testing
Forrester High School
 
Standard Algorithms
Standard AlgorithmsStandard Algorithms
Standard Algorithms
Forrester High School
 
File Handling
File HandlingFile Handling
File Handling
Forrester High School
 
Python Predefined Functions
Python Predefined FunctionsPython Predefined Functions
Python Predefined Functions
Forrester High School
 
Python Substrings
Python SubstringsPython Substrings
Python Substrings
Forrester High School
 
Variable Scope
Variable ScopeVariable Scope
Variable Scope
Forrester High School
 
Sub-programs
Sub-programsSub-programs
Sub-programs
Forrester High School
 
Records in Python
Records in PythonRecords in Python
Records in Python
Forrester High School
 
Parallel arrays in python
Parallel arrays in pythonParallel arrays in python
Parallel arrays in python
Forrester High School
 

More from Forrester High School (20)

Program Design
Program DesignProgram Design
Program Design
 
Database Evaluation
Database EvaluationDatabase Evaluation
Database Evaluation
 
Testing SQL
Testing SQLTesting SQL
Testing SQL
 
SQL
SQLSQL
SQL
 
Database Query Design
Database Query DesignDatabase Query Design
Database Query Design
 
Data Dictionary
Data DictionaryData Dictionary
Data Dictionary
 
Compound Keys
Compound KeysCompound Keys
Compound Keys
 
Entity Occurrence Diagrams
Entity Occurrence DiagramsEntity Occurrence Diagrams
Entity Occurrence Diagrams
 
Entity Relationship Diagrams
Entity Relationship DiagramsEntity Relationship Diagrams
Entity Relationship Diagrams
 
Database Analysis
Database AnalysisDatabase Analysis
Database Analysis
 
Software Evaluation
Software EvaluationSoftware Evaluation
Software Evaluation
 
Software Testing
Software TestingSoftware Testing
Software Testing
 
Standard Algorithms
Standard AlgorithmsStandard Algorithms
Standard Algorithms
 
File Handling
File HandlingFile Handling
File Handling
 
Python Predefined Functions
Python Predefined FunctionsPython Predefined Functions
Python Predefined Functions
 
Python Substrings
Python SubstringsPython Substrings
Python Substrings
 
Variable Scope
Variable ScopeVariable Scope
Variable Scope
 
Sub-programs
Sub-programsSub-programs
Sub-programs
 
Records in Python
Records in PythonRecords in Python
Records in Python
 
Parallel arrays in python
Parallel arrays in pythonParallel arrays in python
Parallel arrays in python
 

Recently uploaded

Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
Peter Windle
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
Normal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of LabourNormal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of Labour
Wasim Ak
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
Scholarhat
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
Atul Kumar Singh
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
thanhdowork
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
Balvir Singh
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
Nguyen Thanh Tu Collection
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
Multithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race conditionMultithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race condition
Mohammed Sikander
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
Vikramjit Singh
 
Chapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdfChapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdf
Kartik Tiwari
 

Recently uploaded (20)

Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
Normal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of LabourNormal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of Labour
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
Multithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race conditionMultithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race condition
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
 
Chapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdfChapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdf
 

ISDD Database Keys N5

  • 1.
  • 2. 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
  • 3. 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
  • 4. 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.
  • 5. 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.
  • 6. 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.
  • 7. Key Notation We represent primary keys by underlining them. We represent foreign keys with an asterisk.
  • 8. 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*)
  • 9. 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)
  • 10. 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)