SlideShare a Scribd company logo
1. For a Movies database with a person entity with attributes pid (key), fname, lname, suppose
we want to add some publicity-related info for which media have done interviews or which are
scheduled to do interviews. We would want to include the unique media name (ex:
"Entertainment Tonight"), the media type (ex: "TV", "print", or "web") and date of the interview.
How might this be modeled?
a) Add attributes for media name, type and interview date to Person
b) Create an entity for Media with attributes for media name and type and have a many-to-many
relationship between Media and Person
c) Create an entity for Media with attributes for media name and type and have a many-to-one
relationship between Media and Person
d) Create an entity for Media with attributes for media name and type and have a one-to-many
relationship between Media and Person
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
If you want to query a count of how many movies each actor acted in each year, you should
include the following in the query:
a) GROUP BY pid
b) GROUP BY pid, yr
c) SELECT COUNT(mov_id), COUNT(yr)
d) FROM Movie M1, Person P1, Movie M2, Person P2
1- For a Movies database with a person entity with attributes pid (key.pdf

More Related Content

More from aggallerychennai

1- Give an example of Tyler Pipe-MsiWane's culture prior to the change.pdf
1- Give an example of Tyler Pipe-MsiWane's culture prior to the change.pdf1- Give an example of Tyler Pipe-MsiWane's culture prior to the change.pdf
1- Give an example of Tyler Pipe-MsiWane's culture prior to the change.pdf
aggallerychennai
 
1- Functions of bone- a- b- c- d- e- f- 2- Types of bone cells- a- (bo (1).pdf
1- Functions of bone- a- b- c- d- e- f- 2- Types of bone cells- a- (bo (1).pdf1- Functions of bone- a- b- c- d- e- f- 2- Types of bone cells- a- (bo (1).pdf
1- Functions of bone- a- b- c- d- e- f- 2- Types of bone cells- a- (bo (1).pdf
aggallerychennai
 
1- Give a brief statement on the use of PCR and restriction enzymes in.pdf
1- Give a brief statement on the use of PCR and restriction enzymes in.pdf1- Give a brief statement on the use of PCR and restriction enzymes in.pdf
1- Give a brief statement on the use of PCR and restriction enzymes in.pdf
aggallerychennai
 
1- Foreign direct investment (FDI) occurs a- when there is an acquisi.pdf
1- Foreign direct investment (FDI) occurs a-  when there is an acquisi.pdf1- Foreign direct investment (FDI) occurs a-  when there is an acquisi.pdf
1- Foreign direct investment (FDI) occurs a- when there is an acquisi.pdf
aggallerychennai
 
1- For a Movies database with a Person entity and a Movie entity which.pdf
1- For a Movies database with a Person entity and a Movie entity which.pdf1- For a Movies database with a Person entity and a Movie entity which.pdf
1- For a Movies database with a Person entity and a Movie entity which.pdf
aggallerychennai
 
1- Explain why children are so vulnerable to media messages and why ma.pdf
1- Explain why children are so vulnerable to media messages and why ma.pdf1- Explain why children are so vulnerable to media messages and why ma.pdf
1- Explain why children are so vulnerable to media messages and why ma.pdf
aggallerychennai
 
1- Explain what it means to say that an accounting class is not the sa.pdf
1- Explain what it means to say that an accounting class is not the sa.pdf1- Explain what it means to say that an accounting class is not the sa.pdf
1- Explain what it means to say that an accounting class is not the sa.pdf
aggallerychennai
 
1- File input reads information from an external file into a C++ progr.pdf
1- File input reads information from an external file into a C++ progr.pdf1- File input reads information from an external file into a C++ progr.pdf
1- File input reads information from an external file into a C++ progr.pdf
aggallerychennai
 
1- Explain why the higher temperature results in greater absorption- 2.pdf
1- Explain why the higher temperature results in greater absorption- 2.pdf1- Explain why the higher temperature results in greater absorption- 2.pdf
1- Explain why the higher temperature results in greater absorption- 2.pdf
aggallerychennai
 
1- Explain the risk factors- signs- and symptoms of post-traumatic str.pdf
1- Explain the risk factors- signs- and symptoms of post-traumatic str.pdf1- Explain the risk factors- signs- and symptoms of post-traumatic str.pdf
1- Explain the risk factors- signs- and symptoms of post-traumatic str.pdf
aggallerychennai
 
1- Explain why is Social responsibility is the extent to which a busin.pdf
1- Explain why is Social responsibility is the extent to which a busin.pdf1- Explain why is Social responsibility is the extent to which a busin.pdf
1- Explain why is Social responsibility is the extent to which a busin.pdf
aggallerychennai
 
1- Evaluate the hardware components of modern computing environments a.pdf
1- Evaluate the hardware components of modern computing environments a.pdf1- Evaluate the hardware components of modern computing environments a.pdf
1- Evaluate the hardware components of modern computing environments a.pdf
aggallerychennai
 
1- Evaluating the Effectiveness of Your Message The best way to improv.pdf
1- Evaluating the Effectiveness of Your Message The best way to improv.pdf1- Evaluating the Effectiveness of Your Message The best way to improv.pdf
1- Evaluating the Effectiveness of Your Message The best way to improv.pdf
aggallerychennai
 
1- Explain the principles of sterilization- disinfection- pasteurizati.pdf
1- Explain the principles of sterilization- disinfection- pasteurizati.pdf1- Explain the principles of sterilization- disinfection- pasteurizati.pdf
1- Explain the principles of sterilization- disinfection- pasteurizati.pdf
aggallerychennai
 
1- Eve has tricked Alice into decrypting a bunch of ciphered that Alic.pdf
1- Eve has tricked Alice into decrypting a bunch of ciphered that Alic.pdf1- Eve has tricked Alice into decrypting a bunch of ciphered that Alic.pdf
1- Eve has tricked Alice into decrypting a bunch of ciphered that Alic.pdf
aggallerychennai
 
1- Explain translation elongation- Make sure you mention the role of t.pdf
1- Explain translation elongation- Make sure you mention the role of t.pdf1- Explain translation elongation- Make sure you mention the role of t.pdf
1- Explain translation elongation- Make sure you mention the role of t.pdf
aggallerychennai
 
1- Explain an ethical dilemma concern which has arisen in recent years.pdf
1- Explain an ethical dilemma concern which has arisen in recent years.pdf1- Explain an ethical dilemma concern which has arisen in recent years.pdf
1- Explain an ethical dilemma concern which has arisen in recent years.pdf
aggallerychennai
 
1- Explain the Business environment and its internal factors 2- Explai.pdf
1- Explain the Business environment and its internal factors 2- Explai.pdf1- Explain the Business environment and its internal factors 2- Explai.pdf
1- Explain the Business environment and its internal factors 2- Explai.pdf
aggallerychennai
 
1- Elements are the primary types of matter- What make one element dif.pdf
1- Elements are the primary types of matter- What make one element dif.pdf1- Elements are the primary types of matter- What make one element dif.pdf
1- Elements are the primary types of matter- What make one element dif.pdf
aggallerychennai
 
1- Eind the values for (hint you will need to use the formula sheet at.pdf
1- Eind the values for (hint you will need to use the formula sheet at.pdf1- Eind the values for (hint you will need to use the formula sheet at.pdf
1- Eind the values for (hint you will need to use the formula sheet at.pdf
aggallerychennai
 

More from aggallerychennai (20)

1- Give an example of Tyler Pipe-MsiWane's culture prior to the change.pdf
1- Give an example of Tyler Pipe-MsiWane's culture prior to the change.pdf1- Give an example of Tyler Pipe-MsiWane's culture prior to the change.pdf
1- Give an example of Tyler Pipe-MsiWane's culture prior to the change.pdf
 
1- Functions of bone- a- b- c- d- e- f- 2- Types of bone cells- a- (bo (1).pdf
1- Functions of bone- a- b- c- d- e- f- 2- Types of bone cells- a- (bo (1).pdf1- Functions of bone- a- b- c- d- e- f- 2- Types of bone cells- a- (bo (1).pdf
1- Functions of bone- a- b- c- d- e- f- 2- Types of bone cells- a- (bo (1).pdf
 
1- Give a brief statement on the use of PCR and restriction enzymes in.pdf
1- Give a brief statement on the use of PCR and restriction enzymes in.pdf1- Give a brief statement on the use of PCR and restriction enzymes in.pdf
1- Give a brief statement on the use of PCR and restriction enzymes in.pdf
 
1- Foreign direct investment (FDI) occurs a- when there is an acquisi.pdf
1- Foreign direct investment (FDI) occurs a-  when there is an acquisi.pdf1- Foreign direct investment (FDI) occurs a-  when there is an acquisi.pdf
1- Foreign direct investment (FDI) occurs a- when there is an acquisi.pdf
 
1- For a Movies database with a Person entity and a Movie entity which.pdf
1- For a Movies database with a Person entity and a Movie entity which.pdf1- For a Movies database with a Person entity and a Movie entity which.pdf
1- For a Movies database with a Person entity and a Movie entity which.pdf
 
1- Explain why children are so vulnerable to media messages and why ma.pdf
1- Explain why children are so vulnerable to media messages and why ma.pdf1- Explain why children are so vulnerable to media messages and why ma.pdf
1- Explain why children are so vulnerable to media messages and why ma.pdf
 
1- Explain what it means to say that an accounting class is not the sa.pdf
1- Explain what it means to say that an accounting class is not the sa.pdf1- Explain what it means to say that an accounting class is not the sa.pdf
1- Explain what it means to say that an accounting class is not the sa.pdf
 
1- File input reads information from an external file into a C++ progr.pdf
1- File input reads information from an external file into a C++ progr.pdf1- File input reads information from an external file into a C++ progr.pdf
1- File input reads information from an external file into a C++ progr.pdf
 
1- Explain why the higher temperature results in greater absorption- 2.pdf
1- Explain why the higher temperature results in greater absorption- 2.pdf1- Explain why the higher temperature results in greater absorption- 2.pdf
1- Explain why the higher temperature results in greater absorption- 2.pdf
 
1- Explain the risk factors- signs- and symptoms of post-traumatic str.pdf
1- Explain the risk factors- signs- and symptoms of post-traumatic str.pdf1- Explain the risk factors- signs- and symptoms of post-traumatic str.pdf
1- Explain the risk factors- signs- and symptoms of post-traumatic str.pdf
 
1- Explain why is Social responsibility is the extent to which a busin.pdf
1- Explain why is Social responsibility is the extent to which a busin.pdf1- Explain why is Social responsibility is the extent to which a busin.pdf
1- Explain why is Social responsibility is the extent to which a busin.pdf
 
1- Evaluate the hardware components of modern computing environments a.pdf
1- Evaluate the hardware components of modern computing environments a.pdf1- Evaluate the hardware components of modern computing environments a.pdf
1- Evaluate the hardware components of modern computing environments a.pdf
 
1- Evaluating the Effectiveness of Your Message The best way to improv.pdf
1- Evaluating the Effectiveness of Your Message The best way to improv.pdf1- Evaluating the Effectiveness of Your Message The best way to improv.pdf
1- Evaluating the Effectiveness of Your Message The best way to improv.pdf
 
1- Explain the principles of sterilization- disinfection- pasteurizati.pdf
1- Explain the principles of sterilization- disinfection- pasteurizati.pdf1- Explain the principles of sterilization- disinfection- pasteurizati.pdf
1- Explain the principles of sterilization- disinfection- pasteurizati.pdf
 
1- Eve has tricked Alice into decrypting a bunch of ciphered that Alic.pdf
1- Eve has tricked Alice into decrypting a bunch of ciphered that Alic.pdf1- Eve has tricked Alice into decrypting a bunch of ciphered that Alic.pdf
1- Eve has tricked Alice into decrypting a bunch of ciphered that Alic.pdf
 
1- Explain translation elongation- Make sure you mention the role of t.pdf
1- Explain translation elongation- Make sure you mention the role of t.pdf1- Explain translation elongation- Make sure you mention the role of t.pdf
1- Explain translation elongation- Make sure you mention the role of t.pdf
 
1- Explain an ethical dilemma concern which has arisen in recent years.pdf
1- Explain an ethical dilemma concern which has arisen in recent years.pdf1- Explain an ethical dilemma concern which has arisen in recent years.pdf
1- Explain an ethical dilemma concern which has arisen in recent years.pdf
 
1- Explain the Business environment and its internal factors 2- Explai.pdf
1- Explain the Business environment and its internal factors 2- Explai.pdf1- Explain the Business environment and its internal factors 2- Explai.pdf
1- Explain the Business environment and its internal factors 2- Explai.pdf
 
1- Elements are the primary types of matter- What make one element dif.pdf
1- Elements are the primary types of matter- What make one element dif.pdf1- Elements are the primary types of matter- What make one element dif.pdf
1- Elements are the primary types of matter- What make one element dif.pdf
 
1- Eind the values for (hint you will need to use the formula sheet at.pdf
1- Eind the values for (hint you will need to use the formula sheet at.pdf1- Eind the values for (hint you will need to use the formula sheet at.pdf
1- Eind the values for (hint you will need to use the formula sheet at.pdf
 

Recently uploaded

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
 
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
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
tarandeep35
 
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
 
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBCSTRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
kimdan468
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
heathfieldcps1
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
timhan337
 
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
 
Best Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDABest Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDA
deeptiverma2406
 
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
 
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
 
Marketing internship report file for MBA
Marketing internship report file for MBAMarketing internship report file for MBA
Marketing internship report file for MBA
gb193092
 
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
 
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
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
Peter Windle
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
Peter Windle
 
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)
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 

Recently uploaded (20)

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
 
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
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
 
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
 
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBCSTRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
 
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
 
Best Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDABest Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDA
 
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
 
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
 
Marketing internship report file for MBA
Marketing internship report file for MBAMarketing internship report file for MBA
Marketing internship report file for MBA
 
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...
 
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.
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 

1- For a Movies database with a person entity with attributes pid (key.pdf

  • 1. 1. For a Movies database with a person entity with attributes pid (key), fname, lname, suppose we want to add some publicity-related info for which media have done interviews or which are scheduled to do interviews. We would want to include the unique media name (ex: "Entertainment Tonight"), the media type (ex: "TV", "print", or "web") and date of the interview. How might this be modeled? a) Add attributes for media name, type and interview date to Person b) Create an entity for Media with attributes for media name and type and have a many-to-many relationship between Media and Person c) Create an entity for Media with attributes for media name and type and have a many-to-one relationship between Media and Person d) Create an entity for Media with attributes for media name and type and have a one-to-many relationship between Media and Person 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 If you want to query a count of how many movies each actor acted in each year, you should include the following in the query: a) GROUP BY pid b) GROUP BY pid, yr c) SELECT COUNT(mov_id), COUNT(yr) d) FROM Movie M1, Person P1, Movie M2, Person P2