Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Data Science with SQL Server Quick Start Guide
Data Science with SQL Server Quick Start Guide

Data Science with SQL Server Quick Start Guide: Integrate SQL Server with data science

eBook
€8.99 €22.99
Paperback
€27.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing
Table of content icon View table of contents Preview book icon Preview Book

Data Science with SQL Server Quick Start Guide

Introducing R

When you talk about statistics, data mining, and machine learning, many people, especially those working in academic areas, think about R. R is the language that the engine that executes the code. You can use different R distributions, or versions of R engines and development tools; however, there is only one basic R language. Of course, to use it, you need to learn how to program in this language.

Statistics, data mining, and machine learning terms are very similar. You won't make a big mistake if you use them as synonyms. Statistics is the science of analyzing data collections, expressing the relationships as mathematical functions, and presenting and interpreting the results. In statistics, you usually work with sample data, or samples, because the population data, or the census, is not available to you. Data-mining analysis techniques are often...

Obtaining R

R is open source and free. R distribution is maintained by Comprehensive R Archive Network (CRAN) site at https://cran.r-project.org/. From this site, you can download the R engine for multiple platforms, including Windows, Linux, and macOS X. Besides CRAN, Microsoft also gives a free R download on the Microsoft R Application Network (MRAN) site at https://mran.revolutionanalytics.com/, which is where you can get Microsoft R Open. This is the open source R from Microsoft, which is the core R with additional Microsoft libraries. If you install Visual Studio 2017, you can also get Microsoft R Open—actually, you get what's called Microsoft R Client, which I will introduce in a minute.

After you install R, you can start working by using the R console client tool. With this tool, you can write code line by line. You can use also any of a plethora of additional...

Your first line R of code in R

R engine is an interpreter. Therefore, R is an interpreted language. In addition, R is a case-sensitive and functional language. Instead of typing commands, you call functions to perform an action. For example, to quit an R session, you need to call the q() function. You should extensively comment your code. A comment starts with a hash mark (#); you can use the comment anywhere in the line of code.

Any code after the start of the comment does not execute. A semicolon (;) is a command delimiter if you write more than one command in a single line. A new line is the command delimiter as well. The following code example shows a comment, displays my R version, and lists the authors and other contributors to the language using the contributors() function:

# R version and contributors
R.version.string
contributors()

Here...

Learning the basics of the R language

Now let's write some code that actually executes something:

1 + 2
2 + 5 * 4
3 ^ 4
sqrt(81)
pi

This code first evaluates three mathematical expressions using the basic operators. As you might expect, R evaluates the expressions using the mathematical operator precedence. The code calls the sqrt() function to calculate and checks the value of the constant for the number pi (π). The base R installation, or the base package, has many built-in constants. You can search the help for all pages that mention constants with ??"constants".

There are many ways to generate sequences of numbers, as you can see from the following code:

rep(1, 5)
4:8
seq(4, 8)
seq(4, 20, by = 3)

The first command replicates the number 1 five times with the help of the rep() function. You can generate a sequence of numbers with the help of the...

Using R data structures

As promised, I am now introducing the most important data structures in R. When you analyze the data, you analyze a dataset. A dataset looks like a SQL Server table: you can observe rows and columns. However, this is not a table in the relational sense, as defined in the Relational Model, which SQL Server follows. The order of rows and columns is not defined in a table that conforms to the Relational Model. However, in R, positions of cells as crossings of rows and columns are known. This is more like a matrix in mathematics.

In the R dataset, rows are also called cases or observations. You analyze the cases by using the values in their columns, also called variables or attributes of the cases. 

I will introduce the following data structures in this section:

  • Matrices and arrays
  • Factors
  • Lists
  • Data frames

A matrix is...

Summary

This chapter gave you an overview of the R language. You learned the basics, including how to write R expressions and create variables. The chapter introduced the data structures in R, with an emphasis on the most important one, the data frame. You saw how to read the data from SQL Server, store it in a data frame, and then retrieve it from the data frame. In Chapter 3, Getting Familiar with Python, before doing some additional manipulation of the data in a data frame to prepare it for further analysis, we will have a short introduction to the Python language.

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Use the features of SQL Server 2017 to implement the data science project life cycle
  • Leverage the power of R and Python to design and develop efficient data models
  • find unique insights from your data with powerful techniques for data preprocessing and analysis

Description

SQL Server only started to fully support data science with its two most recent editions. If you are a professional from both worlds, SQL Server and data science, and interested in using SQL Server and Machine Learning (ML) Services for your projects, then this is the ideal book for you. This book is the ideal introduction to data science with Microsoft SQL Server and In-Database ML Services. It covers all stages of a data science project, from businessand data understanding,through data overview, data preparation, modeling and using algorithms, model evaluation, and deployment. You will learn to use the engines and languages that come with SQL Server, including ML Services with R and Python languages and Transact-SQL. You will also learn how to choose which algorithm to use for which task, and learn the working of each algorithm.

Who is this book for?

SQL Server professionals who want to start with data science, and data scientists who would like to start using SQL Server in their projects will find this book to be useful. Prior exposure to SQL Server will be helpful.

What you will learn

  • • Use the popular programming languages,T-SQL, R, and Python, for data science
  • • Understand your data with queries and introductory statistics
  • • Create and enhance the datasets for ML
  • • Visualize and analyze data using basic and advanced graphs
  • • Explore ML using unsupervised and supervised models
  • • Deploy models in SQL Server and perform predictions

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Aug 31, 2018
Length: 206 pages
Edition : 1st
Language : English
ISBN-13 : 9781789537123
Vendor :
Microsoft
Category :
Languages :
Concepts :
Tools :

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing

Product Details

Publication date : Aug 31, 2018
Length: 206 pages
Edition : 1st
Language : English
ISBN-13 : 9781789537123
Vendor :
Microsoft
Category :
Languages :
Concepts :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
€18.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
€189.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts
€264.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 110.97
SQL Server 2017 Developer???s Guide
€45.99
Hands-On Data Science with SQL Server 2017
€36.99
Data Science with SQL Server Quick Start Guide
€27.99
Total 110.97 Stars icon
Banner background image

Table of Contents

9 Chapters
Writing Queries with T-SQL Chevron down icon Chevron up icon
Introducing R Chevron down icon Chevron up icon
Getting Familiar with Python Chevron down icon Chevron up icon
Data Overview Chevron down icon Chevron up icon
Data Preparation Chevron down icon Chevron up icon
Intermediate Statistics and Graphs Chevron down icon Chevron up icon
Unsupervised Machine Learning Chevron down icon Chevron up icon
Supervised Machine Learning Chevron down icon Chevron up icon
Other Books You May Enjoy Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
(1 Ratings)
5 star 0%
4 star 100%
3 star 0%
2 star 0%
1 star 0%
Rubén Dec 20, 2018
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
First of all, I want to explain that I have been given a copy of this book and that Dejan works in the same company I work but that is not conditioning my review. I have also read some other books authored or coauthored by Dejan covering topics like T-SQL programming & DW design.Cons----Maybe my expectations were too high or I'm just used to materials which go deeper on the topics than this book. This book pretends to be an introduction to data science using SQL Server an ML Services and it also pretends to cover all the stages of a data science project, all in a book of fewer than 200 pages, which seems a bit too optimistic.The end half of the book is where the most interesting topics are presented but everything seems a bit "accelerated" and some complex concepts are directly applied without many previous explanations. The number of different packages and libraries used in the examples increases a lot page after page making a bit complicated to follow the code (highly recommended to have side by side the libraries documentation). I also find somehow distracting to be jumping from one language to the other (R vs Python) instead of having the examples in both languages. I guess that some graphics engine/libraries and algorithms are only implemented on R or Python libraries so that jumping is not avoidable.Pros-----I think this book is useful for data professionals which had no previous knowledge of data science and R/Python. The first three chapters, a third of the book, are a basic introduction to T-SQL, R, and Python. Then we find an introduction to the data science project life cycle plus some basic statistical concepts. The second half of the book is the most interesting part from my point of view.In the second half of the book, we will get some insights on some discretization algorithms first and how to explore and measure the associations between variables. The unsupervised & supervised algorithms and methods presented are a good selection and they seem useful for lots of real scenarios. Most of the time you will need a "trial and error" approximation to see which one fits better, generate a better model, gets more accurate predictions, etc. I guess that an experienced data scientist will do a good initial "filtering" intuitively before and he/she will select the ones more promising based on previous experience & knowledge.Maybe the potential readers expect more on some topics but this book succeeded in its main goal; getting into the world of data science with SQL Server and its most used languages and algorithms.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is included in a Packt subscription? Chevron down icon Chevron up icon

A subscription provides you with full access to view all Packt and licnesed content online, this includes exclusive access to Early Access titles. Depending on the tier chosen you can also earn credits and discounts to use for owning content

How can I cancel my subscription? Chevron down icon Chevron up icon

To cancel your subscription with us simply go to the account page - found in the top right of the page or at https://subscription.packtpub.com/my-account/subscription - From here you will see the ‘cancel subscription’ button in the grey box with your subscription information in.

What are credits? Chevron down icon Chevron up icon

Credits can be earned from reading 40 section of any title within the payment cycle - a month starting from the day of subscription payment. You also earn a Credit every month if you subscribe to our annual or 18 month plans. Credits can be used to buy books DRM free, the same way that you would pay for a book. Your credits can be found in the subscription homepage - subscription.packtpub.com - clicking on ‘the my’ library dropdown and selecting ‘credits’.

What happens if an Early Access Course is cancelled? Chevron down icon Chevron up icon

Projects are rarely cancelled, but sometimes it's unavoidable. If an Early Access course is cancelled or excessively delayed, you can exchange your purchase for another course. For further details, please contact us here.

Where can I send feedback about an Early Access title? Chevron down icon Chevron up icon

If you have any feedback about the product you're reading, or Early Access in general, then please fill out a contact form here and we'll make sure the feedback gets to the right team. 

Can I download the code files for Early Access titles? Chevron down icon Chevron up icon

We try to ensure that all books in Early Access have code available to use, download, and fork on GitHub. This helps us be more agile in the development of the book, and helps keep the often changing code base of new versions and new technologies as up to date as possible. Unfortunately, however, there will be rare cases when it is not possible for us to have downloadable code samples available until publication.

When we publish the book, the code files will also be available to download from the Packt website.

How accurate is the publication date? Chevron down icon Chevron up icon

The publication date is as accurate as we can be at any point in the project. Unfortunately, delays can happen. Often those delays are out of our control, such as changes to the technology code base or delays in the tech release. We do our best to give you an accurate estimate of the publication date at any given time, and as more chapters are delivered, the more accurate the delivery date will become.

How will I know when new chapters are ready? Chevron down icon Chevron up icon

We'll let you know every time there has been an update to a course that you've bought in Early Access. You'll get an email to let you know there has been a new chapter, or a change to a previous chapter. The new chapters are automatically added to your account, so you can also check back there any time you're ready and download or read them online.

I am a Packt subscriber, do I get Early Access? Chevron down icon Chevron up icon

Yes, all Early Access content is fully available through your subscription. You will need to have a paid for or active trial subscription in order to access all titles.

How is Early Access delivered? Chevron down icon Chevron up icon

Early Access is currently only available as a PDF or through our online reader. As we make changes or add new chapters, the files in your Packt account will be updated so you can download them again or view them online immediately.

How do I buy Early Access content? Chevron down icon Chevron up icon

Early Access is a way of us getting our content to you quicker, but the method of buying the Early Access course is still the same. Just find the course you want to buy, go through the check-out steps, and you’ll get a confirmation email from us with information and a link to the relevant Early Access courses.

What is Early Access? Chevron down icon Chevron up icon

Keeping up to date with the latest technology is difficult; new versions, new frameworks, new techniques. This feature gives you a head-start to our content, as it's being created. With Early Access you'll receive each chapter as it's written, and get regular updates throughout the product's development, as well as the final course as soon as it's ready.We created Early Access as a means of giving you the information you need, as soon as it's available. As we go through the process of developing a course, 99% of it can be ready but we can't publish until that last 1% falls in to place. Early Access helps to unlock the potential of our content early, to help you start your learning when you need it most. You not only get access to every chapter as it's delivered, edited, and updated, but you'll also get the finalized, DRM-free product to download in any format you want when it's published. As a member of Packt, you'll also be eligible for our exclusive offers, including a free course every day, and discounts on new and popular titles.