Calculate annual raises for all employees

Assignment Help PL-SQL Programming
Reference no: EM131371805

1. Using implicit cursor

The BB_SHOPPER table in the Brewbean's database contains a column named PROMO that specifies promotions to send to shoppers. This column needs to be cleared after the promotion has been sent. First, open the assignment04-03.txt file in the Chapter04 folder in a text editor (such as Notepad). Run the UPDATE and COMMIT statements at the top of this file (not the anonymous block at the end). Modify the anonymous block so that it displays the number of rows updated onscreen. Run the block.

2. Handling Exceptions with User-Defined Errors
Sometimes Brewbean's customers mistakenly leave an item out of a basket that's already been checked out, so they create a new basket containing the missing items. However, they request that the baskets be combined so that they aren't charged extra shipping. An application page has been developed that enables employees to change the basket ID of items in the BB_BASKETITEM table to another existing basket's ID to combine the baskets. A block has been constructed to support this page (see the assignment04-07.sql file in the Chapter04 folder). However, an exception handler needs to be added to trap the situation of an invalid basket ID being entered for the original basket. In this case, the UPDATE affects no rows but doesn't raise an Oracle error. The handler should display the message "Invalid original basket ID" onscreen. Use an initialized variable named lv_old_num with a value of 30 and another named lv_new_num with a value of 4 to provide values to the block. First, verify that no item rows with the basket ID 30 exist in the BB_BASKETITEM table.

3. Assignment 4-8: Processing and Updating a Group of Rows

To help track employee information, a new EMPLOYEE table was added to the Brewbean's database. Review the data in this table. A PL/SQL block is needed to calculate annual raises and update employee salary amounts in the table. Create a block that addresses all the requirements in the following list. All salaries in the EMPLOYEE table are recorded as monthly amounts. Tip: Display the calculated salaries for verification before including the update action.

- Calculate 6% annual raises for all employees except the president.

- If a 6% raise totals more than $2,000, cap the raise at $2,000.

- Update the salary for each employee in the table.

- For each employee number, display the current annual salary, raise, and proposed new annual salary.

- Finally, following the details for each employee, show the total cost of all employees' salary increases for Brewbean's.

Attachment:- Assignment - SQL.rar

Reference no: EM131371805

Questions Cloud

Design a plc program and prepare a typical i/o connection di : Suppose your accumulated value is 24 and you lose ac line power to the controller. When power is restored to your controller, what will your accumulated value be?
Identify life events that might motivate an individual : Identify life events that might motivate an individual to seek wellness services.Develop a mission statement for the clinic. Provide an overview of services offered. Describe an itinerary for two days of treatment.Explain how assessments will..
How much time will it take a car travelling : How much time will it take a car travelling at 88 km/hr (55 mi/hr) to travel 500km? Show work for credit and include final units.
Determine three ways that employee layoffs can affect : Determine three ways that employee layoffs can affect other employees in the organization. Examine two additional ways that employee layoffs can affect the organization as a whole.
Calculate annual raises for all employees : Calculate annual raises for all employees except the president - Handling Exceptions with User-Defined Errors - Modify the anonymous block so that it displays the number of rows updated onscreen. Run the block.
Describe the level of enjoyment the experience afforded : Explain what subjects, themes, and stylistic characteristics enhanced your appreciation of art. Describe the level of enjoyment the experience afforded. Share one or two details about your emotional response.
Child speed halfway down : A31.1-kg child starting from rest slides down a water slide with a vertical height of12.0m. (Neglect friction.) (a) What is the child's speed halfway down the slide's vertical distance?
Understand the history and impact of health insurance : Understand the history and impact of health insurance on health care reimbursement process and recognize various types of health insurance coverage.
Define statistics with citation and reference : Define statistics with citation and reference. Contrast quantitative data and qualitative data. Use two Peer Reviewed references. Evaluate tables and charts used to represent quantitative and qualitative data.

Reviews

Write a Review

PL-SQL Programming Questions & Answers

  Delete the record from the table

Find all tables in your account. Return the table names as output.

  Database systems1 what is an sql injection attack explain

database systems1. what is an sql injection attack? explain how it works and what precautions must be taken to prevent

  Describe what is a sequence

What is a sequence. Which clause of a sequence cannot be changed with an alter statement

  Write sql expression

Write SQL expression for the following questions about the security aspects of above database. Student can view all the information in the course and instructor tables except for InstructorId.

  Write sql statement-display major of student-no duplications

Write a SQL statement to display the Major of the student with no duplications. Write a SQL statement to display the First and Last name of students who live in the Zip code 88888.

  Canned messages data structure

Examples of canned messages stored in the canned messages data structure (you can store as many canned messages as you would like):

  Write a plsql block and declare a variablenbspvsalnbspof

write a plsql block and declare a variablenbspvsalnbspof the type number. include the following statement in the

  Write the sql code to perform the tasks

Write the SQL code to perform the tasks requested in each problem. Define a new containing the product number, name, price, and quantity on hand along with the number of orders in which the product appears.

  Create student sorting table

Student.txt in the attachment contains the roster of a class. Each student object has the following fields: student id, last name, first name, academic level.Create a RosterClass to store the student database in vector.

  You have been asked to design a data model

Law Associates is a large legal practice based in Sydney. You have been asked to design a data model for the practice based upon the following specification

  Draw an entity relationship model for galle face elephants

Using the Oracle Developer Data Modeler tool, draw an Entity Relationship Model for the Galle Face Elephants case study above. Explain any assumptions you have made.

  Features of a relational dbms

1. A well-maintained relational DBMS has a high level of data integrity. What features of a relational DBMS contribute towards this level of integrity?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd