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

PPTX
SQL Server Workshop for Developers - Visual Studio Live! NY 2012
PPT
For Beginers - ADO.Net
PPT
ASP.NET 10 - Data Controls
PPTX
For Beginners - Ado.net
PPTX
Ch 7 data binding
PPTX
Ch06 ado.net fundamentals
PPTX
Databind in asp.net
SQL Server Workshop for Developers - Visual Studio Live! NY 2012
For Beginers - ADO.Net
ASP.NET 10 - Data Controls
For Beginners - Ado.net
Ch 7 data binding
Ch06 ado.net fundamentals
Databind in asp.net

What's hot (20)

PPT
5\9 SSIS 2008R2_Training - DataFlow Basics
PPT
6.2\9 SSIS 2008R2_Training - DataFlow Transformations
PPT
Introduction to ADO.NET
PPT
Chap14 ado.net
PPTX
Ado .net
PPT
Ado.net
PPT
SQL Server 2008 for Developers
PPT
Tech Days09 Sqldev
PPSX
ADO.NET
PPT
ASP.NET 08 - Data Binding And Representation
PPT
6.1\9 SSIS 2008R2_Training - DataFlow Transformations
PPT
Database Connection
PPTX
Stored procedure tuning and optimization t sql
PPTX
Web based database application design using vb.net and sql server
PPT
Database programming in vb net
PPT
Ado.net
PPTX
U-SQL Does SQL (SQLBits 2016)
PPTX
Ado.Net Tutorial
PPSX
MS SQL Server
5\9 SSIS 2008R2_Training - DataFlow Basics
6.2\9 SSIS 2008R2_Training - DataFlow Transformations
Introduction to ADO.NET
Chap14 ado.net
Ado .net
Ado.net
SQL Server 2008 for Developers
Tech Days09 Sqldev
ADO.NET
ASP.NET 08 - Data Binding And Representation
6.1\9 SSIS 2008R2_Training - DataFlow Transformations
Database Connection
Stored procedure tuning and optimization t sql
Web based database application design using vb.net and sql server
Database programming in vb net
Ado.net
U-SQL Does SQL (SQLBits 2016)
Ado.Net Tutorial
MS SQL Server
Ad

Viewers also liked (20)

PPTX
Classification
ODP
Oratoria E RetóRica Latinas
PPT
Survival Strategies For Testers
PPTX
SPSS: Data Editor
PPTX
MS Sql Server: Manipulating Database
PPT
LíRica Latina 2ºBac Lara Lozano
PDF
Direct-services portfolio
PPTX
R: Apply Functions
PPTX
Control Statements in Matlab
PPTX
LISP: Scope and extent in lisp
PPTX
Procedures And Functions in Matlab
PPT
Festivals Refuerzo
PDF
Cinnamonhotel saigon 2013_01
PPTX
Introduction To Programming in Matlab
PPTX
MySql:Introduction
PPTX
RapidMiner: Nested Subprocesses
PDF
Ontwikkeling In Eigen Handen Nl Web
PPTX
LISP: Declarations In Lisp
PPTX
Drc 2010 D.J.Pawlik
PPTX
Txomin Hartz Txikia
Classification
Oratoria E RetóRica Latinas
Survival Strategies For Testers
SPSS: Data Editor
MS Sql Server: Manipulating Database
LíRica Latina 2ºBac Lara Lozano
Direct-services portfolio
R: Apply Functions
Control Statements in Matlab
LISP: Scope and extent in lisp
Procedures And Functions in Matlab
Festivals Refuerzo
Cinnamonhotel saigon 2013_01
Introduction To Programming in Matlab
MySql:Introduction
RapidMiner: Nested Subprocesses
Ontwikkeling In Eigen Handen Nl Web
LISP: Declarations In Lisp
Drc 2010 D.J.Pawlik
Txomin Hartz Txikia
Ad

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

PPTX
Data Mining With SQL Server
PDF
Document Classification using DMX in SQL Server Analysis Services
PPTX
SQL Server: Data Mining
PPTX
MS Sql Server: Datamining Introduction
PPTX
MS SQL SERVER: Using the data mining tools
PPTX
MS SQL SERVER: Using the data mining tools
PPTX
Introduction To Sql Server Data Mining
PDF
24 Hours of PASS -- Enterprise Data Mining with SQL Server
PPTX
MS SQL Server: Data mining concepts and dmx
PPTX
MS SQL SERVER: Data mining concepts and dmx
PPT
Data Mining for Developers
PDF
SQL Saturday 119 Chicago -- Enterprise Data Mining with SQL Server
PDF
SQL Saturday 86 -- Enterprise Data Mining with SQL Server
PPTX
Minería de Datos en Sql Server 2008
PDF
SQL Saturday 108 -- Enterprise Data Mining with SQL Server
PPS
11 qmds2005 session16
PPT
BI 2008 Simple
PDF
Data mining extensions dmx - reference
PDF
SQL Saturday 109 -- Enterprise Data Mining with SQL Server
PDF
Developing with SQL Server Analysis Services 201310
Data Mining With SQL Server
Document Classification using DMX in SQL Server Analysis Services
SQL Server: Data Mining
MS Sql Server: Datamining Introduction
MS SQL SERVER: Using the data mining tools
MS SQL SERVER: Using the data mining tools
Introduction To Sql Server Data Mining
24 Hours of PASS -- Enterprise Data Mining with SQL Server
MS SQL Server: Data mining concepts and dmx
MS SQL SERVER: Data mining concepts and dmx
Data Mining for Developers
SQL Saturday 119 Chicago -- Enterprise Data Mining with SQL Server
SQL Saturday 86 -- Enterprise Data Mining with SQL Server
Minería de Datos en Sql Server 2008
SQL Saturday 108 -- Enterprise Data Mining with SQL Server
11 qmds2005 session16
BI 2008 Simple
Data mining extensions dmx - reference
SQL Saturday 109 -- Enterprise Data Mining with SQL Server
Developing with SQL Server Analysis Services 201310

More from DataminingTools Inc (20)

PPTX
Terminology Machine Learning
PPTX
Techniques Machine Learning
PPTX
Machine learning Introduction
PPTX
Areas of machine leanring
PPTX
AI: Planning and AI
PPTX
AI: Logic in AI 2
PPTX
AI: Logic in AI
PPTX
AI: Learning in AI 2
PPTX
AI: Learning in AI
PPTX
AI: Introduction to artificial intelligence
PPTX
AI: Belief Networks
PPTX
AI: AI & Searching
PPTX
AI: AI & Problem Solving
PPTX
Data Mining: Text and web mining
PPTX
Data Mining: Outlier analysis
PPTX
Data Mining: Mining stream time series and sequence data
PPTX
Data Mining: Mining ,associations, and correlations
PPTX
Data Mining: Graph mining and social network analysis
PPTX
Data warehouse and olap technology
PPTX
Data Mining: Data processing
Terminology Machine Learning
Techniques Machine Learning
Machine learning Introduction
Areas of machine leanring
AI: Planning and AI
AI: Logic in AI 2
AI: Logic in AI
AI: Learning in AI 2
AI: Learning in AI
AI: Introduction to artificial intelligence
AI: Belief Networks
AI: AI & Searching
AI: AI & Problem Solving
Data Mining: Text and web mining
Data Mining: Outlier analysis
Data Mining: Mining stream time series and sequence data
Data Mining: Mining ,associations, and correlations
Data Mining: Graph mining and social network analysis
Data warehouse and olap technology
Data Mining: Data processing

Recently uploaded (20)

PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
KodekX | Application Modernization Development
PDF
Modernizing your data center with Dell and AMD
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPT
Teaching material agriculture food technology
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Machine learning based COVID-19 study performance prediction
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
cuic standard and advanced reporting.pdf
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Encapsulation theory and applications.pdf
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Review of recent advances in non-invasive hemoglobin estimation
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Approach and Philosophy of On baking technology
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
KodekX | Application Modernization Development
Modernizing your data center with Dell and AMD
Spectral efficient network and resource selection model in 5G networks
Reach Out and Touch Someone: Haptics and Empathic Computing
Teaching material agriculture food technology
“AI and Expert System Decision Support & Business Intelligence Systems”
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Machine learning based COVID-19 study performance prediction
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
NewMind AI Weekly Chronicles - August'25 Week I
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
cuic standard and advanced reporting.pdf
Building Integrated photovoltaic BIPV_UPV.pdf
Encapsulation theory and applications.pdf
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Review of recent advances in non-invasive hemoglobin estimation
The AUB Centre for AI in Media Proposal.docx
Approach and Philosophy of On baking technology
Advanced methodologies resolving dimensionality complications for autism neur...

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