1 Getting Started with Oracle Data Mining

The steps described in this chapter explain how to install Oracle Data Mining locally on your Windows PC or laptop and start up the client interfaces: Oracle Data Miner and Oracle Spreadsheet Add-In for Predictive Analytics.

This chapter provides summary information. Details are provided in subsequent chapters of this manual.

Note:

The minimum requirements for a working installation of Oracle Data Mining are:
  • An installation of Oracle Database Enterprise Edition

  • A database user ID that has data mining privileges (see Chapter 4)

Step One: Install the Database

Perform a basic installation of Oracle Database Enterprise Edition and create a starter database.

  1. In Windows Control Panel, Administrative Tools, choose Services. Stop any Oracle services that may be running on your computer.

  2. From the Oracle Database installation directory, run SETUP.EXE to start Oracle Universal Installer. Follow the instructions as specified on the initial pages, then:

    • On the Select Installation Options page, choose Create and Configure a Database.

    • On the System Class page, choose Desktop Class.

    • On the Typical Install Configuration page, specify the installation directories, the database name, and the database system passwords.

  3. The Installer performs prerequisite checks, displays summary information about the installation, and copies the Oracle executables and the starter database files to your computer.

  4. The Installer configures Oracle Net to enable client connections.

  5. The Installer starts Oracle Database Configuration Assistant to create the starter database.

  6. Database Configuration Assistant displays summary information about the starter database. If you wish to use Oracle sample data or the Data Mining sample programs, unlock the SH account.

  7. Exit the Installer. The starter database is now running, and Oracle Net is ready to accept client connections.

  8. If necessary, restart the Oracle services that you stopped in step 1.

See:

"Install Oracle Database" for more detailed instructions

Step Two: Verify the Data Mining Installation

Once you have installed Oracle Database and created a starter database, you may wish to verify that Oracle Data Mining is functioning properly before proceeding further.

In Appendix A, you will find a series of SQL and PL/SQL commands that perform basic data mining operations. You can type these commands into SQL*Plus or SQL Developer to make sure that the database is enabled for data mining.

Step Three: Create a Data Mining User

Create a database user with data mining privileges.

  1. Log in to SQL*Plus or SQL Developer as the system user.

  2. Execute the following CREATE USER statement. Specify a user name for dmuser and password for dmpassword.

    CREATE USER dmuser IDENTIFIED BY dmpassword
           DEFAULT TABLESPACE users
           TEMPORARY TABLESPACE temp
           QUOTA UNLIMITED ON users;
    Commit;
    
  3. Execute these statements to grant data mining privileges to the user.

    GRANT CREATE JOB TO dmuser;
    GRANT CREATE MINING MODEL TO dmuser;       -- required for creating models
    GRANT CREATE PROCEDURE TO dmuser;
    GRANT CREATE SEQUENCE TO dmuser;
    GRANT CREATE SESSION TO dmuser;
    GRANT CREATE SYNONYM TO dmuser;
    GRANT CREATE TABLE TO dmuser;
    GRANT CREATE TYPE TO dmuser;
    GRANT CREATE VIEW TO dmuser;
    GRANT EXECUTE ON ctxsys.ctx_ddl TO dmuser;  -- required for text mining
    
    GRANT SELECT ON data TO dmuser;             -- required for mining data that is
                                                   not in your schema
    
  4. If the user will need to import or export data mining models, grant this additional privilege.

    GRANT CREATE ANY DIRECTORY TO dmuser;
    

    For import/export operations, the user must create a directory object. The user may also require additional privileges. See "Exporting and Importing Mining Models" for details.

See:

Chapter 4, "Users and Privileges for Data Mining" for more detailed instructions

Step Four: If You Want to Use Oracle Data Miner

Oracle Data Miner, an extension to Oracle SQL Developer 3.0, is a graphical user interface to Oracle Data Mining. Oracle Data Miner uses a workflow paradigm to perform data mining tasks.

You can use Oracle Data Miner to explore data, build and evaluate multiple mining models, and apply the models to new data. By building workflows, you can capture and document the methodology you use to perform a range of mining tasks. You can save and share workflows.

To install and launch Oracle Data Miner: 

  1. Go to the following page on the Oracle Technology Network:

    http://www.oracle.com/technetwork/database/options/odm/dataminerworkflow-168677.html

  2. Follow the installation instructions provided on the page. The basic steps can be summarized as:

    1. Install Oracle Database (also described in Step One: Install the Database earlier in this chapter).

    2. Install Oracle SQL Developer 3.0, which includes Oracle Data Miner 11gR2.

    3. Install the Oracle Data Miner repository.

  3. For further instructions, use the Online Help provided by SQL Developer.

  4. For additional assistance, use the Oracle By Example tutorials. Links to the tutorials are available with the installation instructions at the URL provided in Step 1.

Note:

Oracle Data Miner Classic, the previous release of Oracle Data Mining, is still available for download on the Oracle Technology Network.

http://www.oracle.com/technetwork/database/options/advanced-analytics/odm/downloads/index.html

Oracle Data Miner Classic is no longer under active development.

Step Five: If You Want to Use the Spreadsheet Add-In

The Oracle Spreadsheet Add-In for Predictive Analytics lets you perform certain limited data mining operations in an Excel spreadsheet.

To install and launch the Spreadsheet Add-In: 

  1. Install Oracle Client and create a Net Service Name as described in "Oracle Client and Oracle Net".

  2. Download the Spreadsheet Add-In from the Oracle Technology Network.

    http://www.oracle.com/technetwork/database/options/odm/odm-pred-analytics-addin-092973.html
    
  3. Open the zip file and extract the contents to the Microsoft Office Library, typically:

    C:\Program Files\Microsoft Office\Office\Library
    
  4. Open Excel and click Tools > Add–Ins. Select Oracle Predictive Analytics from the Add–Ins dialog box. The OraclePA menu is added to the Excel toolbar.

  5. From the Add-In menu in Excel, choose Connect.

  6. In the Connect (Oracle Database) dialog:

    • Select the Net Service Name that you created.

    • Provide the user name and password of the data mining user.

    Click Connect to launch the Spreadsheet Add-In.

See:

"Optionally Install the Spreadsheet Add–In" for more detailed instructions

Step Six: If You Want to Use the Sample Programs

Follow these steps to install and configure the sample Data Mining programs:

  1. Install Oracle Database Examples as described in "Optionally Install Oracle Database Examples".

  2. The sample programs are copied to the RDBMS\demo subdirectory of the Oracle home directory. You can find the PL/SQL programs by searching for dm*.sql.

  3. Start SQL*Plus and connect to the database as the system user. Run the dmshgrants script. Specify the full path to the Oracle home directory and the name of the data mining user.

    @ ORACLE_HOME\RDBMS\demo\dmshgrants dmuser
    
  4. Connect to the database as the Data Mining user. Run the dmsh script.

    CONNECT dmuser
    @ ORACLE_HOME\RDBMS\demo\dmsh
    COMMIT;
    
  5. Once you have completed steps 1 through 4, you can run the PL/SQL programs.

    See:

    Chapter 7, "The Data Mining Sample Programs" for more detailed instructions