Question: Database SQL: You can download the files from this link: https://drive.google.com/drive/folders/0B0kVn308bqFud21IMVBfQUZqUEU?usp=sharing Enter your SQL below each numbered question below . 1. Write an SQL 'create

Database SQL:

You can download the files from this link: https://drive.google.com/drive/folders/0B0kVn308bqFud21IMVBfQUZqUEU?usp=sharing

Enter your SQL below each numbered question below.

1. Write an SQL 'create table' statement to create a grade_audit table with attributes ID, name, dept_name, course_id, grade, and time. Use the appropriate types for each attribute, based on why you see in the rest of the courses schema.

2. Create a trigger so that if there is an insert into the takes table with a grade of F, then the students ID, name, dept_name is inserted into the grade_audit table, along with the course_id and grade for the course, and the current time.

Hint: within the insert statement in the body of the trigger, you will need one or more joins.

3. Create another trigger, this time for updates to the takes table. The trigger should remove the students record for a course in the grade_audit table if the updated grade is C or better.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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!