Question
CREATE TABLE ACTOR ( ID NUMBER(9,0) NOT NULL, NAME VARCHAR2(100) NOT NULL, CONSTRAINT ACTOR_PK PRIMARY KEY (ID)); CREATE TABLE MOVIE (
CREATE TABLE "ACTOR" ( "ID" NUMBER(9,0) NOT NULL,
"NAME" VARCHAR2(100) NOT NULL,
CONSTRAINT ACTOR_PK PRIMARY KEY (ID));
CREATE TABLE "MOVIE" ( "ID" NUMBER(9,0) not null
"TITLE" VARCHAR2(100) not null "YR" NUMBER(4,0), "SCORE" NUMBER(3,1), "VOTES" NUMBER(9,0), "DIRECTOR" VARCHAR2(100),
CONSTRAINT MOVIE_PK PRIMARY KEY (ID));
CREATE TABLE "CASTING" (
"MOVIE_ID" "ACTOR_ID" "ORD" CONSTRAINT CASTING_PK Primary Key (Movie_ID, ACTOR_ID), CONSTRAINT CASTING_FK1 FOREIGN KEY (MOVIE_ID) REFERENCES MOVIE(ID),
CONSTRAINT CASTING_FK2 FOREIGN KEY (ACTOR_ID) REFERENCES ACTOR(ID)) ;
1. Calculate the correlation coefficient between Votes and Score using (1) all the movies directed by Jackson, Peter, and (2) all the movies in the MOVIE table, respectively. Your output should contain two columns. The 1st column (with a column heading of Dataset) hastwo entries, one is Movies_By_JP and the other is All_Movies; the 2nd column (with a column heading of Votes_vs_Score) contains the corresponding correlation coefficients. [Hint: Use the set operator UNION].??
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started