Presentation is loading. Please wait.

Presentation is loading. Please wait.

Module 1 Introduction to Microsoft SQL Server 2016

Similar presentations


Presentation on theme: "Module 1 Introduction to Microsoft SQL Server 2016"— Presentation transcript:

1 Module 1 Introduction to Microsoft SQL Server 2016
20761B 1: Introduction to Microsoft SQL Server 2016 Module 1 Introduction to Microsoft SQL Server 2016 Understanding database concepts

2 Install SQL Server Management Studio - SSMS
20761B Module Overview 1: Introduction to Microsoft SQL Server 2016 Install MS SQL Server Install SQL Server Management Studio - SSMS Getting Started with SQL Server Management Studio Understanding database concepts This module introduces students to SQL Server 2016, giving them a broad understanding of SQL Server without going into too much detail. This module is designed to introduce students to information that they might not otherwise encounter. For example, understanding the differences between SQL Server editions might help them to plan a new deployment.

3 Understand database concepts Flat databases Hierarchical databases
1: Introduction to Microsoft SQL Server 2016 Understand database concepts Flat databases Hierarchical databases Queries

4 Databases. Types of databases - 1
1: Introduction to Microsoft SQL Server 2016 A database (db) is an organized collection of data, typically stored in electronic format. It allows you to input, organize, and retrieve data quickly. Traditional databases are organized by fields, records, and files. Most users do not access a database directly. Instead, they use a database management system (DBMS) to access it indirectly. A DBMS is a collection of programs that enables you to enter, organize, and select data in a database. A relational database management system (RDBMS) is a database management system (DBMS) that is based on the relational model invented by Edgar F. Codd

5 Database. Types of databases - 2
1: Introduction to Microsoft SQL Server 2016 A flat type database are considered flat because they are two dimensional tables consisting of rows and columns. A hierarchical database design is similar to a tree structure (such as a family tree). Each parent can have multiple children, but each child can have only one parent. A relational database is similar to a hierarchical database in that data is stored in tables and any new information is automatically added into the table without the need to reorganize the table itself. Different from hierarchical database, a table in a relational database can have multiple parents.

6 20761B Flat type database 1: Introduction to Microsoft SQL Server 2016 Flat-type databases are simplistic in design. They are most commonly used in plain-text formats. Because their purpose is to hold one record per line, they make access, performance, and queries very quick. An example of this type of database would be what you would find in a .txt or .ini file.

7 Hierarchical database
1: Introduction to Microsoft SQL Server 2016 A hierarchical database is similar to a tree structure (such as a family tree). In this database, each “parent” table can have multiple “children,” but each child can have only one parent.

8 20761B Relational Databases 1: Introduction to Microsoft SQL Server 2016 A relational database is similar to a hierarchical database in that data is stored in tables and any new information is automatically added into the table without the need to reorganize the table itself. Unlike in hierarchical databases, however, a table in a relational database can have multiple parents.

9 Relational Databases – RDMBS – MS SQL
1: Introduction to Microsoft SQL Server 2016 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 Many people think that a relational database refers to the fact that tables are related to one another. This is not true—a relational database is based on mathematical relational theory, which itself is based on two mathematical concepts called set theory and predicate logic. Although you do not need to know too much about set theory or predicate logic, having some understanding can be helpful when learning SQL Server. Microsoft SQL Server 2012 T-SQL Fundamentals (Itzik Ben-Gan) has an introductory chapter, which gives a good explanation of these two areas, and how they relate to working with SQL Server. If you are interested in learning more, it is worth a read.

10 About the Course Sample Database
1: Introduction to Microsoft SQL Server 2016 TSQL Database

11 Client Server Databases
1: Introduction to Microsoft SQL Server 2016 The client software is separate from the server database engine Client/Server refers to the separation of functionality—not 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

12 T-SQL is a set-based language
Queries 1: Introduction to Microsoft SQL Server 2016 T-SQL is a set-based language T-SQL is written in scripts with .sql extension GO keyword separates batches Use the example on the slide to illustrate the GO statement that separates a script into batches. Do not go into the details of the CREATE or INSERT commands, which will be described later in the course. Sharp-eyed students may notice the additional apostrophe needed to insert “O’Neil” and the “N” to denote Unicode characters. CREATE TABLE dbo.Employees ( EmployeeID int PRIMARY KEY, LastName nvarchar(25), FirstName nvarchar(25) ); GO INSERT INTO dbo.Employees (EmployeeID, LastName, FirstName) VALUES (121, N'O''Neil', N'Carlene');

13 Give examples of each database type
Challenge -1 1: Introduction to Microsoft SQL Server 2016 Give examples of each database type Flat / Hierarchical / Relational; (15 minutes) Use the example on the slide to illustrate the GO statement that separates a script into batches. Do not go into the details of the CREATE or INSERT commands, which will be described later in the course. Sharp-eyed students may notice the additional apostrophe needed to insert “O’Neil” and the “N” to denote Unicode characters.

14 SQL Server Editions and Versions
20761B SQL Server Editions and Versions 1: Introduction to Microsoft SQL Server 2016 SQL Server Editions

15 SQL Server Versions SQL Server Versions Version Release Year 2016 2014
20761B SQL Server Versions 1: Introduction to Microsoft SQL Server 2016 SQL Server Versions Version Release Year 2016 2014 2008 R2 2010 2008 2005 2000 7.0 1998 6.5 1996 6.0 1995 4.2.1 1994 4.2 1992 1.1 1991 1.0 1989 Question Which version of SQL Server are you currently working with? Have you worked with any earlier versions? Answer Answers will vary.

16 SQL Server Editions SQL Server Editions Main Editions Other Editions
20761B SQL Server Editions 1: Introduction to Microsoft SQL Server 2016 SQL Server Editions Main Editions Other Editions Enterprise Developer Standard Express Business Intelligence Compact Azure SQL Database Question You have founded a new company with two friends. Your new application (app) uses a SQL Server database to store information. You are unsure whether your app will be successful but, if it is, you will need both high performance and space for large volumes of data. However, you have not yet launched, so are unsure how many people will use your app. Which edition of SQL Server 2016 should you use for this system? ( )Option 1: Azure SQL Database ( )Option 2: Enterprise edition ( )Option 3: Express edition ( )Option 4: Business Intelligence edition ( )Option 5: Any edition is appropriate for these requirements Answer (√) Option -2: Azure SQL Database

17 Installing MS SQL & SQL Server Management Studio (SSMS)
20761B Installing MS SQL & SQL Server Management Studio (SSMS) 1: Introduction to Microsoft SQL Server 2016 Installation of MS SQL (Evaluation Edition 180 days free) Installation of SSMS

18 Getting Started with SQL Server Management Studio
20761B Getting Started with SQL Server Management Studio 1: Introduction to Microsoft SQL Server 2016 Demonstration: Introducing Microsoft SQL Server 2016

19 Launch SSMS from the Windows Start screen
20761B Starting SSMS 1: Introduction to Microsoft SQL Server 2016 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 Point out that SSMS is the client tool for SQL Server; it is not SQL Server itself. SSMS sends commands to the SQL Server Database Engine. Organizations normally install SSMS on a different machine to the one where SQL Server is installed. The classroom virtual machine may obscure that distinction.

20 Connecting to SQL Server
20761B Connecting to SQL Server 1: Introduction to Microsoft SQL Server 2016 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 Question In your organization, which authentication method do you use to log on to SQL Server? Answer Either Windows Authentication or SQL Server Authentication.

21 Working with Object Explorer
1: Introduction to Microsoft SQL Server 2016 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 If Object Explorer is not visible, click the F8 keyboard shortcut to display it.

22 Script Files and Projects
20761B Script Files and Projects 1: Introduction to Microsoft SQL Server 2016 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

23 To execute queries in SSMS:
20761B Executing Queries 1: Introduction to Microsoft SQL Server 2016 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 Point out to students that the green triangle starts the T-SQL Debugger and is not the button for executing a query. Students who have worked with other query tools might think the green triangle executes queries. The workbook also refers to the use of Alt-X and Ctrl-E shortcuts to execute a query, in addition to F5. Note that Ctrl-Shift-F has changed to Ctrl-Shift-T in SQL Server 2016.

24 Demonstration: Introducing Microsoft SQL Server 2016
20761B Demonstration: Introducing Microsoft SQL Server 2016 1: Introduction to 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 Preparation Steps Start the 20761B-MIA-DC and 20761B-MIA-SQL virtual machines. Demonstration Steps Use SSMS to Connect to an On-premises instance of SQL Server 2016 Ensure that the 20761B-MIA-DC and 20761B-MIA-SQL virtual machines are running. Log on to 20761B-MIA-SQL as ADVENTUREWORKS\Student with the password Pa$$w0rd. In the D:\Demofiles\Mod01 folder, right-click Setup.cmd, and then click Run as administrator. In the User Account Control dialog box, click Yes, press y when prompted, and then press Enter. Start SQL Server Management Studio and connect to the MIA-SQL database engine instance using Windows authentication. Explore Database and Other Objects In Object Explorer, expand the Databases folder to see a list of databases. Expand the TSQL database. Expand the Tables folder. Expand the Sales.Customers table. Expand the Columns folders. View the list of columns, and the data type information for each column. Note the data type for the companyname column. Work with T-SQL Scripts If the Solution Explorer pane is not visible, on the View menu, click Solution Explorer. In Solution Explorer, notice it will is empty. (More notes on the next slide)


Download ppt "Module 1 Introduction to Microsoft SQL Server 2016"

Similar presentations


Ads by Google