SQL Server! Now with Built-In AI!


Microsoft asserts that SQL Server is the first database with "built-in" artificial intelligence. Of course, no phrase suffers more definitions than "artificial intelligence", so rather than quibble about AI, we'll just take a look at the technologies that support Microsoft's claim.

digital brain floating in digital space

Moving Machine Learning to the Server-Side

Great excitement followed the introduction of the integration of R with SQL Server 2016. In 2017, what was introduced as "R Server" acquired support for Python and was re-dubbed as "Machine Learning Server". In each case, the operative word is "Server". Traditionally, AI applications queried relational data and processed it, just like any other client application. The movement of machine-learning code to the server marks an expanding appreciation of the fact that machine-learning is no longer a specialty application to be run on a few workstations. Machine Learning is now seen as a primary service which, like database access itself, needs to be made readily available to many clients. We can now bring the AI to the data rather than bring data to the AI.

New Potential for Hardware Acceleration

Less attention has been paid to the new opportunities for hardware acceleration that have emerged as machine-learning applications become built-in to the server-side. True, hardware acceleration is fundamental to the architecture of machine learning platforms like Google's Tensorflow and Microsoft's Cognitive Toolkit. However, these platforms, at least at present, remain in the domain of the experienced developer rather than the data analyst. With ever-increasing concerns about scalability and performance, hardware acceleration is no longer a luxury just for the few.

For a long time now, the many multiple floating-point cores found in high-end graphics processing units (GPUs) have been applied to computationally intensive analytical and machine-learning tasks. Since such tasks are rare (one might say nonexistent) in the day-to-day operations of a relational database, so SQL Server administrators have had little motivation to become interested in GPU technology. Now, however, this situation has changed. Machine learning tasks launched by SQL Server can take advantage of GPU computing power since access to GPU acceleration is provided by custom packages in both R and Python.

The MicrosoftML, once configured for GPU use, can seamlessly take advantage of this additional computing power for neural network algorithms, without requiring any additional coding or effort on the part of the data analyst.

MicrosoftML for R and Python

MicrosoftML is one of the packages provided by Microsoft in the Machine Learning Server. (It is also provided with Microsoft R Client). Of course, not all the functions provided by MicrosoftML would benefit from GPU acceleration. Indeed, not all would benefit from multiple conventional processors. However, artificial neural networks require substantial computing power and can benefit greatly from the acceleration provided by GPUs. The rxNeuralNet( ) function in MachineLearningML will automatically take advantage of available GPU power leading to faster computation and reduced contention for the primary CPU cores.

Generally, the application of neural networks requires a great deal of effort, both in the development of code and in the training of the networks themselves. In MicrosoftML, Microsoft provides built-in artificial intelligence in the form of ready-to-go pre-trained neural net models. At present four pre-trained models are provided, focusing on image recognition and the sentiment analysis of text such as that from Twitter feeds or emails. Developers and machine learning aficionados will be interested to know that these models were trained using the Microsoft Cognitive Toolkit, often just called the CNTK.


Some years ago, Microsoft started down the path leading to "self-service" business intelligence. In other words, they wanted analysts and report writers of every description to be able to make use of BI tools without relying on the assistance of folks from the IT department. With the introduction of Machine Learning Server and MicrosoftML functions, Microsoft has taken the first steps heading towards self-service AI.

Related Training:
SQL Server Training

AUTHOR: Dan Buskirk

Dan Buskirk

Written by Dan Buskirk

The pleasures of the table belong to all ages.” Actually, Brillat-Savaron was talking about the dinner table, but the quote applies equally well to Dan’s other big interest, tables of data. Dan has worked with Microsoft Excel since the Dark Ages and has utilized SQL Server since Windows NT first became available to developers as a beta (it was 32 bits! wow!). Since then, Dan has helped corporations and government agencies gather, store, and analyze data and has also taught and mentored their teams using the Microsoft Business Intelligence Stack to impose order on chaos. Dan has taught Learning Tree in Learning Tree’s SQL Server & Microsoft Office curriculums for over 14 years. In addition to his professional data and analysis work, Dan is a proponent of functional programming techniques in general, especially Microsoft’s new .NET functional language F#. Dan enjoys speaking at .NET and F# user’s groups on these topics.

Chat With Us