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

What's hot (11)

PPT
SynapseIndia dotnet development ajax client library
Synapseindiappsdevelopment
 
PPTX
Ajax and ASP.NET AJAX
Julie Iskander
 
PPT
Mvc architecture
Surbhi Panhalkar
 
PPT
ASP.NET 03 - Working With Web Server Controls
Randy Connolly
 
PPTX
Adrotator in asp
Sireesh K
 
PPTX
Sharepoint Saturday India Online best practice for developing share point sol...
Shakir Majeed Khan
 
PPTX
Visual studio-database-project
ClarionTechnologies
 
PPT
Ajax
Sanoj Kumar
 
PDF
Asp dot-net core problems and fixes
sonia merchant
 
PPT
Less13 3 e_loadmodule_3
Suresh Mishra
 
SynapseIndia dotnet development ajax client library
Synapseindiappsdevelopment
 
Ajax and ASP.NET AJAX
Julie Iskander
 
Mvc architecture
Surbhi Panhalkar
 
ASP.NET 03 - Working With Web Server Controls
Randy Connolly
 
Adrotator in asp
Sireesh K
 
Sharepoint Saturday India Online best practice for developing share point sol...
Shakir Majeed Khan
 
Visual studio-database-project
ClarionTechnologies
 
Asp dot-net core problems and fixes
sonia merchant
 
Less13 3 e_loadmodule_3
Suresh Mishra
 

Viewers also liked (6)

PDF
Web Services for Fun and Profit
Simon Willison
 
PPT
Optimizing Data Accessin Sq Lserver2005
rainynovember12
 
PPT
Open SQL & Internal Table
sapdocs. info
 
PPTX
Sql Basics And Advanced
rainynovember12
 
PPT
Module pool programming
Subhojit- Opekkhay
 
PDF
Cheap tricks for startups
Simon Willison
 
Web Services for Fun and Profit
Simon Willison
 
Optimizing Data Accessin Sq Lserver2005
rainynovember12
 
Open SQL & Internal Table
sapdocs. info
 
Sql Basics And Advanced
rainynovember12
 
Module pool programming
Subhojit- Opekkhay
 
Cheap tricks for startups
Simon Willison
 
Ad

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

PPTX
Data Mining With SQL Server
Hoan Phuc
 
PDF
Document Classification using DMX in SQL Server Analysis Services
Mark Tabladillo
 
PPTX
SQL Server: Data Mining
DataminingTools Inc
 
PPTX
MS Sql Server: Datamining Introduction
sqlserver content
 
PPTX
MS SQL SERVER: Using the data mining tools
sqlserver content
 
PPTX
MS SQL SERVER: Using the data mining tools
DataminingTools Inc
 
PPTX
Introduction To Sql Server Data Mining
Hugo Olivera Alonso
 
PDF
24 Hours of PASS -- Enterprise Data Mining with SQL Server
Mark Tabladillo
 
PPTX
MS SQL Server: Data mining concepts and dmx
sqlserver content
 
PPTX
MS SQL SERVER: Data mining concepts and dmx
DataminingTools Inc
 
PPT
Data Mining for Developers
llangit
 
PDF
SQL Saturday 119 Chicago -- Enterprise Data Mining with SQL Server
Mark Tabladillo
 
PDF
SQL Saturday 86 -- Enterprise Data Mining with SQL Server
Mark Tabladillo
 
PPTX
Minería de Datos en Sql Server 2008
Eduardo Castro
 
PDF
SQL Saturday 108 -- Enterprise Data Mining with SQL Server
Mark Tabladillo
 
PPS
11 qmds2005 session16
Niit Care
 
PPT
BI 2008 Simple
llangit
 
PDF
Data mining extensions dmx - reference
Steve Xu
 
PDF
SQL Saturday 109 -- Enterprise Data Mining with SQL Server
Mark Tabladillo
 
PDF
Developing with SQL Server Analysis Services 201310
Mark Tabladillo
 
Data Mining With SQL Server
Hoan Phuc
 
Document Classification using DMX in SQL Server Analysis Services
Mark Tabladillo
 
SQL Server: Data Mining
DataminingTools Inc
 
MS Sql Server: Datamining Introduction
sqlserver content
 
MS SQL SERVER: Using the data mining tools
sqlserver content
 
MS SQL SERVER: Using the data mining tools
DataminingTools Inc
 
Introduction To Sql Server Data Mining
Hugo Olivera Alonso
 
24 Hours of PASS -- Enterprise Data Mining with SQL Server
Mark Tabladillo
 
MS SQL Server: Data mining concepts and dmx
sqlserver content
 
MS SQL SERVER: Data mining concepts and dmx
DataminingTools Inc
 
Data Mining for Developers
llangit
 
SQL Saturday 119 Chicago -- Enterprise Data Mining with SQL Server
Mark Tabladillo
 
SQL Saturday 86 -- Enterprise Data Mining with SQL Server
Mark Tabladillo
 
Minería de Datos en Sql Server 2008
Eduardo Castro
 
SQL Saturday 108 -- Enterprise Data Mining with SQL Server
Mark Tabladillo
 
11 qmds2005 session16
Niit Care
 
BI 2008 Simple
llangit
 
Data mining extensions dmx - reference
Steve Xu
 
SQL Saturday 109 -- Enterprise Data Mining with SQL Server
Mark Tabladillo
 
Developing with SQL Server Analysis Services 201310
Mark Tabladillo
 
Ad

More from sqlserver content (20)

PPTX
MS SQL SERVER: SSIS and data mining
sqlserver content
 
PPTX
MS SQL SERVER: Olap cubes and data mining
sqlserver content
 
PPTX
MS SQL SERVER: Microsoft time series algorithm
sqlserver content
 
PPTX
MS SQL SERVER: Microsoft sequence clustering and association rules
sqlserver content
 
PPTX
MS SQL SERVER: Neural network and logistic regression
sqlserver content
 
PPTX
MS SQL SERVER: Microsoft naive bayes algorithm
sqlserver content
 
PPTX
MS SQL SERVER: Decision trees algorithm
sqlserver content
 
PPTX
MS Sql Server: Reporting models
sqlserver content
 
PPTX
MS Sql Server: Reporting manipulating data
sqlserver content
 
PPTX
MS Sql Server: Reporting introduction
sqlserver content
 
PPTX
MS Sql Server: Reporting basics
sqlserver content
 
PPTX
MS Sql Server: Business Intelligence
sqlserver content
 
PPTX
MS SQLSERVER:Feeding Data Into Database
sqlserver content
 
PPTX
MS SQLSERVER:Doing Calculations With Functions
sqlserver content
 
PPTX
MS SQLSERVER:Deleting A Database
sqlserver content
 
PPTX
MS SQLSERVER:Customizing Your D Base Design
sqlserver content
 
PPTX
MS SQLSERVER:Creating Views
sqlserver content
 
PPTX
MS SQLSERVER:Creating A Database
sqlserver content
 
PPTX
MS SQLSERVER:Advanced Query Concepts Copy
sqlserver content
 
PPTX
MS SQLSERVER:Joining Databases
sqlserver content
 
MS SQL SERVER: SSIS and data mining
sqlserver content
 
MS SQL SERVER: Olap cubes and data mining
sqlserver content
 
MS SQL SERVER: Microsoft time series algorithm
sqlserver content
 
MS SQL SERVER: Microsoft sequence clustering and association rules
sqlserver content
 
MS SQL SERVER: Neural network and logistic regression
sqlserver content
 
MS SQL SERVER: Microsoft naive bayes algorithm
sqlserver content
 
MS SQL SERVER: Decision trees algorithm
sqlserver content
 
MS Sql Server: Reporting models
sqlserver content
 
MS Sql Server: Reporting manipulating data
sqlserver content
 
MS Sql Server: Reporting introduction
sqlserver content
 
MS Sql Server: Reporting basics
sqlserver content
 
MS Sql Server: Business Intelligence
sqlserver content
 
MS SQLSERVER:Feeding Data Into Database
sqlserver content
 
MS SQLSERVER:Doing Calculations With Functions
sqlserver content
 
MS SQLSERVER:Deleting A Database
sqlserver content
 
MS SQLSERVER:Customizing Your D Base Design
sqlserver content
 
MS SQLSERVER:Creating Views
sqlserver content
 
MS SQLSERVER:Creating A Database
sqlserver content
 
MS SQLSERVER:Advanced Query Concepts Copy
sqlserver content
 
MS SQLSERVER:Joining Databases
sqlserver content
 

Recently uploaded (20)

PDF
“Squinting Vision Pipelines: Detecting and Correcting Errors in Vision Models...
Edge AI and Vision Alliance
 
PPTX
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
PDF
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 
PDF
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
PDF
“Computer Vision at Sea: Automated Fish Tracking for Sustainable Fishing,” a ...
Edge AI and Vision Alliance
 
PDF
NLJUG Speaker academy 2025 - first session
Bert Jan Schrijver
 
PDF
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
PDF
Automating Feature Enrichment and Station Creation in Natural Gas Utility Net...
Safe Software
 
PPTX
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
PDF
Kit-Works Team Study_20250627_한달만에만든사내서비스키링(양다윗).pdf
Wonjun Hwang
 
PPTX
Mastering ODC + Okta Configuration - Chennai OSUG
HathiMaryA
 
PDF
Staying Human in a Machine- Accelerated World
Catalin Jora
 
PDF
UPDF - AI PDF Editor & Converter Key Features
DealFuel
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PDF
🚀 Let’s Build Our First Slack Workflow! 🔧.pdf
SanjeetMishra29
 
PDF
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PPT
Ericsson LTE presentation SEMINAR 2010.ppt
npat3
 
PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
PDF
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
“Squinting Vision Pipelines: Detecting and Correcting Errors in Vision Models...
Edge AI and Vision Alliance
 
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
“Computer Vision at Sea: Automated Fish Tracking for Sustainable Fishing,” a ...
Edge AI and Vision Alliance
 
NLJUG Speaker academy 2025 - first session
Bert Jan Schrijver
 
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
Automating Feature Enrichment and Station Creation in Natural Gas Utility Net...
Safe Software
 
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
Kit-Works Team Study_20250627_한달만에만든사내서비스키링(양다윗).pdf
Wonjun Hwang
 
Mastering ODC + Okta Configuration - Chennai OSUG
HathiMaryA
 
Staying Human in a Machine- Accelerated World
Catalin Jora
 
UPDF - AI PDF Editor & Converter Key Features
DealFuel
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
🚀 Let’s Build Our First Slack Workflow! 🔧.pdf
SanjeetMishra29
 
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
Ericsson LTE presentation SEMINAR 2010.ppt
npat3
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 

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