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

Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptxPrésentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
siemaillard
 
How to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 InventoryHow to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 Inventory
Celine George
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
Israel Genealogy Research Association
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
heathfieldcps1
 
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptxNEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
iammrhaywood
 
Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...
Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...
Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...
Diana Rendina
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
Dr. Mulla Adam Ali
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
Jean Carlos Nunes Paixão
 
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
Nguyen Thanh Tu Collection
 
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
สมใจ จันสุกสี
 
Walmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdfWalmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdf
TechSoup
 
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skillsspot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
haiqairshad
 
Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
adhitya5119
 
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptxBeyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
EduSkills OECD
 
UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching AptitudeUGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
S. Raj Kumar
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Excellence Foundation for South Sudan
 
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem studentsRHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
Himanshu Rai
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
AyyanKhan40
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
PECB
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
History of Stoke Newington
 

Recently uploaded (20)

Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptxPrésentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
 
How to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 InventoryHow to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 Inventory
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
 
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptxNEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
 
Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...
Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...
Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
 
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
 
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
คำศัพท์ คำพื้นฐานการอ่าน ภาษาอังกฤษ ระดับชั้น ม.1
 
Walmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdfWalmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdf
 
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skillsspot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
 
Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
 
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptxBeyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
 
UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching AptitudeUGC NET Exam Paper 1- Unit 1:Teaching Aptitude
UGC NET Exam Paper 1- Unit 1:Teaching Aptitude
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
 
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem studentsRHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
RHEOLOGY Physical pharmaceutics-II notes for B.pharm 4th sem students
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
 

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