Question: Using the film database you have, answer the following queries in your schema then write them down in this paper. Question one: a) Select the

Using the film database you have, answer the following queries in your schema then write them down in this paper.

Question one:

a) Select the total rental_rate for films grouped by their categories. Order the result from largest to smallest.

b) Select all actors who acted together with JOE in any film. Use inner query.

c) Create a view, which has category names and number of films each category has.

Question two:

a) Convert the following for-cursor into: open, fetch, close one:

DECLARE

Cursor c1 is select table_name from user_tables;

BEGIN

FOR tables IN c1 LOOP

DBMS_OUT.PUT_LINE(tables.table_name);

END LOOP;

END;

b) Create a trigger so that when user tries to update category table, new value won't take effect and old data will remain in the database.

c) Create a function to return if a particular film has more than 10 actors in it or not.

Using the film database you have, answer the following queries in your

Film PF" actor_id PF filmid Film Actor SMALLINT SMALLINT Language language id SMALLINT name CHAR (20) Psilmid title description release_year Flanguage_id original language_id rental duration * rental_rate length replacement_cost rating special features last_update SMALLINT VARCHAR2 (255) VARCHAR2 (255) SMALLINT SMALLINT SMALLINT SMALLINT NUMBER (42) SMALLINT NUMBER (5.2) VARCHAR2(0) VARCHAR2(255) TIMESTAMP Film Category PF imid SMALLINT PF category.id SMALLINT Pactor_id first name last name IF nationality Actor SMALLINT VARCHAR2 (45) VARCHAR2 (45) CHAR (2) Category P. category_id SMALLINT name VARCHAR2 (25 ndo parent cat SMALLINT Country P country_id SMALLINT U short code CHAR (2) narne VARCHAR2 (25) INC 1334

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!