Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Consider the following tables that track Projects and the Branch that manage them: Based on the tables above, write SQL queries for the following requirements:

image text in transcribed

Consider the following tables that track Projects and the Branch that manage them: Based on the tables above, write SQL queries for the following requirements: Based on the tables above. write SQL queries for the following requirements: a) Create a stored procedure to count how many projects from the Branch located in the city of Kuala Lumpur. If there are more than 2 projects, then print 'there are more than 2 projects from Kuala Lumpur, else print 'there are equal or less than 2 projects from Kuala Lumpur. (7 marks) b) Create a stored procedure to insert a new Branch record. In the case where the Branch already exists, update the Branch record with the new details. (6 marks) c) Create an "after update trigger" to ensure that the budget of any project will not exceed 500,000. ( 6 marks) d) Create an "instead of trigger" to prevent any Project records from being deleted. Instead of the delete it should update the status of the project to "Inactive". ( 6 marks) (Total: 25 marks)

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

Essential SQLAlchemy Mapping Python To Databases

Authors: Myers, Jason Myers

2nd Edition

1491916567, 9781491916568

More Books

Students also viewed these Databases questions