DB2 SQL PL Basic Arithmetic Procedure in Power Systems.

 
You have been asked to create and test two DB2 procedures: one that implements basic arithmetic operations, and another that retrieves data from a specific table. You will develop a version of each procedure for both the Power Systems and System-z environments.
Upon the completion of this lab, students will have hands-on experience coding SQL PL Procedures in DB2 on multiple platforms.
Deliverables:
                Lab Steps            
Step 1    DB2 SQL PL Basic Arithmetic Procedure in Power Systems             15 points
Step 2    DB2 SQL PL Basic Arithmetic Procedure in System z           15 points
Step 3    Retrieving data from Student Registration Database in Power Systems    15 points
Step 4    Retrieving data from Student Registration Database in System z  15 points
                Total Lab Points 60 points
You should submit to the Dropbox a Word document containing:
SQL PL code for each task
Screenshots of the output from each task (Each screenshot immediately follows the associated code).
iLab Steps
Step 1: SQL PL Basic Arithmetic Procedure
Code a PL/SQL script that will output three variables containing messages. To produce these messages, your procedure should initialize three variables with the values 45, 72, and 6.3. These values will be used to create messages as follows.
The first message will report the result of adding the first two numbers (45 and 72) and then multiplying their sum by the third number (6.3). Format the message as:
The result of (first_num + second_num) * third_num equals tot_val. 
An example message, formed using different numbers but following the same approach, would look like this:
The result of (2 + 3) * 4 equals 20
The second message will be constructed in a similar manner, except that now the first number (45) is added to the product of the last two numbers (72 and 6.3). Format the second message as:
The result of first_num + second_num * third_num equals tot_val. 
An example message, formed using different numbers but following the same approach, would look like this:
The result of 2 + 3 * 4 equals 14.
The third message should state:
The difference is due to the “Order of Operations.” 
Sample output:
Lab01_Tsk01 Output:
The result of (2 + 3) * 4 equals 20
The result of 2 + 3 * 4 equals 14
The difference is due to the “Order of Operations.”
The result of 2+3*4 equals 14
The difference is due to the “Order of Precedence”.
Step 2: Retrieving data from Student Registration Database
This requires use of the Student Registration Database and the columns in the Student Table.
Code a SQL PL procedure that will accept a student id as an input parameter and then retrieve the student’s first name, last name, employer, and phone number. This information will be packaged into a message that gets returned from the procedure as an output parameter. The message will be formatted as follows:
[first_name] [last_name] works at [employer] and can be reached at [phone].  
                For example:
Joe Blowe works at FedEx and can be reached at (773) 555-1212.
However, if the student id entered cannot be found in the table, your output message should be as follows::
The student id n does not exist.  
For example:
The student id, 999, does not exist.
Execute the script four times, using the following values: 130, 200, 310, and 909. The last value should result in the message stating that the student id does not exist. (This is a function of the data in the Student table – do not hard-code any specific values in your procedure).

Place your order
(550 words)

Approximate price: $22

Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
$26
The price is based on these factors:
Academic level
Number of pages
Urgency
Basic features
  • Free title page and bibliography
  • Unlimited revisions
  • Plagiarism-free guarantee
  • Money-back guarantee
  • 24/7 support
On-demand options
  • Writer’s samples
  • Part-by-part delivery
  • Overnight delivery
  • Copies of used sources
  • Expert Proofreading
Paper format
  • 275 words per page
  • 12 pt Arial/Times New Roman
  • Double line spacing
  • Any citation style (APA, MLA, Chicago/Turabian, Harvard)

Our guarantees

Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.

Money-back guarantee

You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.

Read more

Zero-plagiarism guarantee

Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.

Read more

Free-revision policy

Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.

Read more

Privacy policy

Your email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.

Read more

Fair-cooperation guarantee

By sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.

Read more