SlideShare a Scribd company logo
Programming SQL Server Data Mining
overviewData Mining APIsProgramming AMO Data Mining ObjectsStored ProceduresCreating Stored ProceduresExecuting Stored ProceduresDeploying and Debugging Stored Procedure AssembliesSummary
Data Mining APIsThe major APIs used in Analysis Services programming.
Data Mining APIsThe major APIs used in Analysis Services programming.
Data Mining APIs
Programming AMO Data Mining Objects steps in programming data mining objects by using AMO create the data structure model.
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.
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
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
Create columns for the model. Each column needs a name and internal ID, a type, a content definition, and a binding.
Update the MiningStructure object to the server, by using the Update method of the object.MiningModel ObjectsSteps  to create a MiningModel object :Create the MiningModel object and populate the basic attributes. (object name, object ID, and mining algorithm specification)
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 ProceduresStored procedures can be used to call external routines from Microsoft SQL Server Analysis Services
 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.
Stored procedures can be used to add business functionality to your applications that is not provided by the native functionality of MDXCreating Stored ProceduresAll 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.
Executing Stored ProceduresServer 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.

More Related Content

PPT
Data controls ppt
PPT
Entity Framework Overview
PDF
70562 (1)
PPTX
ASP.NET 4.5 webforms
PPTX
ASP.NET Lecture 6
PDF
Migration to Extent Report 4
PPT
Lecture 6. ADO.NET Overview.
PPTX
ASP.NET MVC Fundamental
Data controls ppt
Entity Framework Overview
70562 (1)
ASP.NET 4.5 webforms
ASP.NET Lecture 6
Migration to Extent Report 4
Lecture 6. ADO.NET Overview.
ASP.NET MVC Fundamental

What's hot (11)

PPT
SynapseIndia dotnet development ajax client library
PPTX
Ajax and ASP.NET AJAX
PPT
Mvc architecture
PPT
ASP.NET 03 - Working With Web Server Controls
PPTX
Adrotator in asp
PPTX
Sharepoint Saturday India Online best practice for developing share point sol...
PPTX
Visual studio-database-project
PPT
PDF
Asp dot-net core problems and fixes
PPT
Less13 3 e_loadmodule_3
SynapseIndia dotnet development ajax client library
Ajax and ASP.NET AJAX
Mvc architecture
ASP.NET 03 - Working With Web Server Controls
Adrotator in asp
Sharepoint Saturday India Online best practice for developing share point sol...
Visual studio-database-project
Asp dot-net core problems and fixes
Less13 3 e_loadmodule_3
Ad

Viewers also liked (6)

PDF
Web Services for Fun and Profit
PPT
Optimizing Data Accessin Sq Lserver2005
PPT
Open SQL & Internal Table
PPTX
Sql Basics And Advanced
PPT
Module pool programming
PDF
Cheap tricks for startups
Web Services for Fun and Profit
Optimizing Data Accessin Sq Lserver2005
Open SQL & Internal Table
Sql Basics And Advanced
Module pool programming
Cheap tricks for startups
Ad

Similar to MS SQL SERVER: Programming sql server data mining (20)

DOCX
CAD Report
DOCX
MCS,BCS-7(A,B) Visual programming Syllabus for Final exams @ ISP
PPT
Overview of CSharp MVC3 and EF4
PPTX
Asp.net With mvc handson
PPTX
ASP.Net MVC 4 [Part - 2]
PPTX
Asp.net mvc presentation by Nitin Sawant
PPTX
Microsoft Entity Framework
PPTX
Entity Framework Code First Migrations
PPT
Asp.net mvc
PDF
Learn about dot net attributes
PPTX
Asp.Net MVC Intro
PDF
Dot Net Fundamentals
PDF
Asp 1a-aspnetmvc
PDF
Aspnetmvc 1
PDF
Mvc acchitecture
PDF
Divide and Conquer – Microservices with Node.js
PPSX
Net framework session03
PPTX
Novedades de MongoDB 3.6
PPTX
Session 1
PPTX
MS SQL SERVER: Using the data mining tools
CAD Report
MCS,BCS-7(A,B) Visual programming Syllabus for Final exams @ ISP
Overview of CSharp MVC3 and EF4
Asp.net With mvc handson
ASP.Net MVC 4 [Part - 2]
Asp.net mvc presentation by Nitin Sawant
Microsoft Entity Framework
Entity Framework Code First Migrations
Asp.net mvc
Learn about dot net attributes
Asp.Net MVC Intro
Dot Net Fundamentals
Asp 1a-aspnetmvc
Aspnetmvc 1
Mvc acchitecture
Divide and Conquer – Microservices with Node.js
Net framework session03
Novedades de MongoDB 3.6
Session 1
MS SQL SERVER: Using the data mining tools

More from sqlserver content (20)

PPTX
MS SQL SERVER: Using the data mining tools
PPTX
MS SQL SERVER: SSIS and data mining
PPTX
MS SQL SERVER: Olap cubes and data mining
PPTX
MS SQL SERVER: Microsoft time series algorithm
PPTX
MS SQL SERVER: Microsoft sequence clustering and association rules
PPTX
MS SQL SERVER: Neural network and logistic regression
PPTX
MS SQL SERVER: Microsoft naive bayes algorithm
PPTX
MS SQL SERVER: Decision trees algorithm
PPTX
MS SQL Server: Data mining concepts and dmx
PPTX
MS Sql Server: Reporting models
PPTX
MS Sql Server: Reporting manipulating data
PPTX
MS Sql Server: Reporting introduction
PPTX
MS Sql Server: Reporting basics
PPTX
MS Sql Server: Datamining Introduction
PPTX
MS Sql Server: Business Intelligence
PPTX
MS SQLSERVER:Feeding Data Into Database
PPTX
MS SQLSERVER:Doing Calculations With Functions
PPTX
MS SQLSERVER:Deleting A Database
PPTX
MS SQLSERVER:Customizing Your D Base Design
PPTX
MS SQLSERVER:Creating Views
MS SQL SERVER: Using the data mining tools
MS SQL SERVER: SSIS and data mining
MS SQL SERVER: Olap cubes and data mining
MS SQL SERVER: Microsoft time series algorithm
MS SQL SERVER: Microsoft sequence clustering and association rules
MS SQL SERVER: Neural network and logistic regression
MS SQL SERVER: Microsoft naive bayes algorithm
MS SQL SERVER: Decision trees algorithm
MS SQL Server: Data mining concepts and dmx
MS Sql Server: Reporting models
MS Sql Server: Reporting manipulating data
MS Sql Server: Reporting introduction
MS Sql Server: Reporting basics
MS Sql Server: Datamining Introduction
MS Sql Server: Business Intelligence
MS SQLSERVER:Feeding Data Into Database
MS SQLSERVER:Doing Calculations With Functions
MS SQLSERVER:Deleting A Database
MS SQLSERVER:Customizing Your D Base Design
MS SQLSERVER:Creating Views

Recently uploaded (20)

PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Empathic Computing: Creating Shared Understanding
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
Machine Learning_overview_presentation.pptx
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Spectral efficient network and resource selection model in 5G networks
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
Spectroscopy.pptx food analysis technology
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Empathic Computing: Creating Shared Understanding
Advanced methodologies resolving dimensionality complications for autism neur...
Machine Learning_overview_presentation.pptx
Encapsulation_ Review paper, used for researhc scholars
Spectral efficient network and resource selection model in 5G networks
“AI and Expert System Decision Support & Business Intelligence Systems”
20250228 LYD VKU AI Blended-Learning.pptx
Building Integrated photovoltaic BIPV_UPV.pdf
Unlocking AI with Model Context Protocol (MCP)
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
The Rise and Fall of 3GPP – Time for a Sabbatical?
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Chapter 3 Spatial Domain Image Processing.pdf
Per capita expenditure prediction using model stacking based on satellite ima...
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Digital-Transformation-Roadmap-for-Companies.pptx
Spectroscopy.pptx food analysis technology
The AUB Centre for AI in Media Proposal.docx
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton

MS SQL SERVER: Programming sql server data mining

  • 2. overviewData Mining APIsProgramming AMO Data Mining ObjectsStored ProceduresCreating Stored ProceduresExecuting Stored ProceduresDeploying and Debugging Stored Procedure AssembliesSummary
  • 3. Data Mining APIsThe major APIs used in Analysis Services programming.
  • 4. Data Mining APIsThe major APIs used in Analysis Services programming.
  • 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 ObjectsSteps 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 ProceduresStored 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 MDXCreating Stored ProceduresAll 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 ProceduresServer 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 AssembliesAfter 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 AssembliesTo 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 APIsProgramming AMO Data Mining ObjectsStored Procedures basicsDeploying and Debugging Stored Procedure AssembliesSummary
  • 19. Visit more self help tutorialsPick 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