Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

USE THE MOVIES ON DVD DATABASE STRUCTURE TO ANSWER THE REMAINING QUESTIONS. Write the SQL statement that will create the MOVIE table enforcing constraints for

image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
USE THE MOVIES ON DVD DATABASE STRUCTURE TO ANSWER THE REMAINING QUESTIONS. Write the SQL statement that will create the MOVIE table enforcing constraints for all primary and foreign keys as well as a check constraint on MPAA. Movies on DVD Database Actor \begin{tabular}{|l|l|l|l|l|l|} \hline \multicolumn{1}{|c|}{ Column } & \multicolumn{1}{|c|}{DataType} & Length & DecimalPlaces & \multicolumn{1}{|c|}{NullsAllowed?} & \multicolumn{1}{|c|}{ Descriprion } \\ \hline ActNumb & Char & 4 & & No & Primary Key \\ \hline ActName & Char & 20 & & No & \\ \hline State & Char & 2 & & Yes & Statewheretheactorcur-rentlyresides. \\ \hline \end{tabular} Movie \begin{tabular}{|l|l|l|l|l|l|} \hline \multicolumn{1}{|c|}{ Column } & \multicolumn{1}{c|}{DataType} & \multicolumn{1}{c|}{ Length } & DecimalPlaces & \multicolumn{1}{c|}{NullsAllowed?} & \multicolumn{1}{c|}{ Description } \\ \hline MvNumb & Char & 4 & & No & Primary Key \\ \hline Title & Char & 30 & & No & \\ \hline Yearmade & Char & 4 & & Yes & \\ \hline MvType & Char & 6 & & Yes & Comedy,Mystery,etc.(themoviehasoneandonlyoneclassification). \\ \hline MPAA & & & & Yes & G, PG, PG-13, or R \\ \hline Price & Decimal & 4 & 2 & Yes & The price of the DVD. \\ \hline DirNumb & Char & 4 & & No & Foreign key \\ \hline \end{tabular} MovAct \begin{tabular}{|l|l|l|l|l|l|} \hline \multicolumn{1}{|c|}{ Columm } & \multicolumn{1}{|c|}{DataType} & \multicolumn{1}{|c|}{ Length } & DecimalPlaces & \multicolumn{1}{|c|}{NullsAllowed?} & \multicolumn{1}{|c|}{ Description } \\ \hline MuNumb & Char & 4 & & No & Primary key (fk) \\ \hline ActNumb & Char & 4 & & No & Primary key (key) (fk) \\ \hline Salary & Decimal & 10 & 2 & Yes & Salarytheactorearnedforthismovie. \\ \hline Awards & Decimal & 2 & 0 & Numberofacademyawardstheactorwonforthismov-ie. \\ \hline \end{tabular} Write the SQL query statement that will List all movie titles that either cast an actor who won an academy award or was in a category of DRAMA.. Write the SQL query that will List all of the living directors who have directed a movie that has won an academy award

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

Step: 3

blur-text-image

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

Upgrading Oracle Databases Oracle Database New Features

Authors: Charles Kim, Gary Gordhamer, Sean Scott

1st Edition

B0BL12WFP6, 979-8359657501

More Books

Students also viewed these Databases questions

Question

c. What steps can you take to help eliminate the stress?

Answered: 1 week ago