Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using the film database you have, answer the following queries in your schema then write them down in this paper. a) Convert the following for-cursor

Using the film database you have, answer the following queries in your schema then write them down in this paper. image text in transcribed
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.
PF actor id PF Simid Film Actor SMALLINT SMALLINT Language Planguage_id SMALLINT name CHAR (20) Pfilm_id title description release_year Flanguage_id F original_language_id rental duration rental rate length replacement_cost Film SMALLINT VARCHAR2 (255) VARCHAR2 (255) SMALLINT SMALLINT SMALLINT SMALLINT NUMBER (42) SMALLINT NUMBER (52) VARCHAR2 (6) VARCHAR2 (255) TIMESTAMP Film Category PF film_id SMALLINT EPF category_id SMALLINT rating Pactor_id first_name last_name Fnationality Actor SMALLINT VARCHAR2 (45) VARCHAR2 (45) CHAR (2) special features last update Country P. country_id SMALLINT U short code CHAR (2) VARCHAR2 (25) Category P.category_id SMALLINT name VARCHAR2 (25) parent.cat SMALLINT .name

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

Refactoring Databases Evolutionary Database Design

Authors: Scott Ambler, Pramod Sadalage

1st Edition

0321774515, 978-0321774514

More Books

Students also viewed these Databases questions