Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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. Find the top 5 most popular words as the first word in the title of a movie. Use the string manipulation functions to extract the first word in the movie titles. For each word calculate the total number of movies with this word as the first word in the title. Since there are a lot of movie titles starting with The or A, exclude these two words from the ranking. Show the top 10 most frequent words and their corresponding number of movies. You may ignore movie titles with only one word.??

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

Database Systems An Application Oriented Approach Complete Version

Authors: Michael Kifer, Arthur Bernstein, Richard Lewis

2nd Edition

0321268458, 978-0321268457

More Books

Students also viewed these Databases questions