SlideShare a Scribd company logo
1. Suppose that for an entity E, there are two candidate keys, A and B. If we make A the primary
key, what should we do with B
a) make it a SERIAL field
b) just treat it like a regular attribute
c) use the UNIQUE constraint
d) use the NOT NULL constraint
2.
Suppose we have the following relational model:
Movie(mov_id(PK), title, yr)
Person(pid(PK), fname, lname, gender)
Acts_In(actor_id(PFK), movie_id(PFK), role) -- actor_id references Person, movie_id references
Movie
What would be true of the following query?
SELECT title, yr
FROM Movie m
WHERE NOT EXISTS
(SELECT *
FROM Movie m2
WHERE m1.title = m2.title)
a )Movies with an empty string title
b) Movies where no other movie has the same title
c) Movies where at least one other movie has the same title
d) Movies with a null title
1- Suppose that for an entity E- there are two candidate keys- A and B.pdf

More Related Content

More from StevenLCvWalkera

1- What do you think is really bothering the workers- 2- What kinds.pdf
1- What do you think is really bothering the workers-    2- What kinds.pdf1- What do you think is really bothering the workers-    2- What kinds.pdf
1- What do you think is really bothering the workers- 2- What kinds.pdf
StevenLCvWalkera
 
1- What are the main data sources for the COVID-19 data collection- In.pdf
1- What are the main data sources for the COVID-19 data collection- In.pdf1- What are the main data sources for the COVID-19 data collection- In.pdf
1- What are the main data sources for the COVID-19 data collection- In.pdf
StevenLCvWalkera
 
1- what are the different types of economy-2- Research about Adam Smit.pdf
1- what are the different types of economy-2- Research about Adam Smit.pdf1- what are the different types of economy-2- Research about Adam Smit.pdf
1- what are the different types of economy-2- Research about Adam Smit.pdf
StevenLCvWalkera
 
1- Understanding the implications of taxes on welfare The following gr.pdf
1- Understanding the implications of taxes on welfare The following gr.pdf1- Understanding the implications of taxes on welfare The following gr.pdf
1- Understanding the implications of taxes on welfare The following gr.pdf
StevenLCvWalkera
 
1- The SRY gene in the Y chromosome controls the development of many c.pdf
1- The SRY gene in the Y chromosome controls the development of many c.pdf1- The SRY gene in the Y chromosome controls the development of many c.pdf
1- The SRY gene in the Y chromosome controls the development of many c.pdf
StevenLCvWalkera
 
1- The oldest portions of any crystal- which formed first- are found _.pdf
1- The oldest portions of any crystal- which formed first- are found _.pdf1- The oldest portions of any crystal- which formed first- are found _.pdf
1- The oldest portions of any crystal- which formed first- are found _.pdf
StevenLCvWalkera
 
1- The similarities in the mitochondrial DNA and some proteobacteria i.pdf
1- The similarities in the mitochondrial DNA and some proteobacteria i.pdf1- The similarities in the mitochondrial DNA and some proteobacteria i.pdf
1- The similarities in the mitochondrial DNA and some proteobacteria i.pdf
StevenLCvWalkera
 
1- The most common nosocomial infection in patients admitted to the ho.pdf
1- The most common nosocomial infection in patients admitted to the ho.pdf1- The most common nosocomial infection in patients admitted to the ho.pdf
1- The most common nosocomial infection in patients admitted to the ho.pdf
StevenLCvWalkera
 
1- The leg wrappings of the Barbarians for warmth- combined with the t.pdf
1- The leg wrappings of the Barbarians for warmth- combined with the t.pdf1- The leg wrappings of the Barbarians for warmth- combined with the t.pdf
1- The leg wrappings of the Barbarians for warmth- combined with the t.pdf
StevenLCvWalkera
 
1- The Company database attaches each Dependent to exactly one Employe.pdf
1- The Company database attaches each Dependent to exactly one Employe.pdf1- The Company database attaches each Dependent to exactly one Employe.pdf
1- The Company database attaches each Dependent to exactly one Employe.pdf
StevenLCvWalkera
 
1- The cells responsible for making inhibin are- (be specific-male AND.pdf
1- The cells responsible for making inhibin are- (be specific-male AND.pdf1- The cells responsible for making inhibin are- (be specific-male AND.pdf
1- The cells responsible for making inhibin are- (be specific-male AND.pdf
StevenLCvWalkera
 
1- the arterial system has one of these- the venous system has two Key.pdf
1- the arterial system has one of these- the venous system has two Key.pdf1- the arterial system has one of these- the venous system has two Key.pdf
1- the arterial system has one of these- the venous system has two Key.pdf
StevenLCvWalkera
 
1- Suppose we let imports be a positive function of Y- That would mak.pdf
1- Suppose we let imports be a positive function of Y-  That would mak.pdf1- Suppose we let imports be a positive function of Y-  That would mak.pdf
1- Suppose we let imports be a positive function of Y- That would mak.pdf
StevenLCvWalkera
 
1- Show that L-{anbm-n-m} is a deterministic context-free language-.pdf
1- Show that L-{anbm-n-m} is a deterministic context-free language-.pdf1- Show that L-{anbm-n-m} is a deterministic context-free language-.pdf
1- Show that L-{anbm-n-m} is a deterministic context-free language-.pdf
StevenLCvWalkera
 
1- Select two organizations- which could include the University of Can.pdf
1- Select two organizations- which could include the University of Can.pdf1- Select two organizations- which could include the University of Can.pdf
1- Select two organizations- which could include the University of Can.pdf
StevenLCvWalkera
 
1- Prepgre an income statemert-1- Prepare an income statement-fimen-ma.pdf
1- Prepgre an income statemert-1- Prepare an income statement-fimen-ma.pdf1- Prepgre an income statemert-1- Prepare an income statement-fimen-ma.pdf
1- Prepgre an income statemert-1- Prepare an income statement-fimen-ma.pdf
StevenLCvWalkera
 
1- One way to verify if a system is attacked by a brute-force attack i.pdf
1- One way to verify if a system is attacked by a brute-force attack i.pdf1- One way to verify if a system is attacked by a brute-force attack i.pdf
1- One way to verify if a system is attacked by a brute-force attack i.pdf
StevenLCvWalkera
 
1- One goal of Picchi's book on the Bakairi Indians is Group of answer.pdf
1- One goal of Picchi's book on the Bakairi Indians is Group of answer.pdf1- One goal of Picchi's book on the Bakairi Indians is Group of answer.pdf
1- One goal of Picchi's book on the Bakairi Indians is Group of answer.pdf
StevenLCvWalkera
 
1- Fully compare and contrast Nitrogen and Phosphorus as water quality.pdf
1- Fully compare and contrast Nitrogen and Phosphorus as water quality.pdf1- Fully compare and contrast Nitrogen and Phosphorus as water quality.pdf
1- Fully compare and contrast Nitrogen and Phosphorus as water quality.pdf
StevenLCvWalkera
 
1- Nathaniel was injured in a hunting accident during which a bullet s.pdf
1- Nathaniel was injured in a hunting accident during which a bullet s.pdf1- Nathaniel was injured in a hunting accident during which a bullet s.pdf
1- Nathaniel was injured in a hunting accident during which a bullet s.pdf
StevenLCvWalkera
 

More from StevenLCvWalkera (20)

1- What do you think is really bothering the workers- 2- What kinds.pdf
1- What do you think is really bothering the workers-    2- What kinds.pdf1- What do you think is really bothering the workers-    2- What kinds.pdf
1- What do you think is really bothering the workers- 2- What kinds.pdf
 
1- What are the main data sources for the COVID-19 data collection- In.pdf
1- What are the main data sources for the COVID-19 data collection- In.pdf1- What are the main data sources for the COVID-19 data collection- In.pdf
1- What are the main data sources for the COVID-19 data collection- In.pdf
 
1- what are the different types of economy-2- Research about Adam Smit.pdf
1- what are the different types of economy-2- Research about Adam Smit.pdf1- what are the different types of economy-2- Research about Adam Smit.pdf
1- what are the different types of economy-2- Research about Adam Smit.pdf
 
1- Understanding the implications of taxes on welfare The following gr.pdf
1- Understanding the implications of taxes on welfare The following gr.pdf1- Understanding the implications of taxes on welfare The following gr.pdf
1- Understanding the implications of taxes on welfare The following gr.pdf
 
1- The SRY gene in the Y chromosome controls the development of many c.pdf
1- The SRY gene in the Y chromosome controls the development of many c.pdf1- The SRY gene in the Y chromosome controls the development of many c.pdf
1- The SRY gene in the Y chromosome controls the development of many c.pdf
 
1- The oldest portions of any crystal- which formed first- are found _.pdf
1- The oldest portions of any crystal- which formed first- are found _.pdf1- The oldest portions of any crystal- which formed first- are found _.pdf
1- The oldest portions of any crystal- which formed first- are found _.pdf
 
1- The similarities in the mitochondrial DNA and some proteobacteria i.pdf
1- The similarities in the mitochondrial DNA and some proteobacteria i.pdf1- The similarities in the mitochondrial DNA and some proteobacteria i.pdf
1- The similarities in the mitochondrial DNA and some proteobacteria i.pdf
 
1- The most common nosocomial infection in patients admitted to the ho.pdf
1- The most common nosocomial infection in patients admitted to the ho.pdf1- The most common nosocomial infection in patients admitted to the ho.pdf
1- The most common nosocomial infection in patients admitted to the ho.pdf
 
1- The leg wrappings of the Barbarians for warmth- combined with the t.pdf
1- The leg wrappings of the Barbarians for warmth- combined with the t.pdf1- The leg wrappings of the Barbarians for warmth- combined with the t.pdf
1- The leg wrappings of the Barbarians for warmth- combined with the t.pdf
 
1- The Company database attaches each Dependent to exactly one Employe.pdf
1- The Company database attaches each Dependent to exactly one Employe.pdf1- The Company database attaches each Dependent to exactly one Employe.pdf
1- The Company database attaches each Dependent to exactly one Employe.pdf
 
1- The cells responsible for making inhibin are- (be specific-male AND.pdf
1- The cells responsible for making inhibin are- (be specific-male AND.pdf1- The cells responsible for making inhibin are- (be specific-male AND.pdf
1- The cells responsible for making inhibin are- (be specific-male AND.pdf
 
1- the arterial system has one of these- the venous system has two Key.pdf
1- the arterial system has one of these- the venous system has two Key.pdf1- the arterial system has one of these- the venous system has two Key.pdf
1- the arterial system has one of these- the venous system has two Key.pdf
 
1- Suppose we let imports be a positive function of Y- That would mak.pdf
1- Suppose we let imports be a positive function of Y-  That would mak.pdf1- Suppose we let imports be a positive function of Y-  That would mak.pdf
1- Suppose we let imports be a positive function of Y- That would mak.pdf
 
1- Show that L-{anbm-n-m} is a deterministic context-free language-.pdf
1- Show that L-{anbm-n-m} is a deterministic context-free language-.pdf1- Show that L-{anbm-n-m} is a deterministic context-free language-.pdf
1- Show that L-{anbm-n-m} is a deterministic context-free language-.pdf
 
1- Select two organizations- which could include the University of Can.pdf
1- Select two organizations- which could include the University of Can.pdf1- Select two organizations- which could include the University of Can.pdf
1- Select two organizations- which could include the University of Can.pdf
 
1- Prepgre an income statemert-1- Prepare an income statement-fimen-ma.pdf
1- Prepgre an income statemert-1- Prepare an income statement-fimen-ma.pdf1- Prepgre an income statemert-1- Prepare an income statement-fimen-ma.pdf
1- Prepgre an income statemert-1- Prepare an income statement-fimen-ma.pdf
 
1- One way to verify if a system is attacked by a brute-force attack i.pdf
1- One way to verify if a system is attacked by a brute-force attack i.pdf1- One way to verify if a system is attacked by a brute-force attack i.pdf
1- One way to verify if a system is attacked by a brute-force attack i.pdf
 
1- One goal of Picchi's book on the Bakairi Indians is Group of answer.pdf
1- One goal of Picchi's book on the Bakairi Indians is Group of answer.pdf1- One goal of Picchi's book on the Bakairi Indians is Group of answer.pdf
1- One goal of Picchi's book on the Bakairi Indians is Group of answer.pdf
 
1- Fully compare and contrast Nitrogen and Phosphorus as water quality.pdf
1- Fully compare and contrast Nitrogen and Phosphorus as water quality.pdf1- Fully compare and contrast Nitrogen and Phosphorus as water quality.pdf
1- Fully compare and contrast Nitrogen and Phosphorus as water quality.pdf
 
1- Nathaniel was injured in a hunting accident during which a bullet s.pdf
1- Nathaniel was injured in a hunting accident during which a bullet s.pdf1- Nathaniel was injured in a hunting accident during which a bullet s.pdf
1- Nathaniel was injured in a hunting accident during which a bullet s.pdf
 

Recently uploaded

The Diamond Necklace by Guy De Maupassant.pptx
The Diamond Necklace by Guy De Maupassant.pptxThe Diamond Necklace by Guy De Maupassant.pptx
The Diamond Necklace by Guy De Maupassant.pptx
DhatriParmar
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
vaibhavrinwa19
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
Best Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDABest Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDA
deeptiverma2406
 
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
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
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)
 
Digital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion DesignsDigital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion Designs
chanes7
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
David Douglas School District
 
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
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Atul Kumar Singh
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
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
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
Celine George
 
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
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
Peter Windle
 
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
 
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
 

Recently uploaded (20)

The Diamond Necklace by Guy De Maupassant.pptx
The Diamond Necklace by Guy De Maupassant.pptxThe Diamond Necklace by Guy De Maupassant.pptx
The Diamond Necklace by Guy De Maupassant.pptx
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
Best Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDABest Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDA
 
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
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
Digital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion DesignsDigital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion Designs
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
 
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
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
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...
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
 
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
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
 
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...
 
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.
 

1- Suppose that for an entity E- there are two candidate keys- A and B.pdf

  • 1. 1. Suppose that for an entity E, there are two candidate keys, A and B. If we make A the primary key, what should we do with B a) make it a SERIAL field b) just treat it like a regular attribute c) use the UNIQUE constraint d) use the NOT NULL constraint 2. Suppose we have the following relational model: Movie(mov_id(PK), title, yr) Person(pid(PK), fname, lname, gender) Acts_In(actor_id(PFK), movie_id(PFK), role) -- actor_id references Person, movie_id references Movie What would be true of the following query? SELECT title, yr FROM Movie m WHERE NOT EXISTS (SELECT * FROM Movie m2 WHERE m1.title = m2.title) a )Movies with an empty string title b) Movies where no other movie has the same title c) Movies where at least one other movie has the same title d) Movies with a null title