Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Delete time slot table from the database (1 Mark) 2. Add column date of birth to students table (1Mark) 3. Add a constraint to

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

1. Delete time slot table from the database (1 Mark) 2. Add column date of birth to students table (1Mark) 3. Add a constraint to date of birth so it must not be bigger than 30 of December 1989 ((1Mark)) 4. Find the names of students who are taking CS-347 (do not show repeated names) (1 Mark) 5. Write a query to find the name, and salary of instructor who makes more than the average salary and work in the computer science department. (1 Mark) 6. Create triggers for grade change, the trigger should be activated before the database is updated and should prevent any change of grades. The trigger should display this message " only the dean of the college can change students grades" (1 Mark) Message Log Executing: ("sec_id" = '1') and (" semester " = 'Fall') and ("year' = ' 2009 '); Operation failed: There was an error while applying the SQL script to the database. ERROR 1644: 1644: only the dean of the college can change students grades SQL Statement: ( "sec id " = ' ') and ("semester" = 'Fall') and ("year " = '2009') 7. Write a Procedure-SQL to find the names, and salary of instructor who makes more than the average salary and work in the computer science department. (1 Mark) 8. Number of courses that were taken in Fall 2009 (hint: use count function) (1 Mark) 9. Find and fix all the errors in the following query, the query should find the names of students, the courses they are taken, and the course instructor. Order the table by course ID from an ascending order. (1 Mark) 10. Write a query that will help MU to transit to 3 semester system from a two-semester system. The query should check for courses credits, if the course has 4 credit hours, then it should be changed to 5 credit hours. If the course has 3 credit hours, then it should be changed to 4 credit hours (1 Mark) 1. Define an SQL-procedure that will give the number of courses offered by each department (1 Mark) 2. Create a function that will calculate instructor salary after subtracting PF contribution, the function will ask instructor to enter their salary, then it will do the calculation. (note: instructor salary after subtracting PF contribution = salary ( salary * .15)) (1 Mark) (hint: use the following query before building the function: SET GLOBAL loga bin trust function creators =1

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

Modern Database Management

Authors: Fred R. McFadden, Jeffrey Slater, Mary B. Prescott

5th Edition

0805360549, 978-0805360547

Students also viewed these Databases questions