Database Tutorial

Course Tutorial Site

Site Admin

CIT325: Lab 3 Instructions

without comments

Lab #3: Oracle Assignment

Objectives

The lab is designed to teach you how to work with composite data types in the scope of an anonymous PL/SQL programs. You evaluate and create a stored procedure that accepts three input parameters-a variable length string, a number, and a date. The anonymous block PL/SQL program should achieve these objectives:

  • Learn how to declare a PL/SQL record type.
  • Learn how to evaluate random string inputs and determine if they’re a number, string, or date.
  • Learn how to use Oracle’s regular expression functions (pp. 1,000 thru 1,017 in the textbook).
  • Learn how to cast strings as number, string, or date.
  • Learn how to check the physical size of strings before assigning them to internally declared variables.
  • Learn how to assign individual variables to a record structure.
  • Learn how to print the contents of a record structure.

Help Section

The following is an set of sample programs and steps that address concepts in the lab. The instructor should review these in classroom or in a Google Hangout with students. Click the Instructional Material link to see the preparation lesson material.

Students may want or need supplemental articles that let them review tips and techniques. The following is a function that checks for valid dates inside strings. You should run this type of check after you rule out a number and alphanumeric string.

The lab has one part. The test cases should submit the arguments in different order sequences, which means you should test the following:

  • A date, number, and string
  • A number, date, and string
  • A string, number, and date

This means that you need to loop through the argument list. The most effective way to do that is to put the arguments into a list of strings, and loop through the list of strings.

Lab Description

[25 points] Click the Lab Instructions link to open the instructions inside the current webpage.

Test Case

Click the Test Case Instructions link to open the test case instructions inside the current webpage.

Click the Test Case Automation link to open the instructions on how to create an automated series of test cases that write to a single log file.

Written by michaelmclaughlin

December 15th, 2016 at 11:29 am

Posted in