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

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 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 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 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

SPLICE Working Group: Reusable Code Examples
SPLICE Working Group:Reusable Code ExamplesSPLICE Working Group:Reusable Code Examples
SPLICE Working Group: Reusable Code Examples
Peter Brusilovsky
ย 
ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡
ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡
ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡
ไธญ ๅคฎ็คพ
ย 
e-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi Rajagopale-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi Rajagopal
EADTU
ย 
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
EADTU
ย 
Contoh Aksi Nyata Refleksi Diri ( NUR ).pdf
Contoh Aksi Nyata Refleksi Diri ( NUR ).pdfContoh Aksi Nyata Refleksi Diri ( NUR ).pdf
Contoh Aksi Nyata Refleksi Diri ( NUR ).pdf
cupulin
ย 
MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...
MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...
MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...
MysoreMuleSoftMeetup
ย 

Recently uploaded (20)

8 Tips for Effective Working Capital Management
8 Tips for Effective Working Capital Management8 Tips for Effective Working Capital Management
8 Tips for Effective Working Capital Management
ย 
SPLICE Working Group: Reusable Code Examples
SPLICE Working Group:Reusable Code ExamplesSPLICE Working Group:Reusable Code Examples
SPLICE Working Group: Reusable Code Examples
ย 
Rich Dad Poor Dad ( PDFDrive.com )--.pdf
Rich Dad Poor Dad ( PDFDrive.com )--.pdfRich Dad Poor Dad ( PDFDrive.com )--.pdf
Rich Dad Poor Dad ( PDFDrive.com )--.pdf
ย 
ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡
ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡
ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡ๆœƒ่€ƒ่‹ฑๆ–‡
ย 
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...
ย 
An overview of the various scriptures in Hinduism
An overview of the various scriptures in HinduismAn overview of the various scriptures in Hinduism
An overview of the various scriptures in Hinduism
ย 
e-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi Rajagopale-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi Rajagopal
ย 
Supporting Newcomer Multilingual Learners
Supporting Newcomer  Multilingual LearnersSupporting Newcomer  Multilingual Learners
Supporting Newcomer Multilingual Learners
ย 
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
ย 
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
ย 
Contoh Aksi Nyata Refleksi Diri ( NUR ).pdf
Contoh Aksi Nyata Refleksi Diri ( NUR ).pdfContoh Aksi Nyata Refleksi Diri ( NUR ).pdf
Contoh Aksi Nyata Refleksi Diri ( NUR ).pdf
ย 
VAMOS CUIDAR DO NOSSO PLANETA! .
VAMOS CUIDAR DO NOSSO PLANETA!                    .VAMOS CUIDAR DO NOSSO PLANETA!                    .
VAMOS CUIDAR DO NOSSO PLANETA! .
ย 
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
ย 
Graduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptxGraduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptx
ย 
The Liver & Gallbladder (Anatomy & Physiology).pptx
The Liver &  Gallbladder (Anatomy & Physiology).pptxThe Liver &  Gallbladder (Anatomy & Physiology).pptx
The Liver & Gallbladder (Anatomy & Physiology).pptx
ย 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
ย 
The Story of Village Palampur Class 9 Free Study Material PDF
The Story of Village Palampur Class 9 Free Study Material PDFThe Story of Village Palampur Class 9 Free Study Material PDF
The Story of Village Palampur Class 9 Free Study Material PDF
ย 
Trauma-Informed Leadership - Five Practical Principles
Trauma-Informed Leadership - Five Practical PrinciplesTrauma-Informed Leadership - Five Practical Principles
Trauma-Informed Leadership - Five Practical Principles
ย 
MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...
MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...
MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...
ย 
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
ย 

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