Computer Science > EXAM REVIEW > CIS 450/550: Database and Information Systems Homework 1 ‒ SQL (All)

CIS 450/550: Database and Information Systems Homework 1 ‒ SQL

Document Content and Description Below

CIS 450/550: Database and Information Systems Homework 1 ‒ SQL Due by by 23:59:59 EDT on Sept. 16, 2019 For all questions, please submit the query only. Submission instructions are on Pia... zza Part 1: Querying an AWS Oracle database (60 points) IMDB Database. The database you will use consists of a portion of the Internet Movie Database (IMDB.com). It has been uploaded to Amazon's AWS/RDS and conforms to the following schema (where keys are underlined): ● movie (   1. (2 points) Connecting to the Oracle instance. For all questions, please submit the query only. Write SQL queries for each of the following questions. A good reference for Oracle syntax can be found at https://www.oracletutorial.com/ . You should submit just the SQL query (i.e not the output). Your queries must execute correctly on the Oracle database provided; if you choose to set up your own instance and run locally you must still connect to the AWS instance and double-check that your queries are correct -- there are differences between different versions of SQL. 2. (3 points) 3. (5 points) Print the first 20 distinct keywords that begin with a letter (rather than a number) in alphabetical order. Schema: (kwd_name) 4. (5 points) For the movie 'Kill Game' released in 2018, print the name of all actors and their role in the movie. 5. (5 points) Print the title and number of genres for each movie released in 2001 whose title begins with ‘A’. If the movie has no genres, the number of genres should be 0. Schema: (title 6. (7 points) Print the movie title and director name of all movies with genre ‘Comedy’ that appeared in 2017 and were directed by a director whose (first) name starts with ‘Dav’. 7. (7 points) Print the name of the actor who has, in a given movie, played the largest number of different characters, along with the title of the movie and number of different characters played. Result schema: ( 8. (8 points) Print the crew_id of directors who have directed at least one movie in every genre that starts with ‘A’. Note that directors are crew rather than actors. Your query should instance independent, e.g. if another genre starting with ‘A’ was added along with new movies of that genre your query should still be correct. Result schema: (crew_id) ● movie (movie_id: number(7), title: varchar(255), runtime: number(7), release_year: number(7), rating: float(2), num_ratings: number(7)) ● crew (id: number(7), gender: number(7), name: varchar(255)) ● movie_cast(id: number(7), gender: number(7), name: varchar(255)) -- Think of this as a relation of actors ● crew_in (movie_id: number(7), crew_id: number(7), job: varchar(255)) -- movie_id REFERENCES movie(movie_id) -- crew_id REFERENCES crew(id) ● movie_genre (movie_id: number(7), genre_name: varchar(255)) -- movie_id REFERENCES movie(movie_id) -- genre_name REFERENCES genre(name) 9. (8 points) Print name of directors who have only directed near-top rated movies after 2015. By “near-top” we mean in the interval [m-1, m], where m is the max rating of movies released after 2015. Recall that directors are crew rather than actors. Schema: (name) 10. (10 points) Print the name of director and year, where the director has directed more than one top-rated movie in that year, where “top-rated” means the max rating within the year. Schema: (name, year)   Part 2: Setting up and Querying a MySQL Instance (40 points) The goal of the second part of the homework is to get experience with MySQL (MariaDB v. 10.2.25), one of the most popular open source databases, and to understand how to create your …………………………………CONTINUED…………………………………. [Show More]

Last updated: 2 years ago

Preview 1 out of 10 pages

Buy Now

Instant download

We Accept:

We Accept
document-preview

Buy this document to get the full access instantly

Instant Download Access after purchase

Buy Now

Instant download

We Accept:

We Accept

Reviews( 0 )

$12.00

Buy Now

We Accept:

We Accept

Instant download

Can't find what you want? Try our AI powered Search

165
0

Document information


Connected school, study & course


About the document


Uploaded On

Feb 19, 2021

Number of pages

10

Written in

Seller


seller-icon
Stuvia

Member since 4 years

43 Documents Sold

Reviews Received
5
0
0
1
3
Additional information

This document has been written for:

Uploaded

Feb 19, 2021

Downloads

 0

Views

 165

Document Keyword Tags


$12.00
What is Scholarfriends

In Scholarfriends, a student can earn by offering help to other student. Students can help other students with materials by upploading their notes and earn money.

We are here to help

We're available through e-mail, Twitter, Facebook, and live chat.
 FAQ
 Questions? Leave a message!

Follow us on
 Twitter

Copyright © Scholarfriends · High quality services·