Skip Headers
Oracle® Retail Data Model Reference
Release 11.3.1

Part Number E20361-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

11 Oracle Retail Data Model Utility Scripts

This chapter describes the Oracle Retail Data Model utility script.

This chapter includes the following sections:

Calendar Population

The Calendar population scripts consist of two one-time installation packages.

Calendar Population Scripts

The Calendar population scripts include the following packages:

  • calendar_population_header.sql

  • calendar_population_body.sql

Running these packages does the following:

  1. Prepares necessary changes for the schema ordm_sys.

  2. Creates the Calendar_Population package that contains the following procedures:

    • RUN(in_setup_start_date, in_setup_no_years, in_setup_day_of_week) is the main procedure to populate everything about calendar.

    • RBIW_Base_Time_Tables_ddl creates the base table needed to support multiple hierarchies: Business or Calendar.

    • RBIW_Populate_Time_Hier_Bsns(in_setup_start_date, in_setup_no_years, in_setup_day_of_week) sets up the data in base table for the Business hierarchy as specified in setup or install section.

    • RBIW_Populate_Time_Hier_Clndr(in_setup_start_date, in_setup_no_years, in_setup_day_of_week) sets up the data in base table for the Calendar hierarchy as specified in setup or install section.

    • RBIW_Time_hier_Star sets up the Time hierarchy reporting layer tables.

    • RBIW_Populate_Time_Transform populates the Time transformation tables using the base Time tables or views. It populates transformation data for both hierarchies: Business and Calendar.

How to Populate Calendar Data

To populate calendar data:

  1. Log in to ORDM_SYS user.

  2. Execute the following SQL statement:

    exec Calendar_Population.run(date,num_years,dayofweek);
    

    where:

    date is the start date with which you want to populate calendar data. It is of type CHAR and should be input in the format 'YYYY-MM-DD' (for example,'2005-05-18').

    num_years is the number of years to populate calendar data, which should be INTEGER.

    dayofweek is the week start day to populate calendar week (should be CHAR type). For example, 'MONDAY'.