) 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.

Systems Architecture
7th Edition
ISBN:9781305080195
Author:Stephen D. Burd
Publisher:Stephen D. Burd
Chapter3: Data Representation
Section: Chapter Questions
Problem 3RP
icon
Related questions
Question

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

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.

Film_Actor
Film
Language
PF* actor_id
PF* film_id
p film id
P language_id
* name
SMALLINT
SMALLINT
SMALLINT
SMALLINT
* title
VARCHAR2 (255)
CHAR (20)
description
VARCHAR2 (255)
release_year
F' language_id
F
SMALLINT
SMALLINT
SMALLINT
original_language_id
* rental_duration
* rental_rate
length
* replacement_cost
rating
special_features
* last_update
SMALLINT
NUMBER (4,2)
SMALLINT
Film_Category
NUMBER (5,2)
VARCHAR2 (6)
PF* film_id
*PF' category_id
SMALLINT
Actor
SMALLINT
P. actor_id
SMALLINT
VARCHAR2 (255)
VARCHAR2 (45)
first_name
* last_name
F. nationality
TIMESTAMP
VARCHAR2 (45)
CHAR (2)
Category
P* category_id
SMALLINT
VARCHAR2 (25)
Country
* name
P. country_id
U* short_code
SMALLINT
parent_cat
SMALLINT
CHAR (2)
* name
VARCHAR2 (25)
Transcribed Image Text:Film_Actor Film Language PF* actor_id PF* film_id p film id P language_id * name SMALLINT SMALLINT SMALLINT SMALLINT * title VARCHAR2 (255) CHAR (20) description VARCHAR2 (255) release_year F' language_id F SMALLINT SMALLINT SMALLINT original_language_id * rental_duration * rental_rate length * replacement_cost rating special_features * last_update SMALLINT NUMBER (4,2) SMALLINT Film_Category NUMBER (5,2) VARCHAR2 (6) PF* film_id *PF' category_id SMALLINT Actor SMALLINT P. actor_id SMALLINT VARCHAR2 (255) VARCHAR2 (45) first_name * last_name F. nationality TIMESTAMP VARCHAR2 (45) CHAR (2) Category P* category_id SMALLINT VARCHAR2 (25) Country * name P. country_id U* short_code SMALLINT parent_cat SMALLINT CHAR (2) * name VARCHAR2 (25)
Expert Solution
steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
SQL Functions
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Systems Architecture
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning
Principles of Information Systems (MindTap Course…
Principles of Information Systems (MindTap Course…
Computer Science
ISBN:
9781285867168
Author:
Ralph Stair, George Reynolds
Publisher:
Cengage Learning
Fundamentals of Information Systems
Fundamentals of Information Systems
Computer Science
ISBN:
9781305082168
Author:
Ralph Stair, George Reynolds
Publisher:
Cengage Learning
Enhanced Discovering Computers 2017 (Shelly Cashm…
Enhanced Discovering Computers 2017 (Shelly Cashm…
Computer Science
ISBN:
9781305657458
Author:
Misty E. Vermaat, Susan L. Sebok, Steven M. Freund, Mark Frydenberg, Jennifer T. Campbell
Publisher:
Cengage Learning
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning