Saturday, June 1, 2024

Unlocking Insights, Automating Decisions, and Transforming Businesses with SQL Server AI

 The world is datacentric and everything moves based on data. SQL Server is a database management system and takes care of every aspect of data, from second to second management by online transaction processing (OLTP) to mining stored, archived data that includes data that streams (OLAP).

Data and Data Science:

Raw data can be enormous and the only way to give meaning and take out value out is the role of analytics. The advanced analytics handlers are the data science professionals. They go through the mountain of data and distil out the most useful, and the most relevant information. The success of a company, or organization is dependent on these professionals. All of these example following use cases and many more not mentioned here may be cited: credit risk assessments; managing customer/employee churn; hospitalization metrices; targeted sales & campaigns, etc.

Data Science using SQL Server:

SQL Server is a very comprehensive, database management system well suited for everything related to data present anywhere from OLTP data to OLAP data. It can be present both on site and in the cloud and integrated with the AZURE cloud which in turn is integrated with a myriad of other data related applications not only from Microsoft but from many other applications. Doing data science with SQL Server results in high value and high returns.

Data scientists can connect to a myriad of databases that can be used to train data and test the machine learning tool at their hands.

Where does AI come in or fit in?

The data scientists access the data from the client's database and combine with data from other sources to develop models using R software for joining the data and filtering based on criteria. They may begin shaping the data by creating extra informational features like new columns, or useful data partitioned or transformed, etc. This data shaping lays the foundation for predictive analytics. Going a step further they can put into operation a plan for the model that applications can use for producing useful outputs in the form of a predictive model.

This just one scenario where data is taken out of database and worked upon to get at the useful information by creating models. How easy is it? Moving large amounts of data in and out of database comes at a cost. Thinking about cost and other contingent aspects like the location of data, the security of data (that was not mentioned so far), the latency involved if geographically separated sites are involved, and not having features of DBMS like indexing, column stores, high availability, etc. one can conclude that it may be prudent to do as much of the filtering and shaping done on the database using all the tools the DBMS can provide instead of working on raw data from a database.

As a result of considerations discussed previously it will be indeed beneficial if data science and AI on the existing database can be carried out prior to moving out data. This allows you to leverage all the inbuilt features of the DBMS previously discussed. If the data involves geographical data these can be handled inside SQL Server's inbuilt data types. If on the other hand data has to be accessed from other data sources outside of Microsoft, the linked source feature of the DBMS can be used. 

The following picture copied from a Microsoft site shows the two ways discussed so far.


Another important consideration is after doing predictive analytics the operationalization of what has been achieved with data science, namely the predictive model. The deployment of this to a production environment can be accomplished by using programming using SQL Server R services in the form of a stored procedure. The predictive model will be stored as varbinary (max) in a database table.

Look forward to more discussions related to SQL Server and AI.


Wednesday, May 29, 2024

What is the best place to save the SQL Server 2022 Installation media files?

 This is a very important question. when I began using SQL Server for writing as well as for teaching, I used to take this for granted and used to store at the default location. Sometimes, I used to get into difficulty accessing the installation media as it was needed after a long interval and I would have made changes to my directory structure, or moved them to other places. However, it is very important where you save your SQL Server Installation media for a couple of reasons.

What's the need to save?

1. It provides a means for you to reinstall or repair your installation. You cannot do this task, if you do not have your installation media. 

2. For Off-line installations, it is essential to have this media.

3. If you are having multiple installations, it ensures consistency. I used to have this media on a memory stick and have all my students install on their work stations.

What are suitable locations to save the media?

There are couple of options. Choose one that best suits your needs.

1. Local Drive: When you start installing you will find out how much space is needed on your computer's local drive. At a minimum, you need 6 GB of disc space for the custom installation with most options. If you include all extras it is about 8GB. In order to work comfortably, it can be about 10GB depending on the databases you are considering. Herein, some sample databases are assumed. The installation process brings up the space requirements during installation. 

2. On a Network share. I could have set it up on the network share for my students, but I decided to give them a copy, if they wanted to play with it when not connected to the network.

3. If installation is on a virtual machine, an ISO would be suitable.

4. Mapped drive is another option.

5. On the Cloud: Cloud storage is yet another option. However, there may be cost in storge and data transfer involved. Latency is yet another factor to consider. Internet availability is most essential during the installation process.

The installation media folder can have any name of your choice. I usually accept the default name.

The SQL Server 2022 installation center's Option node is where you specify location of the media during installation.

I originally saved this media (SQL2022-SSEI-Dev.exe, 4191 KB) on my Download folder of the local drive.

On this blog (http://hodentekMSSS.blogspot.com), dedicated to SQL Servers you will find installation of SQL Server from SQL Server 2012 onwards. Even earlier ones are on my other blog, http://hodentek.blogspot.com


Wednesday, May 22, 2024

Installation of the latest version of SQL Server

Download the latest version of SQL Server from here.


There are a couple of download options as you can see on this page from the above link.


If you are a developer, the best option is the Developer version which provides:

  • Full featured free edition
  • Licensed for use as a development and test database
  • It is for non-production use

However, most purposes the SQL Server 2022 Express is adequate. It provides:

  • Free edition of SQL Server
  • Good fit for desktop development
  • Best fit for small server applications.

The SQL Server editions may be installed on Windows, Linux and Docker Containers.

In this blog for purposes of demonstration and use, the Developer edition will be installed on a Surface Laptop 5 with the following features.

Windows 11 Pro, Version 23H2, OS build 22631.3593. It has 16GB installed RAM

Downloading the developer edition begins by clicking the Download button in the above screen. In response you download the executable, SQL2022-SSEI-Dev.exe (4191 KB)file. This file gets displayed as shown.


If you want a quick installation use the BASIC option. 

In blog the Custom option will be used. If you want to differ to another time, you may just download the installation files by choosing Download Media.

Read the details of the SQL Server 2022 Installation Center



Tuesday, May 21, 2024

If you are concerned about the security of your SQL Server, you do this.

 SQL Server of different versions are still supported and their version and build number are important for securing your SQL Server.

This KB article (321185) brings together and consolidates all build versions and their current support cycle from SQL Server 2005 through the current version. An EXCEL file that can be downloaded provides the SQL Server's Complete version list.

Go here to get it!

Latest updates and version history for SQL Server - SQL Server | Microsoft Learn

One of the worksheets is shown here for your information from the downloaded EXCEL file.


If you are interested in finding what version of SQL Server you are running, just run the following SELECT query:

SELECT @@Version

You may look at the version when you try to use the Object Explorer in the management studio when you try to connect to a version from the drop-down list.

There are other ways to determine the version of SQL Server Version. This blog has posts on many versions that were used in writing some of my books on SQL Server shown hereunder.

However, for a secured SQL Server you should have the latest update to the version you are running.



Unlocking Insights, Automating Decisions, and Transforming Businesses with SQL Server AI

 The world is datacentric and everything moves based on data. SQL Server is a database management system and takes care of every aspect of d...