• Save
MS SQL SERVER: Programming sql server data mining
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

MS SQL SERVER: Programming sql server data mining

on

  • 2,523 views

MS SQL SERVER: Programming sql server data mining

MS SQL SERVER: Programming sql server data mining

Statistics

Views

Total Views
2,523
Views on SlideShare
2,517
Embed Views
6

Actions

Likes
0
Downloads
0
Comments
0

2 Embeds 6

http://www.dataminingtools.net 3
http://dataminingtools.net 3

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

MS SQL SERVER: Programming sql server data mining Presentation Transcript

  • 1. Programming SQL Server Data Mining
  • 2. overview
    Data Mining APIs
    Programming AMO Data Mining Objects
    Stored Procedures
    Creating Stored Procedures
    Executing Stored Procedures
    Deploying and Debugging Stored Procedure Assemblies
    Summary
  • 3. Data Mining APIs
    The major APIs used in Analysis Services programming.
  • 4. Data Mining APIs
    The major APIs used in Analysis Services programming.
  • 5. Data Mining APIs
  • 6. Programming AMO Data Mining Objects
    steps in programming data mining objects by using AMO
    • create the data structure model.
    • 7. create the data mining model that supports the mining algorithm you want to use in order to predict or to find the relationships underlying your data.
    • 8. process the mining models to obtain the trained models that you will use later when querying and predicting from the client application.
    Note: AMO is not for querying; AMO is for managing and administering your mining structures and models.
    To query your data, use ADOMD.NET
  • 9. Mining Structure Objects
    A mining structure contains a binding to a data source view that is defined in the database, and contains definitions for all columns participating in the mining models
    Steps followed to Creating a MiningStructure object are:
    • Create the MiningStructure object and populate the basic attributes
    • 10. Create columns for the model. Each column needs a name and internal ID, a type, a content definition, and a binding.
    • 11. Update the MiningStructure object to the server, by using the Update method of the object.
  • MiningModel Objects
    Steps to create a MiningModel object :
    • Create the MiningModel object and populate the basic attributes. (object name, object ID, and mining algorithm specification)
    • 12. Add the columns of the mining model.
    One of the columns must be defined as the case key.
    • Update the MiningModel object to the server, by using the Update method of the object.MiningModel objects can be processed independently of other models in the parent MiningStructure.
  • Stored Procedures
    • Stored procedures can be used to call external routines from Microsoft SQL Server Analysis Services
    • 13. You can write an external routines called by a stored procedure in any common language runtime (CLR) language, such as C, C++, C#, Visual Basic, or Visual Basic .NET.
    • 14. Stored procedures can be used to add business functionality to your applications that is not provided by the native functionality of MDX
  • Creating Stored Procedures
    All stored procedures must be associated with a common language runtime (CLR) or Component Object Model (COM) class in order to be used.
    The class must be installed on the server — usually in the form of a Microsoft ActiveX® dynamic link library (DLL) — and registered as an assembly on the server or in an Analysis Services database.
    Server stored procedures can be called from any query context.
    Database stored procedures can only be accessed if the database context is the database under which the stored procedure is defined.
    For a server or a deployed Microsoft SQL Server Analysis Services database on a server, you can use SQL Server Management Studio to register an assembly.
    For an Analysis Services project, you can use Analysis Services Designer to register an assembly in the project.
  • 15. Executing Stored Procedures
    Server ADOMD.NET allows you to execute DMX queries using the same objects that you would use with ADOMD.NET.
    The only exception is that you do not have to specify a connection, because you are already connected.
    You can copy the results from the query into a DataTable, or you can simply return the DataReader returned by ExecuteReader.
  • 16. Deploying and Debugging Stored Procedure Assemblies
    After Compiling and building the stored procedure, you must deploy the procedure to your Analysis Server in order to call it from DMX.
    To add a .NET assembly to your Analysis Services project, right-click the Assemblies folder in Solution Explorer and select New Assembly Reference.
    select some security-related options, such as Permissions and Impersonation information.
    The Permissions property specifies the code access permissions that are granted to the assembly when it’s loaded by Analysis Services.
    The recommended (and default) value is Safe.
  • 17. Deploying and Debugging Stored Procedure Assemblies
    To debug the assembly in Visual Studio, select Attach to Process from the Debug menu.
    Select the executable msmdsrv.exe from the list, and ensure that the dialog box displays CLR as the Attach To option.
    you will be able to set breakpoints in your stored procedures at the end.
  • 18. Major Data Mining APIs
    Programming AMO Data Mining Objects
    Stored Procedures basics
    Deploying and Debugging Stored Procedure Assemblies
    Summary
  • 19. Visit more self help tutorials
    Pick a tutorial of your choice and browse through it at your own pace.
    The tutorials section is free, self-guiding and will not involve any additional support.
    Visit us at www.dataminingtools.net