Module 1
Introduction to Microsoft SQL
Server 2016
Module Overview
The Basic Architecture of SQL Server
SQL Server Editions and Versions
Getting Started with SQL Server
Management Studio
Lesson 1: The Basic Architecture of SQL
Server
Relational Databases
About the Course Sample Database
Client Server Databases
Queries
Relational Databases
SQL Server is a relational database
management system
Databases contain objects and data
Each database has multiple tables
Tables are joined together to extract
meaningful information
About the Course Sample Database
TSQL Database
Customers (Sales)
Suppliers (Production)
custid
supplierid
Employees (HR)
empid
Products (Production)
Orders (Sales)
productid
orderid
Shippers (Sales)
Categories (Production) OrderDetails (Sales)
categoryid orderid
Client Server Databases
The client software is separate from the
server database engine
Client/Server refers to the separation of
functionalitynot where the software is
actually located
Client software and server database
engine can be on the same machine
Databases can access data in other
databases over a network
Queries
T-SQL is a set-based language
T-SQL is written in scripts with .sql
extension
GO keyword separates batches
CREATE
CREATE TABLE
TABLE dbo.Employees
dbo.Employees
((
EmployeeID
EmployeeID int
int PRIMARY
PRIMARY KEY,
KEY,
LastName nvarchar(25),
LastName nvarchar(25),
FirstName
FirstName nvarchar(25)
nvarchar(25)
);
);
GO
GO
INSERT
INSERT INTO
INTO dbo.Employees
dbo.Employees
(EmployeeID,
(EmployeeID, LastName,
LastName, FirstName)
FirstName)
VALUES
VALUES
(121,
(121, N'O''Neil',
N'O''Neil', N'Carlene');
N'Carlene');
GO
GO
Lesson 2: SQL Server Editions and
Versions
SQL Server Versions
SQL Server Editions
SQL Server Versions
SQL Server Versions
Version Release Year
2016 2016
2014 2014
2008 R2 2010
2008 2008
2005 2005
2000 2000
7.0 1998
6.5 1996
6.0 1995
4.2.1 1994
4.2 1992
1.1 1991
1.0 1989
SQL Server Editions
SQL Server Editions
Main Editions Other Editions
Enterprise Developer
Standard Express
Business Intelligence Compact
Azure SQL Database
Lesson 3: Getting Started with SQL Server
Management Studio
Starting SSMS
Connecting to SQL Server
Working with Object Explorer
Script Files and Projects
Executing Queries
Using SQL Server 2016 Technical
Documentation
Demonstration: Introducing Microsoft SQL
Server 2016
Starting SSMS
Launch SSMS from the Windows Start
screen
Or type SSMS into the Search Programs and
Files box
Connect to a SQL Server instance
Or work disconnected
Settings available in Tools, Options include:
Fonts and colors, line numbering, and word wrap
Which windows open when SSMS is launched
Useful windows include:
Query Editor
Object Explorer
Solution Explorer
Connecting to SQL Server
Connecting to SQL Server requires three
pieces of information:
Instance name
Use the form host/instance, except for the default
instance
Database name
A default database can be assigned to a logon
Authentication
Windows Authentication or SQL Server Authentication
Account must be provisioned by a database
administrator
Working with Object Explorer
Object Explorer is a hierarchical, graphical
view of SQL Server objects
Explore objects in the default instance, and
additional named instances
Right-click for context-sensitive menu with
frequently used commands
Create T-SQL scripts of object definitions,
and send to the query window, clipboard or
a file
Start a new query window by right-clicking
a database
Changing the selected object does not change
the existing connection
Script Files and Projects
T-SQL scripts are text files with a .sql
extension
SSMS can open, edit, and execute code in
script files
SSMS allows you to organize script files
into:
Solutions (*.ssmssln)
Projects (*.ssmssqlproj)
Opening a solution is a convenient way to
open all relevant files
You will use projects on this course
Executing Queries
To execute queries in SSMS:
Open a saved script, or write a new query
Three ways to execute the query:
From the Query menu, select Execute
Press F5
Click the Execute toolbar button
Using SQL Server 2016 Technical
Documentation
Books Online (BOL) is the product
documentation for SQL Server
In SQL Server 2016, Books Online does not
ship with the SQL Server installation media
Configure Help to display content from
MSDN or download Help Collections to a
local computer
Once configured, Help is available from:
SSMS query window (context-sensitive when
you highlight a keyword)
SSMS Help menu
Windows Start menu
Demonstration: Introducing Microsoft SQL
Server 2016
In this demonstration you will see how to:
Use SSMS to connect to an on-premises
instance of SQL Server 2016
Explore databases and other objects
Work with T-SQL scripts
Lab: Working with SQL Server 2016 Tools
Exercise 1: Working with SQL Server
Management Studio
Exercise 2: Creating and Organizing T-SQL
Scripts
Exercise 3: Using SQL Server 2016 Technical
Documentation
Logon Information
Virtual machine: 20761B-MIA-SQL
User name: ADVENTUREWORKS\Student
Password: Pa$$w0rd
Estimated Time: 30 minutes
Lab Scenario
The Adventure Works Cycles Bicycle
Manufacturing Company has adopted SQL
Server 2016 as its relational database
management system. You need to retrieve
business data from several SQL Server
databases. In the lab, you will begin to
explore the new environment, and become
acquainted with the tools for querying SQL
Server.
Module Review and Takeaways
Review Question(s)