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)

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

Viewers also liked (6)

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

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

CAD Report
CAD Report
Jyoti Tyagi
 
MCS,BCS-7(A,B) Visual programming Syllabus for Final exams @ ISP
MCS,BCS-7(A,B) Visual programming Syllabus for Final exams @ ISP
Ali Shah
 
Overview of CSharp MVC3 and EF4
Overview of CSharp MVC3 and EF4
Rich Helton
 
Asp.net With mvc handson
Asp.net With mvc handson
Prashant Kumar
 
ASP.Net MVC 4 [Part - 2]
ASP.Net MVC 4 [Part - 2]
Mohamed Abdeen
 
Asp.net mvc presentation by Nitin Sawant
Asp.net mvc presentation by Nitin Sawant
Nitin S
 
Microsoft Entity Framework
Microsoft Entity Framework
Mahmoud Tolba
 
Entity Framework Code First Migrations
Entity Framework Code First Migrations
Diluka99999
 
Asp.net mvc
Asp.net mvc
Taranjeet Singh
 
Learn about dot net attributes
Learn about dot net attributes
sonia merchant
 
Asp.Net MVC Intro
Asp.Net MVC Intro
Stefano Paluello
 
Dot Net Fundamentals
Dot Net Fundamentals
LiquidHub
 
Asp 1a-aspnetmvc
Asp 1a-aspnetmvc
Fajar Baskoro
 
Aspnetmvc 1
Aspnetmvc 1
Fajar Baskoro
 
Mvc acchitecture
Mvc acchitecture
laxmi.katkar
 
Divide and Conquer – Microservices with Node.js
Divide and Conquer – Microservices with Node.js
Sebastian Springer
 
Net framework session03
Net framework session03
Vivek Singh Chandel
 
Novedades de MongoDB 3.6
Novedades de MongoDB 3.6
MongoDB
 
Session 1
Session 1
Asif Atick
 
MS SQL SERVER: Using the data mining tools
MS SQL SERVER: Using the data mining tools
DataminingTools Inc
 
MCS,BCS-7(A,B) Visual programming Syllabus for Final exams @ ISP
MCS,BCS-7(A,B) Visual programming Syllabus for Final exams @ ISP
Ali Shah
 
Overview of CSharp MVC3 and EF4
Overview of CSharp MVC3 and EF4
Rich Helton
 
Asp.net With mvc handson
Asp.net With mvc handson
Prashant Kumar
 
ASP.Net MVC 4 [Part - 2]
ASP.Net MVC 4 [Part - 2]
Mohamed Abdeen
 
Asp.net mvc presentation by Nitin Sawant
Asp.net mvc presentation by Nitin Sawant
Nitin S
 
Microsoft Entity Framework
Microsoft Entity Framework
Mahmoud Tolba
 
Entity Framework Code First Migrations
Entity Framework Code First Migrations
Diluka99999
 
Learn about dot net attributes
Learn about dot net attributes
sonia merchant
 
Dot Net Fundamentals
Dot Net Fundamentals
LiquidHub
 
Divide and Conquer – Microservices with Node.js
Divide and Conquer – Microservices with Node.js
Sebastian Springer
 
Novedades de MongoDB 3.6
Novedades de MongoDB 3.6
MongoDB
 
MS SQL SERVER: Using the data mining tools
MS SQL SERVER: Using the data mining tools
DataminingTools Inc
 
Ad

More from sqlserver content (20)

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

Recently uploaded (20)

“From Enterprise to Makers: Driving Vision AI Innovation at the Extreme Edge,...
“From Enterprise to Makers: Driving Vision AI Innovation at the Extreme Edge,...
Edge AI and Vision Alliance
 
Oracle Cloud Infrastructure Generative AI Professional
Oracle Cloud Infrastructure Generative AI Professional
VICTOR MAESTRE RAMIREZ
 
Edge-banding-machines-edgeteq-s-200-en-.pdf
Edge-banding-machines-edgeteq-s-200-en-.pdf
AmirStern2
 
PyData - Graph Theory for Multi-Agent Integration
PyData - Graph Theory for Multi-Agent Integration
barqawicloud
 
vertical-cnc-processing-centers-drillteq-v-200-en.pdf
vertical-cnc-processing-centers-drillteq-v-200-en.pdf
AmirStern2
 
“Why It’s Critical to Have an Integrated Development Methodology for Edge AI,...
“Why It’s Critical to Have an Integrated Development Methodology for Edge AI,...
Edge AI and Vision Alliance
 
FIDO Seminar: Targeting Trust: The Future of Identity in the Workforce.pptx
FIDO Seminar: Targeting Trust: The Future of Identity in the Workforce.pptx
FIDO Alliance
 
No-Code Workflows for CAD & 3D Data: Scaling AI-Driven Infrastructure
No-Code Workflows for CAD & 3D Data: Scaling AI-Driven Infrastructure
Safe Software
 
Data Validation and System Interoperability
Data Validation and System Interoperability
Safe Software
 
Your startup on AWS - How to architect and maintain a Lean and Mean account
Your startup on AWS - How to architect and maintain a Lean and Mean account
angelo60207
 
Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...
Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...
Anish Kumar
 
Crypto Super 500 - 14th Report - June2025.pdf
Crypto Super 500 - 14th Report - June2025.pdf
Stephen Perrenod
 
FIDO Seminar: Authentication for a Billion Consumers - Amazon.pptx
FIDO Seminar: Authentication for a Billion Consumers - Amazon.pptx
FIDO Alliance
 
Integration of Utility Data into 3D BIM Models Using a 3D Solids Modeling Wor...
Integration of Utility Data into 3D BIM Models Using a 3D Solids Modeling Wor...
Safe Software
 
High Availability On-Premises FME Flow.pdf
High Availability On-Premises FME Flow.pdf
Safe Software
 
FME for Good: Integrating Multiple Data Sources with APIs to Support Local Ch...
FME for Good: Integrating Multiple Data Sources with APIs to Support Local Ch...
Safe Software
 
ENERGY CONSUMPTION CALCULATION IN ENERGY-EFFICIENT AIR CONDITIONER.pdf
ENERGY CONSUMPTION CALCULATION IN ENERGY-EFFICIENT AIR CONDITIONER.pdf
Muhammad Rizwan Akram
 
MuleSoft for AgentForce : Topic Center and API Catalog
MuleSoft for AgentForce : Topic Center and API Catalog
shyamraj55
 
Floods in Valencia: Two FME-Powered Stories of Data Resilience
Floods in Valencia: Two FME-Powered Stories of Data Resilience
Safe Software
 
Kubernetes Security Act Now Before It’s Too Late
Kubernetes Security Act Now Before It’s Too Late
Michael Furman
 
“From Enterprise to Makers: Driving Vision AI Innovation at the Extreme Edge,...
“From Enterprise to Makers: Driving Vision AI Innovation at the Extreme Edge,...
Edge AI and Vision Alliance
 
Oracle Cloud Infrastructure Generative AI Professional
Oracle Cloud Infrastructure Generative AI Professional
VICTOR MAESTRE RAMIREZ
 
Edge-banding-machines-edgeteq-s-200-en-.pdf
Edge-banding-machines-edgeteq-s-200-en-.pdf
AmirStern2
 
PyData - Graph Theory for Multi-Agent Integration
PyData - Graph Theory for Multi-Agent Integration
barqawicloud
 
vertical-cnc-processing-centers-drillteq-v-200-en.pdf
vertical-cnc-processing-centers-drillteq-v-200-en.pdf
AmirStern2
 
“Why It’s Critical to Have an Integrated Development Methodology for Edge AI,...
“Why It’s Critical to Have an Integrated Development Methodology for Edge AI,...
Edge AI and Vision Alliance
 
FIDO Seminar: Targeting Trust: The Future of Identity in the Workforce.pptx
FIDO Seminar: Targeting Trust: The Future of Identity in the Workforce.pptx
FIDO Alliance
 
No-Code Workflows for CAD & 3D Data: Scaling AI-Driven Infrastructure
No-Code Workflows for CAD & 3D Data: Scaling AI-Driven Infrastructure
Safe Software
 
Data Validation and System Interoperability
Data Validation and System Interoperability
Safe Software
 
Your startup on AWS - How to architect and maintain a Lean and Mean account
Your startup on AWS - How to architect and maintain a Lean and Mean account
angelo60207
 
Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...
Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...
Anish Kumar
 
Crypto Super 500 - 14th Report - June2025.pdf
Crypto Super 500 - 14th Report - June2025.pdf
Stephen Perrenod
 
FIDO Seminar: Authentication for a Billion Consumers - Amazon.pptx
FIDO Seminar: Authentication for a Billion Consumers - Amazon.pptx
FIDO Alliance
 
Integration of Utility Data into 3D BIM Models Using a 3D Solids Modeling Wor...
Integration of Utility Data into 3D BIM Models Using a 3D Solids Modeling Wor...
Safe Software
 
High Availability On-Premises FME Flow.pdf
High Availability On-Premises FME Flow.pdf
Safe Software
 
FME for Good: Integrating Multiple Data Sources with APIs to Support Local Ch...
FME for Good: Integrating Multiple Data Sources with APIs to Support Local Ch...
Safe Software
 
ENERGY CONSUMPTION CALCULATION IN ENERGY-EFFICIENT AIR CONDITIONER.pdf
ENERGY CONSUMPTION CALCULATION IN ENERGY-EFFICIENT AIR CONDITIONER.pdf
Muhammad Rizwan Akram
 
MuleSoft for AgentForce : Topic Center and API Catalog
MuleSoft for AgentForce : Topic Center and API Catalog
shyamraj55
 
Floods in Valencia: Two FME-Powered Stories of Data Resilience
Floods in Valencia: Two FME-Powered Stories of Data Resilience
Safe Software
 
Kubernetes Security Act Now Before It’s Too Late
Kubernetes Security Act Now Before It’s Too Late
Michael Furman
 

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