Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Data Base Architecture. What you need to do You will use the SAKILA schema in this assignment All questions are two (2) points each. Only

Data Base Architecture.

What you need to do

You will use the SAKILA schema in this assignment

All questions are two (2) points each.

Only submit the hw2.sql file to Blackboard

1) The SAKILA schema contains information on films and their languages. Use your knowledge of joins to return the list of movies and their language names, such that the output looks (roughly) like:

Title name

ACE GOLDFINGER English

ADAPTATION HOLES English

AFFAIR PREJUDICE English

AFRICAN EGG English

AGENT TRUMAN English

AIRPLANE SIERRA English

2) Write a join involving three tables that results in a list of movies and the actors that acted in them, sorted by film name. You result should look something like:

Title first_name last_name

ACADEMY DINOSA..... LUCILLE TRACY

ACADEMY DINOSA..... JOHNNY CAGE

ACADEMY DINOSA..... ROCK DUKAKIS

ACADEMY DINOSA..... OPRAH KILMER

ACADEMY DINOSA..... WARREN NOLTE

ACADEMY DINOSA..... MENA TEMPLE

ACADEMY DINOSA..... CHRISTAIN GABLE

ACADEMY DINOSA.... . SANDRA PECK

ACADEMY DINOSA..... MERCY KEITEL

3) Use your knowledge of left outer joins to find the set of languages not associated with any film. Your result should look like:

NAME:

Italian

Japanese

Mandarin

French

German

4) Return the same result as (3), but write the query as a right outer join.

5) Write a SQL UNION query to return the last names of all actors and customers, with the words "ACTOR" or "CUSTOMER" appearing next to their last name. Sort the combined output by last name. For example, output should look something like this:

last_name Actor

ABNEY CUSTOMER

ADAM CUSTOMER

ADAMS CUSTOMER

AKROYD CUSTOMER

ALEXANDRE ACTOR

AILARD CUSTOMER

ALLEN ACTOR

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Securing SQL Server Protecting Your Database From Attackers

Authors: Denny Cherry

1st Edition

1597496251, 978-1597496254

More Books

Students also viewed these Databases questions

Question

Excel caculation on cascade mental health clinic

Answered: 1 week ago