Readme_SQL Server Plug-In Algorithms

[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

This sample works only with SQL Server 2005 and SQL Server 2008. It will not work with any version of SQL Server earlier than SQL Server 2005.

Microsoft SQL Server Analysis Services provides a complete framework that enables third-party data mining providers to integrate the following data mining objects into Analysis Services:

  • Data mining algorithms, known as plug-in algorithms.
  • Data mining viewers, known as plug-in viewers.
  • Data Mining Web Controls Library, a library that extends data mining viewers to the Web. For more information, see Readme_Data Mining Web Controls Library in SQL Server Books Online.

To help you understand how to implement data mining algorithms and viewers into Analysis Services, this readme provides instructions for the following samples:

  • Data Mining Algorithm Plug-In
    This sample allows data mining algorithm developers to concentrate on the algorithm instead of on the implementation issues.
  • Data Mining Viewer Plug-In
    This sample allows third-party algorithm providers to use their own viewers to display their new discovered patterns.

The documents and source code associated with each of these samples are located in the C:\Program Files\Microsoft SQL Server\100\Samples\Analysis Services\DataMining\SQL Server Data Mining Plug-In Algorithms folder. Included in this folder are tutorials that describe how to implement and use each of these samples.

Note

By default, the samples are not installed. To install samples, run Setup and use the Advanced option as described in the topic Running Setup to Install AdventureWorks Sample Databases and Samples in SQL Server Books Online.

An updated version of AdventureWorks2008R2 database is also available for download on the Web page.

An updated version of the SQL Server Database Engine samples is also available for download on the Web page.

Note

SQL Server Business Intelligence Development Studio is not supported on computers that run the Itanium-based platform; the 64-bit development environment is supported on x64-based platforms. SQL Server samples can be modified and run on computers that run either x86 or x64-based platforms when databases used by the samples are deployed on an Itanium-based platform.

Scenario

A provider wants to integrate a new data mining algorithm, which is named Pair-wise Linear Regression, into Analysis Services. After integrating this new algorithm into Analysis Services, the provider wants add a new viewer for the Pair-wise Linear Regression algorithm.

Languages

  • C++, for the algorithms.
  • C#, for the viewer.

Features

Algorithm Plug-In

Interface Explanation

IDMAlgorithm

Implements both a model-producing learning algorithm and the prediction operations of the resulting model.

IDMAlgorithmNavigation

Enables browsers to access the content of your model.

IDMPersist

Enables the models learned by your algorithm to be saved and loaded by Analysis Services.

IDMAlgorithmMetadata

Describes the capabilities and input parameters of your learning algorithm.

IDMAlgorithmFactory

Creates instances of the objects that implement the algorithm interface and provides Analysis Services access to the algorithm metadata interface.

Viewer Plug-In

Interface Explanation

IMiningModelViewerControl

Implements the viewer.

Prerequisites

Before you run this sample, you should have the following software is installed:

  • Microsoft SQL Server, which includes the following components:
    • SQL Server Database Engine
    • Analysis Services
    • SQL Server Management Studio
    • Business Intelligence Development Studio
    • Two sample databases—AdventureWorksDW (data warehouse) and AdventureWorks (OLTP)
    • Analysis Services Samples
    • Adventure Works DW sample Analysis Services project, deployed to an instance of Analysis Services
    • Microsoft Visual Studio 2005

Building the Samples

Before building the plug-in samples, you must deploy both the AdventureWorksDW (data warehouse) and AdventureWorks (OLTP) databases.

To deploy the Adventure Works DW and AdventureWorks sample databases

  1. In Windows Explorer, open C:\Program Files\Microsoft SQL Server\100\Tools\Samples, and then double-click the SQLServerSamples.msi file.

  2. In Windows Explorer, open C:\Program Files\Microsoft SQL Server\100\Tools\Samples\AdventureWorks Analysis Services Project, open the folder corresponding to the version of SQL Server that has been installed, and then double-click the Adventure Works.sln file.

    The Adventure Works DW project opens in Business Intelligence Development Studio.

  3. Press F5 to build and deploy the project.

    Note

    Building and deploying the AdventureWorksAS project deploys the mining model to the server.

After you deploy the databases, you can implement the algorithm and viewer plug-ins.

To implement and use the data mining algorithm plug-ins

  1. In Windows Explorer, open C:\Program Files\Microsoft SQL Server\100\Samples\Analysis Services\DataMining\SQL Server Data Mining Plug-In Algorithms, and then double-click the SQL Server Data Mining Plug-In Algorithms Tutorial.doc file.

    Note

    Implementing the plug-in sample might be easier for you if you print the tutorial and then use the printout to complete the tutorial.

  2. To build the Pair-wise Linear Regression Algorithm plug-in, complete Chapter 6, "Building a Shell Plug-In Algorithm" in the tutorial.

  3. To customize the Pair-wise Linear Regression Algorithm plug-in, complete Chapter 7, "Customizing the Algorithm: Pair-wise Linear Regression" in the tutorial.

  4. To use the customized Pair-wise Linear Regression Algorithm plug-in, complete Chapter 8, "Using the Customized Plug-In Algorithm" in the tutorial.

To implement the proprietary viewer

  1. In Windows Explorer, locate C:\Program Files\Microsoft SQL Server\100\Samples\Analysis Services\DataMining\SQL Server Data Mining Plug-In Algorithms, and then double-click the SQL Server Data Mining Plug-In Viewers Tutorial.doc file.

    Note

    Implementing the plug-in sample might be easier for you if you print the tutorial and then use the printout to complete the tutorial.

  2. Complete all steps in the tutorial.

Comments

To obtain a better understanding about how to implement plug-in algorithms, read the file, SQL Server Data Mining Plug-In Algorithms Whitepaper.doc, which is included with the sample tutorials.

See Also

Tasks

Readme_Data Mining Web Controls Library

Help and Information

Getting SQL Server 2008 R2 Assistance