RelationalDBDesign RelationalDBDesign


Parallel Server   «Prev  Next»

Using Parallel Queries on Object Tables - Exercise

Course Project: Create parallel DML and parallel query

Objective: Create a query and create DML commands for a table.

Exercise scoring

This scored exercise is worth 10 points.

Background/overview


In this exercise, you will create a parallel DML command for a table and create a parallel query for an object table.

House-O-Pets Data Warehouse

Review the schema diagram below to find out more information about the House-O-Pets data warehouse.

View the diagram below.
Warehouse Diagram

Download files

You can download a beginning version of the script for this exercise, parallel.sql, from the Resources page.

Scenario

Here is what is going on at House-O-Pets: you have just set up a data warehouse system that contains copies of all your customer transactions in several new partitioned tables. You want to update all the warehouse customer records with a timestamp to record when you added the records into the data warehouse. You also want to run a parallel query on the customer object table that sorts customers by their purchase amounts.

Instructions

Starting with the code in your downloaded file, modify the file to complete these tasks:
  1. Add a parallel update of the CUSTOMER table. Update the WAREHOUSE_DATE column with the current date and time.
  2. Add a MAP METHOD function called HIBUY to the CUSTOMER_SALES that returns the TOTAL_SALE_AMOUNT column.
  3. Add a parallel query on the CUSTOMER_SALES object table that lists the customer’s name and purchase amount, sorted by the MAP METHOD you created.

Submitting your exercise

Type (or cut and paste) your plan into the box below to submit your answers . Click the Submit button when finished to submit the exercise. Remember to submit all of your answers at once.