Question: To prepare for this question, first create new table in the ischool_v2 database called new_person_records . The code for creating the table is provided in

To prepare for this question, first create new table in the ischool_v2 database called new_person_records. The code for creating the table is provided in Q1_Partial_Code.sql.

For this question, develop a trigger that will execute when a new record is added into the people table, and will add to the new_person_records table a new row with the following values:

An auto-incremented ID value into the new_person_record_id column;

A text message value, "You have added a new person, , who is affiliated

with in the ." Into the new_person_record_text column;

The value of the date and time of the record insertion into the new_person_record_timestamp

column.


Use Q2_Partial_Code.sql script for this question.

For this question, please create stored function called get_person_pronouns. This function expects two arguments that represent the first name and last name of a person that is present in the people table. The function will return the pronouns of the person (type VARCHAR) - "he/him", "she/her", "they/them", etc.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

To create the trigger and stored function as described you can use the following SQL code Ensure to ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!