CS XXXXXXXXXXDatabase Design - FontenotHomework 03 - SQLRegular Submission Deadline: Thursday Feb 9 @ 11:59 to GradeScopeExtra Credit Early Submission Deadline: Tuesday Feb 7 @ 11:59 to...

1 answer below »
This is a SQL assignment, create a new datasource in DataGrip as instructed


CS 3200 - Database Design - Fontenot Homework 03 - SQL Regular Submission Deadline: Thursday Feb 9 @ 11:59 to GradeScope Extra Credit Early Submission Deadline: Tuesday Feb 7 @ 11:59 to GradeScope Name: _______________________NUID: _______________________ Directions: 1. Download the zipped Sakila database linked > here < and="" save="" it="" to="" your="" 3200="" folder.="" unzip="" it.="" 2.="" create="" a="" new="" datasource="" in="" datagrip="" using="" the="" sakila="" database="" file="" named="" ‘sqlite-sakila.db’.="" 3.="" for="" each="" of="" the="" 7="" questions="" that="" follow,="" you="" are="" to="" produce="" sql="" select="" statements.="" each="" query="" you="" submit="" must="" successfully="" execute="" in="" datagrip="" against="" the="" sqlite="" sakila="" database="" linked="" above.="" for="" each="" problem,="" you="" are="" provided="" the="" expected="" output.="" the="" results="" of="" executing="" your="" query="" solution="" must="" match="" the="" expected="" output="" exactly,="" including="" but="" not="" limited="" to="" column="" names="" and="" ordering="" of="" rows="" in="" the="" output.="" in="" solving="" each="" of="" these="" problems,="" you="" must="" rely="" only="" upon="" what="" is="" provided="" in="" the="" problem="" statement.="" you="" may="" not="" include="" any="" numerical="" ids="" or="" other="" literal="" values="" that="" allow="" you="" to="" simplify="" the="" query.="" for="" example,="" if="" the="" problem="" statement="" asks="" for="" all="" movies="" that="" belong="" to="" the="" horror="" category,="" you="" may="" not="" lookup="" the="" category_id="" for="" ‘horror’="" and="" include="" that="" in="" the="" query="" directly.="" any="" instances="" of="" “hard-coding”="" or="" attempting="" to="" “game="" the="" system”="" will="" result="" in="" no="" credit="" for="" that="" problem.="" each="" question="" is="" worth="" 14="" points,="" which="" equates="" to="" 98="" points="" total="" for="" the="" 7="" problems.="" we="" will="" attribute="" the="" two="" remaining="" points="" to="" proper="" datasource="" creation="" in="" datagrip,="" which="" is="" evidenced="" by="" you="" submitting="" queries.="" note:="" the="" exact="" method="" of="" submission="" will="" be="" forthcoming.="" academic="" collaboration="" reminder:="" remember="" that="" you="" may="" not="" look="" at,="" copy,="" capture,="" screenshot,="" or="" otherwise="" take="" possession="" of="" any="" other="" students’="" solutions="" to="" any="" of="" these="" questions.="" further,="" you="" may="" not="" provide="" your="" solutions="" in="" part="" or="" in="" whole="" to="" any="" other="" student.="" doing="" any="" of="" the="" above="" constitutes="" a="" violation="" of="" academic="" honesty="" which="" could="" result="" in="" an="" f="" in="" this="" class="" and="" a="" referral="" to="" osccr.="" what="" is="" permissible?="" you="" are="" free="" and="" encouraged="" to="" talk="" to="" your="" peers="" about="" the="" conceptual="" material="" from="" the="" lectures="" or="" the="" conceptual="" material="" that="" is="" part="" of="" this="" assignment.="" you="" can="" get="" a="" round="" a="" white="" board="" and="" talk="" through="" the="" sakila="" data="" model.="" you="" and="" your="" colleagues="" can="" work="" through="" sample="" sql="" queries="" done="" in="" class="" or="" others="" that="" you="" dream="" up="" on="" the="" fly.="" i’m="" very="" confident="" that="" each="" of="" you="" knows="" where="" the="" line="" between="" collaborative="" learning="" and="" cheating="" sits.="" please="" don’t="" cross="" that="" line.="" 1.="" what="" is="" the="" average="" number="" of="" actors="" appearing="" in="" all="" movies?="" 2.="" how="" many="" movies="" are="" there="" in="" each="" category?="" order="" the="" list="" by="" category="" name="" alphabetically.="" 3.="" which="" movies="" aren’t="" currently="" in="" the="" inventory="" of="" any="" of="" the="" stores?="" provide="" a="" list="" of="" film="" titles="" in="" alphabetical="" order="" along="" with="" the="" name="" of="" the="" category="" that="" each="" film="" belongs="" to.="" 4.="" the="" company="" wants="" to="" start="" a="" vip="" customer="" loyalty="" program.="" any="" customer="" who="" has="" rented="" more="" than="" 35="" movies="" will="" be="" invited="" to="" join.="" generate="" a="" list="" of="" all="" customers="" that="" have="" rented="" more="" than="" 35="" movies.="" order="" the="" list="" in="" descending="" order="" by="" number="" of="" rentals.="" 5.="" which="" actors="" or="" actresses="" have="" starred="" in="" movies="" from="" every="" category="" of="" film="" in="" our="" inventory?="" the="" output="" should="" give="" the="" last="" name="" and="" first="" name="" of="" these="" actors="" alphabetically.="" update="" friday="" feb="" 3,="" 2023:="" i’ve="" been="" convinced="" there="" are="" two="" interpretations="" of="" the="" way="" i="" stated="" the="" query.="" so,="" i’m="" providing="" an="" alternative="" output="" option="" for="" this="" problem.="" see="" below.="" 6.="" are="" there="" any="" actors="" or="" actresses="" that="" have="" the="" same="" first="" name="" and="" last="" name?="" if="" so,="" give="" the="" actors’="" id="" numbers="" and="" names.="" 7.="" help!="" one="" of="" our="" customers="" just="" called="" and="" is="" looking="" for="" the="" name="" of="" a="" particular="" movie.="" this="" customer="" was="" talking="" to="" her="" next="" door="" neighbor="" who="" was="" raving="" about="" this="" movie,="" but="" can’t="" remember="" the="" name.="" the="" neighbor="" remembered="" that="" the="" movie="" was="" really="" long…="" over="" 3="" hours,="" and="" they="" rented="" it="" sometime="" in="" the="" 2nd="" half="" of="" 2005.="" there="" was="" also="" an="" actor="" or="" actress="" in="" the="" movie="" with="" a="" last="" name="" similar="" to="" maccallen="" or="" mckellen="" or="" mckallen="" or="" something="" like="" that…="" they="" couldn’t="" really="" remember.="" our="" customer’s="" neighbor="" really="" only="" like="" sci-fi="" and="" horror="" films.="" so,="" the="" movie="" is="" almost="" certainly="" in="" one="" of="" those="" two="" categories.="" cs="" 3200="" -="" database="" design="" -="" fontenot="" homework="" 03="" -="" sql="" regular="" submission="" deadline:="" tuesday="" feb="" 14="" @="" 11:59="" to="" gradescope="" extra="" credit="" early="" submission="" deadline:="" sunday="" feb="" 12="" @="" 11:59="" to="" gradescope="" name:="" _______________________="" nuid:="" _______________________="" directions:="" 1.="" download="" the="" zipped="" sakila="" database="" linked=""> here < and save it to your 3200 folder. unzip it. 2. create a new datasource in datagrip using the sakila database file named ‘sqlite-sakila.db’. 3. for each of the 7 questions that follow, you are to produce sql select statements. each query you submit must successfully execute in datagrip against the sqlite sakila database linked above. for each problem, you are provided the expected output. the results of executing your query solution must match the expected output exactly, including but not limited to column names and ordering of rows in the output. in solving each of these problems, you must rely only upon what is provided in the problem statement. you may not include any numerical ids or other literal values that allow you to simplify the query. for example, if the problem statement asks for all movies that belong to the horror category, you may not lookup the category_id for ‘horror’ and include that in the query directly. any instances of “hard-coding” or attempting to “game the system” will result in no credit for that problem. each question is worth 14 points, which equates to 98 points total for the 7 problems. we will attribute the two remaining points to proper datasource creation in datagrip, which is evidenced by you submitting queries. submission info: (updated feb 6 2023) you’ll submit your solutions on gradescope. you will submit individual sql files, one file per problem. so you will submit a p1.sql, p2.sql, p3.sql and so on. failure to follow this file naming convention may result in no credit. it is important that you name your solution files with the proper question number based on this document before you upload to gradescope. the numbering might be a little confusing, but problem x on gradescope is associated with problem x on this document. ignore the gradescope numbers. academic collaboration reminder: remember that you may not look at, copy, capture, screenshot, or otherwise take possession of any other students’ solutions to any of these questions. further, you may not provide your solutions in part or in whole to any other student. doing any of the above constitutes a violation of academic honesty which could result in an f in this class and a referral to osccr. what is permissible? you are free and encouraged to talk to your peers about the conceptual material from the lectures or the conceptual material that is part of this assignment. you can get a round a white board and talk through the sakila data model. you and your colleagues can work through sample sql queries done in class or others that you dream up on the fly. i’m very confident that each of you knows where the line between collaborative learning and cheating sits. please don’t cross that line. 1. what is the average number of actors appearing in all movies? 2. how many movies are there in each category? order the list by category name alphabetically. 3. which movies aren’t currently in the inventory of any of the stores? provide a list of film titles in alphabetical order along with the name of the category that each film belongs to. 4. the company wants to start a vip customer loyalty program. any customer who has rented more than 35 movies will be invited to join. generate a list of all customers that have rented more than 35 movies. order the list in descending order by number of rentals. 5. which actors or actresses have starred in movies from every category of film in our inventory? the output should give the last name and first name of these actors alphabetically. update friday feb 3, 2023: i’ve been convinced there are two interpretations of the way i stated the query. so, i’m providing an alternative output option for this problem. see below. 6. are there any actors or actresses that have the same first name and last name? if so, give the actors’ id numbers and names. 7. help! one of our customers just called and is looking for the name of a particular movie. this customer was talking to her next door neighbor who was raving about this movie, but can’t remember the name. the neighbor remembered that the movie was really long… over 3 hours, and they rented it sometime in the 2nd half of 2005. there was also an actor or actress in the movie with a last name similar to maccallen or mckellen or mckallen or something like that… they couldn’t really remember. our customer’s neighbor really only like sci-fi and horror films. so, the movie is almost certainly in one of those two categories. and="" save="" it="" to="" your="" 3200="" folder.="" unzip="" it.="" 2.="" create="" a="" new="" datasource="" in="" datagrip="" using="" the="" sakila="" database="" file="" named="" ‘sqlite-sakila.db’.="" 3.="" for="" each="" of="" the="" 7="" questions="" that="" follow,="" you="" are="" to="" produce="" sql="" select="" statements.="" each="" query="" you="" submit="" must="" successfully="" execute="" in="" datagrip="" against="" the="" sqlite="" sakila="" database="" linked="" above.="" for="" each="" problem,="" you="" are="" provided="" the="" expected="" output.="" the="" results="" of="" executing="" your="" query="" solution="" must="" match="" the="" expected="" output="" exactly,="" including="" but="" not="" limited="" to="" column="" names="" and="" ordering="" of="" rows="" in="" the="" output.="" in="" solving="" each="" of="" these="" problems,="" you="" must="" rely="" only="" upon="" what="" is="" provided="" in="" the="" problem="" statement.="" you="" may="" not="" include="" any="" numerical="" ids="" or="" other="" literal="" values="" that="" allow="" you="" to="" simplify="" the="" query.="" for="" example,="" if="" the="" problem="" statement="" asks="" for="" all="" movies="" that="" belong="" to="" the="" horror="" category,="" you="" may="" not="" lookup="" the="" category_id="" for="" ‘horror’="" and="" include="" that="" in="" the="" query="" directly.="" any="" instances="" of="" “hard-coding”="" or="" attempting="" to="" “game="" the="" system”="" will="" result="" in="" no="" credit="" for="" that="" problem.="" each="" question="" is="" worth="" 14="" points,="" which="" equates="" to="" 98="" points="" total="" for="" the="" 7="" problems.="" we="" will="" attribute="" the="" two="" remaining="" points="" to="" proper="" datasource="" creation="" in="" datagrip,="" which="" is="" evidenced="" by="" you="" submitting="" queries.="" submission="" info:="" (updated="" feb="" 6="" 2023)="" you’ll="" submit="" your="" solutions="" on="" gradescope.="" you="" will="" submit="" individual="" sql="" files,="" one="" file="" per="" problem.="" so="" you="" will="" submit="" a="" p1.sql,="" p2.sql,="" p3.sql="" and="" so="" on.="" failure="" to="" follow="" this="" file="" naming="" convention="" may="" result="" in="" no="" credit.="" it="" is="" important="" that="" you="" name="" your="" solution="" files="" with="" the="" proper="" question="" number="" based="" on="" this="" document="" before="" you="" upload="" to="" gradescope.="" the="" numbering="" might="" be="" a="" little="" confusing,="" but="" problem="" x="" on="" gradescope="" is="" associated="" with="" problem="" x="" on="" this="" document.="" ignore="" the="" gradescope="" numbers.="" academic="" collaboration="" reminder:="" remember="" that="" you="" may="" not="" look="" at,="" copy,="" capture,="" screenshot,="" or="" otherwise="" take="" possession="" of="" any="" other="" students’="" solutions="" to="" any="" of="" these="" questions.="" further,="" you="" may="" not="" provide="" your="" solutions="" in="" part="" or="" in="" whole="" to="" any="" other="" student.="" doing="" any="" of="" the="" above="" constitutes="" a="" violation="" of="" academic="" honesty="" which="" could="" result="" in="" an="" f="" in="" this="" class="" and="" a="" referral="" to="" osccr.="" what="" is="" permissible?="" you="" are="" free="" and="" encouraged="" to="" talk="" to="" your="" peers="" about="" the="" conceptual="" material="" from="" the="" lectures="" or="" the="" conceptual="" material="" that="" is="" part="" of="" this="" assignment.="" you="" can="" get="" a="" round="" a="" white="" board="" and="" talk="" through="" the="" sakila="" data="" model.="" you="" and="" your="" colleagues="" can="" work="" through="" sample="" sql="" queries="" done="" in="" class="" or="" others="" that="" you="" dream="" up="" on="" the="" fly.="" i’m="" very="" confident="" that="" each="" of="" you="" knows="" where="" the="" line="" between="" collaborative="" learning="" and="" cheating="" sits.="" please="" don’t="" cross="" that="" line.="" 1.="" what="" is="" the="" average="" number="" of="" actors="" appearing="" in="" all="" movies?="" 2.="" how="" many="" movies="" are="" there="" in="" each="" category?="" order="" the="" list="" by="" category="" name="" alphabetically.="" 3.="" which="" movies="" aren’t="" currently="" in="" the="" inventory="" of="" any="" of="" the="" stores?="" provide="" a="" list="" of="" film="" titles="" in="" alphabetical="" order="" along="" with="" the="" name="" of="" the="" category="" that="" each="" film="" belongs="" to.="" 4.="" the="" company="" wants="" to="" start="" a="" vip="" customer="" loyalty="" program.="" any="" customer="" who="" has="" rented="" more="" than="" 35="" movies="" will="" be="" invited="" to="" join.="" generate="" a="" list="" of="" all="" customers="" that="" have="" rented="" more="" than="" 35="" movies.="" order="" the="" list="" in="" descending="" order="" by="" number="" of="" rentals.="" 5.="" which="" actors="" or="" actresses="" have="" starred="" in="" movies="" from="" every="" category="" of="" film="" in="" our="" inventory?="" the="" output="" should="" give="" the="" last="" name="" and="" first="" name="" of="" these="" actors="" alphabetically.="" update="" friday="" feb="" 3,="" 2023:="" i’ve="" been="" convinced="" there="" are="" two="" interpretations="" of="" the="" way="" i="" stated="" the="" query.="" so,="" i’m="" providing="" an="" alternative="" output="" option="" for="" this="" problem.="" see="" below.="" 6.="" are="" there="" any="" actors="" or="" actresses="" that="" have="" the="" same="" first="" name="" and="" last="" name?="" if="" so,="" give="" the="" actors’="" id="" numbers="" and="" names.="" 7.="" help!="" one="" of="" our="" customers="" just="" called="" and="" is="" looking="" for="" the="" name="" of="" a="" particular="" movie.="" this="" customer="" was="" talking="" to="" her="" next="" door="" neighbor="" who="" was="" raving="" about="" this="" movie,="" but="" can’t="" remember="" the="" name.="" the="" neighbor="" remembered="" that="" the="" movie="" was="" really="" long…="" over="" 3="" hours,="" and="" they="" rented="" it="" sometime="" in="" the="" 2nd="" half="" of="" 2005.="" there="" was="" also="" an="" actor="" or="" actress="" in="" the="" movie="" with="" a="" last="" name="" similar="" to="" maccallen="" or="" mckellen="" or="" mckallen="" or="" something="" like="" that…="" they="" couldn’t="" really="" remember.="" our="" customer’s="" neighbor="" really="" only="" like="" sci-fi="" and="" horror="" films.="" so,="" the="" movie="" is="" almost="" certainly="" in="" one="" of="" those="" two="">
Answered 4 days AfterFeb 04, 2023

Answer To: CS XXXXXXXXXXDatabase Design - FontenotHomework 03 - SQLRegular Submission Deadline: Thursday...

Shweta answered on Feb 09 2023
33 Votes
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here