Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Consider the following schema Highschooler ( ID int, name text, grade int ) ; Write a trigger that automatically deletes students when they graduate, i

Consider the following schema
Highschooler (ID int, name text, grade int);
Write a trigger that automatically deletes students when they graduate, i.e., when their grade is updated to exceed 12.
2. Consider the following relational schema:
PRODUCT (ProductCode, Name, Type)
TRANSACTION (TransCode, SellerCode, BuyerCode, TitleCode, Quantity, Value, Date, Instant)
OPERATOR (Code, Name, Address, Availability)
Build a trigger system that keeps the value of Availability of Operator updated after insertion of tuples in Transaction, taking
into account that for each transaction in which the operator sells, the amount of the transaction must be added to its
availability and subtracted for purchases.
3. Consider the following relational schema that manages the assignment of scholarships to students
APPLICATION (StudentID, Date, State)
COURSE (CourseID, Title, Credits)
RANKING (StudentID, Average, Credits, Rank)
EXAM (CourseID, StudentID, Date, Grade)
We want to manage through a system of triggers the assignment of scholarships to students. The scholarships are awarded
to students who apply and, at the date of the application, have taken exams for at least 50 credits, with an average score of
at least 27.
If the requirements are not met, the application is automatically rejected; otherwise accepted. In both cases, the
value of the column State in APPLICATION is changed (initially it was NULL), respectively, with "rejected" or
"accepted".

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

Oracle Autonomous Database In Enterprise Architecture

Authors: Bal Mukund Sharma, Krishnakumar KM, Rashmi Panda

1st Edition

1801072248, 978-1801072243

More Books

Students also viewed these Databases questions