Database Tutorial

Course Tutorial Site

Site Admin

CIT325: Lab 10 Recovery

without comments

The lab builds on work done in Lab 7, Lab 8, and Lab 9 concepts. However, it only requires that you load the video store model, which is the first step in Lab 7. Those setup scripts are provided by the Oracle Database 12c PL/SQL Programming textbook.

You will need to use the item and contact tables and item_s1 and contact_s1 sequences from the video store example in this lab. You will create the remaining code artifacts. This lab is a critical to complete before you start Lab 11.

While you’ve not studied the details of database triggers, they were introduced in Chapter 3 of the textbook. Database triggers are useful for many things but this lab focuses on building object types and object subtypes. You will create a basic table where you will store the different structured output from different database triggers in the same column of a table.

The following four articles cover the basics of working with object types in an Oracle Database:

There are two elements to this lab. One creates the base_t object type and a logger table. The logger table creates a logger_id column for the surrogate key column and a log_text column that holds a base_t object type. The other element of the lab creates two subtypes of the base_t object type. The subtypes extend the behavior of the base_t object type.

  1. [10 points] Create the base_t object type, a logger table, and logger_s sequence.

    The sections cover the detailed tasks of the lab:

  1. [15 points] Create the item_t and contact_t subtypes of the base_t object type. Then, test the column substitutability in the logger table.

    The sections cover the detailed tasks of the lab:

Written by michaelmclaughlin

March 6th, 2017 at 2:43 am

Posted in