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". usinmg mysql server queries only

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

Transactions On Large Scale Data And Knowledge Centered Systems Xxxviii Special Issue On Database And Expert Systems Applications Lncs 11250

Authors: Abdelkader Hameurlain ,Roland Wagner ,Sven Hartmann ,Hui Ma

1st Edition

3662583836, 978-3662583838

More Books

Students also viewed these Databases questions

Question

d. Explain how the result from c) compares with that from a).

Answered: 1 week ago

Question

1. Outline the listening process and styles of listening

Answered: 1 week ago

Question

4. Explain key barriers to competent intercultural communication

Answered: 1 week ago