Create a PL/SQL block that uses data in the company database to do the following tasks:...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Create a PL/SQL block that uses data in the company database to do the following tasks: 1) Retrieve information about an employee and print it as follow: Current Salary: Employee's SSN: Name: Department Number: Department Name: Manager's Name: Current Salary: The program should assign a value or prompt for employee's SSN (such as 123456789, 333445555, or 999887777). Department # 1 4 2) Update that employee's salary information in the database after the raise is calculated. The percentage of the raise is based on the department he/she works for. The following shows the percentage of raise for each department: 5 The SQL syntax for update is: 123456789 John B. Smith 5 Research Franklin Wong 30,000.00 Salary after the raise: Employee's SSN: Name: Department Number: Department Name: Manager's Name: Current Salary: UPDATE table name SET column1 = value1, column2 = value2...., columnN = valueN WHERE [condition]; Print the new salary information. Thus, the updated information should look like this: % Raise 3 5 7 123456789 John B. Smith 5 Research Franklin Wong 32,100.00 3) Reset the salary in the database back to the original (Also, use the "update table ... "command). Print the salary information again. Thus the final information should look like this: Current Salary: Employee's SSN: Name: Department Number: Department Name: Manager's Name: Current Salary: 123456789 John B. Smith 5 Research Franklin Wong 30,000.00 Note: Do all of these steps in one program! Create a PL/SQL block that uses data in the company database to do the following tasks: 1) Retrieve information about an employee and print it as follow: Current Salary: Employee's SSN: Name: Department Number: Department Name: Manager's Name: Current Salary: The program should assign a value or prompt for employee's SSN (such as 123456789, 333445555, or 999887777). Department # 1 4 2) Update that employee's salary information in the database after the raise is calculated. The percentage of the raise is based on the department he/she works for. The following shows the percentage of raise for each department: 5 The SQL syntax for update is: 123456789 John B. Smith 5 Research Franklin Wong 30,000.00 Salary after the raise: Employee's SSN: Name: Department Number: Department Name: Manager's Name: Current Salary: UPDATE table name SET column1 = value1, column2 = value2...., columnN = valueN WHERE [condition]; Print the new salary information. Thus, the updated information should look like this: % Raise 3 5 7 123456789 John B. Smith 5 Research Franklin Wong 32,100.00 3) Reset the salary in the database back to the original (Also, use the "update table ... "command). Print the salary information again. Thus the final information should look like this: Current Salary: Employee's SSN: Name: Department Number: Department Name: Manager's Name: Current Salary: 123456789 John B. Smith 5 Research Franklin Wong 30,000.00 Note: Do all of these steps in one program!
Expert Answer:
Answer rating: 100% (QA)
The image you sent shows a diagram of a social media data warehouse A data warehouse is a central repository for all of the data that a social media c... View the full answer
Related Book For
Fundamentals Of Database Systems
ISBN: 9780133970777
7th Edition
Authors: Ramez Elmasri, Shamkant Navathe
Posted Date:
Students also viewed these databases questions
-
How much cash and inventory should we keep on hand? According to daily routine of life. Explain
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
Sketch a diagram of a single phase transformer and label its components.
-
Shown below is information from the financial reports of Knauss Supermarkets for the past few years. Instructions a. Calculate the following statistics for Knauss Supermarkets (round your answers to...
-
Let f(x) = (x3 + a)/x. Show that lim x [f (x) x2] = 0. This shows that the graph of f approaches the graph of y = x2, and we say that the curve is asymptotic to the parabola y = x2. Use this fact...
-
How do companies stand to benefit from offering flexible benefit plans
-
Describe in what ways the scope of nursing has changed.
-
The contractors project office is often structured to be compatible with the customers project office, sometimes on a one-to-one basis. Some customers view the contractors project organization merely...
-
Suppose you borrow $260,000 at 5.25% for 30 years, monthly payments. You pay 2 discount points. A. Your APR on this loan is 5.625%. What amount of other financing fees did you pay? B. Suppose that...
-
James Silva is a management accountant at Kleebler - Olson, where he is in charge of their investment portfolio. James worked with a data scientist to develop a model that predicts how a given loan...
-
lgE molecules involved in hypersensitivity reactions have become attached to A) neutrophils. B) mast cells. C)B cells. D) macrophages. E) mast cells AND B cells.
-
Indicate whether each of the following statements is true or false by writing T or F in the answer c olumn. A mutual-benefi t bailment does not exist if there is a lack of consideration.
-
The branch of the law concerned with the laws passed by Congress and by state legislatures. a. administrative law b. appellate court c. civil law d. common law e. criminal law f. defendants g....
-
Governmental powers that the courts have found in constitutions through interpretation and inference. a. administrative law b. appellate court c. civil law d. common law e. criminal law f. defendants...
-
The legal specialty concerned with the relationship between businesses or individuals and government agencies. a. administrative law b. appellate court c. civil law d. common law e. criminal law f....
-
Indicate whether each of the following statements is true or false by writing T or F in the answer c olumn. In a bailment for the sole benefi t of the bailee, the bailee is required to extend only...
-
What is the output of the following C code? #include int main(void) { } int x,y,z; double a,b; x = 3/4; y 10.0 / 4; a = 10 % 4; b z = x/y* a + b; printf("%d %d %d %.5f %.3f", x, y, z, a, b); (double)...
-
Ex. (17): the vector field F = x i-zj + yz k is defined over the volume of the cuboid given by 0x a,0 y b, 0zc, enclosing the surface S. Evaluate the surface integral ff, F. ds?
-
What is the difference between logical data independence and physical data independence? Which one is harder to achieve? Why?
-
What is PEAR? What is PEAR DB?
-
What is social search? What does collaborative social search involve?
-
Obtain the time variation of the lift and propulsive force coefficients and their plots for the airfoil given by Example 8.5. Assume that the profile pitches about quarter chord point. Example 8.5...
-
Write down a numerical solution algorithm for the LU decomposition solution of the pseudo penta diagonal matrix equation given by (A11.4). A11.4 || B C 2 A2 B2 C2 922 An-1 Bn-1 Cn-1 -1 An Bn R R Rn-1...
-
Obtain Eq. 8.66 as a relation between the wake vorticity and the reduced circulation. Eq. 8.66 w(x) = k(Q; cosx-22, sin x) cos ks +k(Q; sin x+Q, cos x) sinks, Q = Q, +Q;i
Study smarter with the SolutionInn App