Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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_2

Step: 3

blur-text-image_3

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

Advances In Databases And Information Systems 25th European Conference Adbis 2021 Tartu Estonia August 24 26 2021 Proceedings Lncs 12843

Authors: Ladjel Bellatreche ,Marlon Dumas ,Panagiotis Karras ,Raimundas Matulevicius

1st Edition

3030824713, 978-3030824716

More Books

Students also viewed these Databases questions

Question

LO2 Explain the nature of the psychological contract.

Answered: 1 week ago