Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

3) Exercise A for Trigger - Create a trigger on the vendors table such that after a new vendor is added, the vendor id and

3) Exercise A for Trigger - Create a trigger on the vendors table such that after a new vendor is added, the vendor id and the contact's first and last name are automatically inserted into the vendor_contacts table. Use an INSERT statement for new vendors to test the trigger and show the results.

4) Exercise B for Trigger - Below is a CREATE TABLE SQL statement. Use this to create the table in your database. The table stores a number, which is treated in three ways: 1) radius of a circle, 2) side of a square, and 3) side of a cube. To this table, add two triggers: one for UPDATE and one for INSERT. The triggers will automatically calculate the circle area, square area, and cube volume. Then write INSERT statements and UPDATE to test the triggers.

DROP TABLE IF EXISTS t_test; CREATE TABLE t_test ( length FLOAT UNSIGNED, circlearea FLOAT UNSIGNED, squarearea FLOAT UNSIGNED, cubevolume FLOAT UNSIGNED );

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

More Books

Students also viewed these Databases questions

Question

How many atoms are present in 3.14 g of copper (Cu)?

Answered: 1 week ago