SlideShare une entreprise Scribd logo
1  sur  9
Subject Name Code Credit Hours
Database System COMP 219 3
Chapter V
Subject Name Code Credit Hours
Database System COMP 219 3
Keys
• It is used to uniquely identify entities within a
given entityset or a relationship set.
• Keys in Entity set:
• (i) Primary Key:
– It is a key used to uniquely identify an entity in the
entity set.
– E,g, eno,rno,dno etc…
Subject Name Code Credit Hours
Database System COMP 219 3
Keys
• Super Key:
• It is a set of one or more attributes that
allow us to uniquely identify an entity in the
entity set. Among them one must be a
primary key attribute.
• E.G.. Eid (primary key) and ename together
can be identify an entity in entity set.
Subject Name Code Credit Hours
Database System COMP 219 3
Keys
• Candidate key:
• They are minimal super keys for which no proper
subset is a superkey.
• E.g.. Ename and eaddr can be sufficient to identify an
employee in employee set.
• {eid} and {ename,eaddr} – Candidate keys
Subject Name Code Credit Hours
Database System COMP 219 3
FOREIGN -----------------------Keys
• An attribute which makes a reference to an
attribute of another entity type is called
foreign key
Subject Name Code Credit Hours
Database System COMP 219 3
Key
 E.g…
eid Ename eaddr dno
dnamedno dloc
Employee – E1
Dept – E2
Foreign Ke
Subject Name Code Credit Hours
Database System COMP 219 3
Domain
• A range of values can be defined for an
attribute and is called as Domain of that attribute.
• E.g.. Age – attribute A
• Domain (A)= {1,2,….100}
Subject Name Code Credit Hours
Database System COMP 219 3
Keys in Relationship set:
• Case 1: If the relationship set R has no
attributes, then the set of attributes
Primarykey(E1) U Primarykey(E2) U
Primarykey (n)
Case2: If the relationship set R has attributes,
then the set of attributes,
Subject Name Code Credit Hours
Database System COMP 219 3
Keys in Relationship set
Primarykey(E1) U Primarykey(E2) U Primarykey
(n)U{a1,a2,…an}
describes an individual relationship in set R.
In both cases,
Primarykey(E1) U Primarykey(E2) U Primarykey (n)
forms a superkey for a relationship set.

Contenu connexe

En vedette

Software engineering Questions and Answers
Software engineering Questions and AnswersSoftware engineering Questions and Answers
Software engineering Questions and Answers
Bala Ganesh
 
Money Market Ppt
Money Market PptMoney Market Ppt
Money Market Ppt
shael_kumar
 
Money market & its instruments
Money market & its instrumentsMoney market & its instruments
Money market & its instruments
abhishek rane
 
money market and capital market
money market and capital marketmoney market and capital market
money market and capital market
Prateek Nepal
 

En vedette (15)

Consumer Awareness
Consumer AwarenessConsumer Awareness
Consumer Awareness
 
Software engineering Questions and Answers
Software engineering Questions and AnswersSoftware engineering Questions and Answers
Software engineering Questions and Answers
 
Final project on Capital Market
Final project on Capital MarketFinal project on Capital Market
Final project on Capital Market
 
CONSUMER AWARENES PPT
CONSUMER AWARENES PPTCONSUMER AWARENES PPT
CONSUMER AWARENES PPT
 
Cocomo model
Cocomo modelCocomo model
Cocomo model
 
Money Market Ppt
Money Market PptMoney Market Ppt
Money Market Ppt
 
Money market & Capital market
Money market & Capital marketMoney market & Capital market
Money market & Capital market
 
Capital Market
Capital MarketCapital Market
Capital Market
 
Capital market ppt
Capital market pptCapital market ppt
Capital market ppt
 
Capital market ppt
Capital market pptCapital market ppt
Capital market ppt
 
Money market & its instruments
Money market & its instrumentsMoney market & its instruments
Money market & its instruments
 
Cocomo model
Cocomo modelCocomo model
Cocomo model
 
instruments of Money market and capital market
instruments of Money market and capital marketinstruments of Money market and capital market
instruments of Money market and capital market
 
money market and capital market
money market and capital marketmoney market and capital market
money market and capital market
 
Consumer awareness
Consumer awarenessConsumer awareness
Consumer awareness
 

Similaire à Dbms chapter v

"Python Dictionary: The Key to Efficient Data Storage, Manipulation, and Vers...
"Python Dictionary: The Key to Efficient Data Storage, Manipulation, and Vers..."Python Dictionary: The Key to Efficient Data Storage, Manipulation, and Vers...
"Python Dictionary: The Key to Efficient Data Storage, Manipulation, and Vers...
ZainabHaneen
 
Free video lectures for mca
Free video lectures for mcaFree video lectures for mca
Free video lectures for mca
Edhole.com
 
Exploiting web search engines to search structured
Exploiting web search engines to search structuredExploiting web search engines to search structured
Exploiting web search engines to search structured
Nita Pawar
 
lecture2.ppt
lecture2.pptlecture2.ppt
lecture2.ppt
ImXaib
 

Similaire à Dbms chapter v (20)

Dmbs chapter vi
Dmbs chapter viDmbs chapter vi
Dmbs chapter vi
 
ER Modeling.ppt
ER Modeling.pptER Modeling.ppt
ER Modeling.ppt
 
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
 
Sameer
SameerSameer
Sameer
 
"Python Dictionary: The Key to Efficient Data Storage, Manipulation, and Vers...
"Python Dictionary: The Key to Efficient Data Storage, Manipulation, and Vers..."Python Dictionary: The Key to Efficient Data Storage, Manipulation, and Vers...
"Python Dictionary: The Key to Efficient Data Storage, Manipulation, and Vers...
 
Free video lectures for mca
Free video lectures for mcaFree video lectures for mca
Free video lectures for mca
 
ER diagram slides for datanase stujdy-1.pdf
ER diagram slides for datanase stujdy-1.pdfER diagram slides for datanase stujdy-1.pdf
ER diagram slides for datanase stujdy-1.pdf
 
ER Digramms by Harshal wagh
ER Digramms by Harshal waghER Digramms by Harshal wagh
ER Digramms by Harshal wagh
 
Summary data modelling
Summary data modellingSummary data modelling
Summary data modelling
 
Exploiting web search engines to search structured
Exploiting web search engines to search structuredExploiting web search engines to search structured
Exploiting web search engines to search structured
 
DBMS Notes: DDL DML DCL
DBMS Notes: DDL DML DCLDBMS Notes: DDL DML DCL
DBMS Notes: DDL DML DCL
 
Relational Model on Database management PPT
Relational Model on Database management PPTRelational Model on Database management PPT
Relational Model on Database management PPT
 
ikd312-03-design
ikd312-03-designikd312-03-design
ikd312-03-design
 
Unit 02 dbms
Unit 02 dbmsUnit 02 dbms
Unit 02 dbms
 
Python
PythonPython
Python
 
Handout#09
Handout#09Handout#09
Handout#09
 
Unit 04 dbms
Unit 04 dbmsUnit 04 dbms
Unit 04 dbms
 
lecture2.ppt
lecture2.pptlecture2.ppt
lecture2.ppt
 
lecture2.ppt
lecture2.pptlecture2.ppt
lecture2.ppt
 
Dictionaries.pptx
Dictionaries.pptxDictionaries.pptx
Dictionaries.pptx
 

Plus de Bala Ganesh

Dbms chapter iii
Dbms chapter iiiDbms chapter iii
Dbms chapter iii
Bala Ganesh
 
Flip flop& RAM ROM
Flip flop& RAM ROMFlip flop& RAM ROM
Flip flop& RAM ROM
Bala Ganesh
 
Chap iii-Logic Gates
Chap iii-Logic GatesChap iii-Logic Gates
Chap iii-Logic Gates
Bala Ganesh
 
Chap ii.BCD code,Gray code
Chap ii.BCD code,Gray codeChap ii.BCD code,Gray code
Chap ii.BCD code,Gray code
Bala Ganesh
 
Software testing
Software testingSoftware testing
Software testing
Bala Ganesh
 
Software Requirements
Software RequirementsSoftware Requirements
Software Requirements
Bala Ganesh
 
Comp 111chp iv vi
Comp 111chp iv viComp 111chp iv vi
Comp 111chp iv vi
Bala Ganesh
 
Comp 107cep iii,iv,v
Comp 107cep iii,iv,vComp 107cep iii,iv,v
Comp 107cep iii,iv,v
Bala Ganesh
 
Wdf 222chp iii vi
Wdf 222chp iii viWdf 222chp iii vi
Wdf 222chp iii vi
Bala Ganesh
 
Ch03-Software Engineering Model
Ch03-Software Engineering ModelCh03-Software Engineering Model
Ch03-Software Engineering Model
Bala Ganesh
 

Plus de Bala Ganesh (20)

Dbms chapter iii
Dbms chapter iiiDbms chapter iii
Dbms chapter iii
 
Dbms chapter ii
Dbms chapter iiDbms chapter ii
Dbms chapter ii
 
Flip flop& RAM ROM
Flip flop& RAM ROMFlip flop& RAM ROM
Flip flop& RAM ROM
 
karnaugh maps
karnaugh mapskarnaugh maps
karnaugh maps
 
Chap iii-Logic Gates
Chap iii-Logic GatesChap iii-Logic Gates
Chap iii-Logic Gates
 
Chap ii.BCD code,Gray code
Chap ii.BCD code,Gray codeChap ii.BCD code,Gray code
Chap ii.BCD code,Gray code
 
DEL-244Chep i
DEL-244Chep iDEL-244Chep i
DEL-244Chep i
 
Software testing
Software testingSoftware testing
Software testing
 
Design
DesignDesign
Design
 
Comp 107 cep 8
Comp 107 cep 8Comp 107 cep 8
Comp 107 cep 8
 
Comp 107 cep 7
Comp 107 cep 7Comp 107 cep 7
Comp 107 cep 7
 
Software Requirements
Software RequirementsSoftware Requirements
Software Requirements
 
Comp107 chep6
Comp107 chep6Comp107 chep6
Comp107 chep6
 
Comp 111chp iv vi
Comp 111chp iv viComp 111chp iv vi
Comp 111chp iv vi
 
Comp 111 cep ii
Comp 111 cep iiComp 111 cep ii
Comp 111 cep ii
 
Comp 107cep iii,iv,v
Comp 107cep iii,iv,vComp 107cep iii,iv,v
Comp 107cep iii,iv,v
 
Wdf 222chp iii vi
Wdf 222chp iii viWdf 222chp iii vi
Wdf 222chp iii vi
 
Wdf222 cep ii
Wdf222 cep iiWdf222 cep ii
Wdf222 cep ii
 
Wdf22chp 1
Wdf22chp 1Wdf22chp 1
Wdf22chp 1
 
Ch03-Software Engineering Model
Ch03-Software Engineering ModelCh03-Software Engineering Model
Ch03-Software Engineering Model
 

Dernier

Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
Chris Hunter
 

Dernier (20)

Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Asian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptxAsian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptx
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-IIFood Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
 

Dbms chapter v

  • 1. Subject Name Code Credit Hours Database System COMP 219 3 Chapter V
  • 2. Subject Name Code Credit Hours Database System COMP 219 3 Keys • It is used to uniquely identify entities within a given entityset or a relationship set. • Keys in Entity set: • (i) Primary Key: – It is a key used to uniquely identify an entity in the entity set. – E,g, eno,rno,dno etc…
  • 3. Subject Name Code Credit Hours Database System COMP 219 3 Keys • Super Key: • It is a set of one or more attributes that allow us to uniquely identify an entity in the entity set. Among them one must be a primary key attribute. • E.G.. Eid (primary key) and ename together can be identify an entity in entity set.
  • 4. Subject Name Code Credit Hours Database System COMP 219 3 Keys • Candidate key: • They are minimal super keys for which no proper subset is a superkey. • E.g.. Ename and eaddr can be sufficient to identify an employee in employee set. • {eid} and {ename,eaddr} – Candidate keys
  • 5. Subject Name Code Credit Hours Database System COMP 219 3 FOREIGN -----------------------Keys • An attribute which makes a reference to an attribute of another entity type is called foreign key
  • 6. Subject Name Code Credit Hours Database System COMP 219 3 Key  E.g… eid Ename eaddr dno dnamedno dloc Employee – E1 Dept – E2 Foreign Ke
  • 7. Subject Name Code Credit Hours Database System COMP 219 3 Domain • A range of values can be defined for an attribute and is called as Domain of that attribute. • E.g.. Age – attribute A • Domain (A)= {1,2,….100}
  • 8. Subject Name Code Credit Hours Database System COMP 219 3 Keys in Relationship set: • Case 1: If the relationship set R has no attributes, then the set of attributes Primarykey(E1) U Primarykey(E2) U Primarykey (n) Case2: If the relationship set R has attributes, then the set of attributes,
  • 9. Subject Name Code Credit Hours Database System COMP 219 3 Keys in Relationship set Primarykey(E1) U Primarykey(E2) U Primarykey (n)U{a1,a2,…an} describes an individual relationship in set R. In both cases, Primarykey(E1) U Primarykey(E2) U Primarykey (n) forms a superkey for a relationship set.