SlideShare a Scribd company logo
1 of 2
Download to read offline
1. A movie may have many actors, and an actor can act in many movies. An actor can play more
than one role in the same movie. Suppose we try to represent this in our database using an Actor
table, a Movie table, and a Role table. The Role table has a foreign key to reference the Actor
table, plus the name of the role and the title of the movie.
a) There might be actors who do not have roles in the Role table
b) The actor referenced might not exist in the table
c) A role might list a movie title that does not exist in the Movie table
d) There could be more than one actor with the same name
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 fname, lname
FROM Movie m, Acts_In a, Person p
WHERE mov_id = movie_id AND actor_id = pid AND yr = 2022
a) It produces the names of actors who were in every movie released in 2022
b) It produces the names of all actors
c) It produces names of actors who had a role in a movie released in 2022
d) It produces the names of actors who were in exactly 1 movie released in 2022
1- A movie may have many actors- and an actor can act in many movies-.pdf

More Related Content

More from ravisankrathi

1- A patient is receiving a continuous intravenous (IV) heparin infusi.pdf
1- A patient is receiving a continuous intravenous (IV) heparin infusi.pdf1- A patient is receiving a continuous intravenous (IV) heparin infusi.pdf
1- A patient is receiving a continuous intravenous (IV) heparin infusi.pdfravisankrathi
 
1- A movie may have many actors- and an actor can act in many movies-.pdf
1- A movie may have many actors- and an actor can act in many movies-.pdf1- A movie may have many actors- and an actor can act in many movies-.pdf
1- A movie may have many actors- and an actor can act in many movies-.pdfravisankrathi
 
1- A content calendar gives you a map of all your future content acros.pdf
1- A content calendar gives you a map of all your future content acros.pdf1- A content calendar gives you a map of all your future content acros.pdf
1- A content calendar gives you a map of all your future content acros.pdfravisankrathi
 
1- -- MAINTENANCE09 -- Program prompts a user for name- hours worke.pdf
1-    -- MAINTENANCE09 -- Program prompts a user for name- hours worke.pdf1-    -- MAINTENANCE09 -- Program prompts a user for name- hours worke.pdf
1- -- MAINTENANCE09 -- Program prompts a user for name- hours worke.pdfravisankrathi
 
1- (20 points) Give implementation-level English description of Turing.pdf
1- (20 points) Give implementation-level English description of Turing.pdf1- (20 points) Give implementation-level English description of Turing.pdf
1- (20 points) Give implementation-level English description of Turing.pdfravisankrathi
 
1- A rock that exhibits a phaneritic texture would be considered an ex.pdf
1- A rock that exhibits a phaneritic texture would be considered an ex.pdf1- A rock that exhibits a phaneritic texture would be considered an ex.pdf
1- A rock that exhibits a phaneritic texture would be considered an ex.pdfravisankrathi
 
1- A researcher wants to know if excessive social media use causes aca.pdf
1- A researcher wants to know if excessive social media use causes aca.pdf1- A researcher wants to know if excessive social media use causes aca.pdf
1- A researcher wants to know if excessive social media use causes aca.pdfravisankrathi
 
1- A population of rat snakes (Pantherophis alleghaniensis) has begun.pdf
1- A population of rat snakes (Pantherophis alleghaniensis) has begun.pdf1- A population of rat snakes (Pantherophis alleghaniensis) has begun.pdf
1- A population of rat snakes (Pantherophis alleghaniensis) has begun.pdfravisankrathi
 
1- A patient is receiving a continuous intravenous (IV) heparin infusi.pdf
1- A patient is receiving a continuous intravenous (IV) heparin infusi.pdf1- A patient is receiving a continuous intravenous (IV) heparin infusi.pdf
1- A patient is receiving a continuous intravenous (IV) heparin infusi.pdfravisankrathi
 
1- A given bacteria have a generation time of 15 minutes- After a urin.pdf
1- A given bacteria have a generation time of 15 minutes- After a urin.pdf1- A given bacteria have a generation time of 15 minutes- After a urin.pdf
1- A given bacteria have a generation time of 15 minutes- After a urin.pdfravisankrathi
 
1- A content calendar gives you a map of all your future content acros.pdf
1- A content calendar gives you a map of all your future content acros.pdf1- A content calendar gives you a map of all your future content acros.pdf
1- A content calendar gives you a map of all your future content acros.pdfravisankrathi
 
1- (5 points) (Formally) Prove or disprove T(n)-2n+1 is O(2n) by using.pdf
1- (5 points) (Formally) Prove or disprove T(n)-2n+1 is O(2n) by using.pdf1- (5 points) (Formally) Prove or disprove T(n)-2n+1 is O(2n) by using.pdf
1- (5 points) (Formally) Prove or disprove T(n)-2n+1 is O(2n) by using.pdfravisankrathi
 
1- -2 points- Consider the following data for Japan (2022 are IMF esti.pdf
1- -2 points- Consider the following data for Japan (2022 are IMF esti.pdf1- -2 points- Consider the following data for Japan (2022 are IMF esti.pdf
1- -2 points- Consider the following data for Japan (2022 are IMF esti.pdfravisankrathi
 
1- 2- right inferior lobe 3- thyrohyoid ligament 4- right middle lo.pdf
1- 2-  right inferior lobe 3-  thyrohyoid ligament 4-  right middle lo.pdf1- 2-  right inferior lobe 3-  thyrohyoid ligament 4-  right middle lo.pdf
1- 2- right inferior lobe 3- thyrohyoid ligament 4- right middle lo.pdfravisankrathi
 
1- -4 pts- Which of the following factors might contribute to random i.pdf
1- -4 pts- Which of the following factors might contribute to random i.pdf1- -4 pts- Which of the following factors might contribute to random i.pdf
1- -4 pts- Which of the following factors might contribute to random i.pdfravisankrathi
 
1- (20 points) Give implementation-level English description of Turing.pdf
1- (20 points) Give implementation-level English description of Turing.pdf1- (20 points) Give implementation-level English description of Turing.pdf
1- (20 points) Give implementation-level English description of Turing.pdfravisankrathi
 
1- -10 points- Show that if there exists a pseudorandom function famil.pdf
1- -10 points- Show that if there exists a pseudorandom function famil.pdf1- -10 points- Show that if there exists a pseudorandom function famil.pdf
1- -10 points- Show that if there exists a pseudorandom function famil.pdfravisankrathi
 
1- (10 points) Create a ) Create a regular expression- DFA- and Regula.pdf
1- (10 points) Create a ) Create a regular expression- DFA- and Regula.pdf1- (10 points) Create a ) Create a regular expression- DFA- and Regula.pdf
1- (10 points) Create a ) Create a regular expression- DFA- and Regula.pdfravisankrathi
 
1- (28 points) Consider discrete random variables X and Y with the fol.pdf
1- (28 points) Consider discrete random variables X and Y with the fol.pdf1- (28 points) Consider discrete random variables X and Y with the fol.pdf
1- (28 points) Consider discrete random variables X and Y with the fol.pdfravisankrathi
 

More from ravisankrathi (20)

1- A patient is receiving a continuous intravenous (IV) heparin infusi.pdf
1- A patient is receiving a continuous intravenous (IV) heparin infusi.pdf1- A patient is receiving a continuous intravenous (IV) heparin infusi.pdf
1- A patient is receiving a continuous intravenous (IV) heparin infusi.pdf
 
1- A movie may have many actors- and an actor can act in many movies-.pdf
1- A movie may have many actors- and an actor can act in many movies-.pdf1- A movie may have many actors- and an actor can act in many movies-.pdf
1- A movie may have many actors- and an actor can act in many movies-.pdf
 
1- A content calendar gives you a map of all your future content acros.pdf
1- A content calendar gives you a map of all your future content acros.pdf1- A content calendar gives you a map of all your future content acros.pdf
1- A content calendar gives you a map of all your future content acros.pdf
 
1- -- MAINTENANCE09 -- Program prompts a user for name- hours worke.pdf
1-    -- MAINTENANCE09 -- Program prompts a user for name- hours worke.pdf1-    -- MAINTENANCE09 -- Program prompts a user for name- hours worke.pdf
1- -- MAINTENANCE09 -- Program prompts a user for name- hours worke.pdf
 
1- (20 points) Give implementation-level English description of Turing.pdf
1- (20 points) Give implementation-level English description of Turing.pdf1- (20 points) Give implementation-level English description of Turing.pdf
1- (20 points) Give implementation-level English description of Turing.pdf
 
1- A rock that exhibits a phaneritic texture would be considered an ex.pdf
1- A rock that exhibits a phaneritic texture would be considered an ex.pdf1- A rock that exhibits a phaneritic texture would be considered an ex.pdf
1- A rock that exhibits a phaneritic texture would be considered an ex.pdf
 
1- A researcher wants to know if excessive social media use causes aca.pdf
1- A researcher wants to know if excessive social media use causes aca.pdf1- A researcher wants to know if excessive social media use causes aca.pdf
1- A researcher wants to know if excessive social media use causes aca.pdf
 
1- A population of rat snakes (Pantherophis alleghaniensis) has begun.pdf
1- A population of rat snakes (Pantherophis alleghaniensis) has begun.pdf1- A population of rat snakes (Pantherophis alleghaniensis) has begun.pdf
1- A population of rat snakes (Pantherophis alleghaniensis) has begun.pdf
 
1- A patient is receiving a continuous intravenous (IV) heparin infusi.pdf
1- A patient is receiving a continuous intravenous (IV) heparin infusi.pdf1- A patient is receiving a continuous intravenous (IV) heparin infusi.pdf
1- A patient is receiving a continuous intravenous (IV) heparin infusi.pdf
 
1- A given bacteria have a generation time of 15 minutes- After a urin.pdf
1- A given bacteria have a generation time of 15 minutes- After a urin.pdf1- A given bacteria have a generation time of 15 minutes- After a urin.pdf
1- A given bacteria have a generation time of 15 minutes- After a urin.pdf
 
1- A content calendar gives you a map of all your future content acros.pdf
1- A content calendar gives you a map of all your future content acros.pdf1- A content calendar gives you a map of all your future content acros.pdf
1- A content calendar gives you a map of all your future content acros.pdf
 
1- (5 points) (Formally) Prove or disprove T(n)-2n+1 is O(2n) by using.pdf
1- (5 points) (Formally) Prove or disprove T(n)-2n+1 is O(2n) by using.pdf1- (5 points) (Formally) Prove or disprove T(n)-2n+1 is O(2n) by using.pdf
1- (5 points) (Formally) Prove or disprove T(n)-2n+1 is O(2n) by using.pdf
 
1- 2- 1- 5- 6.pdf
1- 2- 1- 5- 6.pdf1- 2- 1- 5- 6.pdf
1- 2- 1- 5- 6.pdf
 
1- -2 points- Consider the following data for Japan (2022 are IMF esti.pdf
1- -2 points- Consider the following data for Japan (2022 are IMF esti.pdf1- -2 points- Consider the following data for Japan (2022 are IMF esti.pdf
1- -2 points- Consider the following data for Japan (2022 are IMF esti.pdf
 
1- 2- right inferior lobe 3- thyrohyoid ligament 4- right middle lo.pdf
1- 2-  right inferior lobe 3-  thyrohyoid ligament 4-  right middle lo.pdf1- 2-  right inferior lobe 3-  thyrohyoid ligament 4-  right middle lo.pdf
1- 2- right inferior lobe 3- thyrohyoid ligament 4- right middle lo.pdf
 
1- -4 pts- Which of the following factors might contribute to random i.pdf
1- -4 pts- Which of the following factors might contribute to random i.pdf1- -4 pts- Which of the following factors might contribute to random i.pdf
1- -4 pts- Which of the following factors might contribute to random i.pdf
 
1- (20 points) Give implementation-level English description of Turing.pdf
1- (20 points) Give implementation-level English description of Turing.pdf1- (20 points) Give implementation-level English description of Turing.pdf
1- (20 points) Give implementation-level English description of Turing.pdf
 
1- -10 points- Show that if there exists a pseudorandom function famil.pdf
1- -10 points- Show that if there exists a pseudorandom function famil.pdf1- -10 points- Show that if there exists a pseudorandom function famil.pdf
1- -10 points- Show that if there exists a pseudorandom function famil.pdf
 
1- (10 points) Create a ) Create a regular expression- DFA- and Regula.pdf
1- (10 points) Create a ) Create a regular expression- DFA- and Regula.pdf1- (10 points) Create a ) Create a regular expression- DFA- and Regula.pdf
1- (10 points) Create a ) Create a regular expression- DFA- and Regula.pdf
 
1- (28 points) Consider discrete random variables X and Y with the fol.pdf
1- (28 points) Consider discrete random variables X and Y with the fol.pdf1- (28 points) Consider discrete random variables X and Y with the fol.pdf
1- (28 points) Consider discrete random variables X and Y with the fol.pdf
 

Recently uploaded

會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽中 央社
 
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文中 央社
 
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptxAnalyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptxLimon Prince
 
When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...Gary Wood
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxannathomasp01
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsSandeep D Chaudhary
 
Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community PartnershipsSpring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community Partnershipsexpandedwebsite
 
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUMDEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUMELOISARIVERA8
 
Major project report on Tata Motors and its marketing strategies
Major project report on Tata Motors and its marketing strategiesMajor project report on Tata Motors and its marketing strategies
Major project report on Tata Motors and its marketing strategiesAmanpreetKaur157993
 
Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...EduSkills OECD
 
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading RoomSternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading RoomSean M. Fox
 
The Liver & Gallbladder (Anatomy & Physiology).pptx
The Liver &  Gallbladder (Anatomy & Physiology).pptxThe Liver &  Gallbladder (Anatomy & Physiology).pptx
The Liver & Gallbladder (Anatomy & Physiology).pptxVishal Singh
 
PSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptxPSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptxMarlene Maheu
 
Observing-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptxObserving-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptxAdelaideRefugio
 
SURVEY I created for uni project research
SURVEY I created for uni project researchSURVEY I created for uni project research
SURVEY I created for uni project researchCaitlinCummins3
 

Recently uploaded (20)

會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
 
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
 
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptxAnalyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
 
When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & Systems
 
Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community PartnershipsSpring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
 
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUMDEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
 
Major project report on Tata Motors and its marketing strategies
Major project report on Tata Motors and its marketing strategiesMajor project report on Tata Motors and its marketing strategies
Major project report on Tata Motors and its marketing strategies
 
Mattingly "AI & Prompt Design: Named Entity Recognition"
Mattingly "AI & Prompt Design: Named Entity Recognition"Mattingly "AI & Prompt Design: Named Entity Recognition"
Mattingly "AI & Prompt Design: Named Entity Recognition"
 
Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...
 
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading RoomSternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
 
Supporting Newcomer Multilingual Learners
Supporting Newcomer  Multilingual LearnersSupporting Newcomer  Multilingual Learners
Supporting Newcomer Multilingual Learners
 
The Liver & Gallbladder (Anatomy & Physiology).pptx
The Liver &  Gallbladder (Anatomy & Physiology).pptxThe Liver &  Gallbladder (Anatomy & Physiology).pptx
The Liver & Gallbladder (Anatomy & Physiology).pptx
 
ESSENTIAL of (CS/IT/IS) class 07 (Networks)
ESSENTIAL of (CS/IT/IS) class 07 (Networks)ESSENTIAL of (CS/IT/IS) class 07 (Networks)
ESSENTIAL of (CS/IT/IS) class 07 (Networks)
 
PSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptxPSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptx
 
Observing-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptxObserving-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptx
 
VAMOS CUIDAR DO NOSSO PLANETA! .
VAMOS CUIDAR DO NOSSO PLANETA!                    .VAMOS CUIDAR DO NOSSO PLANETA!                    .
VAMOS CUIDAR DO NOSSO PLANETA! .
 
SURVEY I created for uni project research
SURVEY I created for uni project researchSURVEY I created for uni project research
SURVEY I created for uni project research
 
OS-operating systems- ch05 (CPU Scheduling) ...
OS-operating systems- ch05 (CPU Scheduling) ...OS-operating systems- ch05 (CPU Scheduling) ...
OS-operating systems- ch05 (CPU Scheduling) ...
 

1- A movie may have many actors- and an actor can act in many movies-.pdf

  • 1. 1. A movie may have many actors, and an actor can act in many movies. An actor can play more than one role in the same movie. Suppose we try to represent this in our database using an Actor table, a Movie table, and a Role table. The Role table has a foreign key to reference the Actor table, plus the name of the role and the title of the movie. a) There might be actors who do not have roles in the Role table b) The actor referenced might not exist in the table c) A role might list a movie title that does not exist in the Movie table d) There could be more than one actor with the same name 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 fname, lname FROM Movie m, Acts_In a, Person p WHERE mov_id = movie_id AND actor_id = pid AND yr = 2022 a) It produces the names of actors who were in every movie released in 2022 b) It produces the names of all actors c) It produces names of actors who had a role in a movie released in 2022 d) It produces the names of actors who were in exactly 1 movie released in 2022