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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started