Module 1 Introduction to Microsoft SQL Server 2016

  • Slides: 24
Download presentation
Module 1 Introduction to Microsoft SQL Server 2016 Understanding database concepts

Module 1 Introduction to Microsoft SQL Server 2016 Understanding database concepts

Module Overview • The Basic Architecture of SQL Server • SQL Server Editions and

Module Overview • The Basic Architecture of SQL Server • SQL Server Editions and Versions • Install MS SQL Server • Install SQL Server Management Studio - SSMS • Getting Started with SQL Server Management Studio • Understanding database concepts

Databases • Understand database concepts • Flat databases • Hierarchical databases • Relational Databases

Databases • Understand database concepts • Flat databases • Hierarchical databases • Relational Databases • About the Course Sample Database • Client Server Databases • Queries

Databases. Types of databases - 1 • A database (db) is an organized collection

Databases. Types of databases - 1 • 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

Database. Types of databases - 2 • A flat type database are considered flat

Database. Types of databases - 2 • 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.

Flat type database • Flat-type databases are simplistic in design. They are most commonly

Flat type database • 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.

Hierarchical database • A hierarchical database is similar to a tree structure (such as

Hierarchical database • 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.

Relational Databases • A relational database is similar to a hierarchical database in that

Relational Databases • 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.

Relational Databases – RDMBS – MS SQL • SQL Server is a relational database

Relational Databases – RDMBS – MS SQL • 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

About the Course Sample Database • TSQL Database

Client Server Databases • The client software is separate from the server database engine

Client Server Databases • 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

Queries • T-SQL is a set-based language • T-SQL is written in scripts with.

Queries • T-SQL is a set-based language • T-SQL is written in scripts with. sql extension • GO keyword separates batches CREATE TABLE dbo. Employees ( Employee. ID int PRIMARY KEY, Last. Name nvarchar(25), First. Name nvarchar(25) ); GO INSERT INTO dbo. Employees (Employee. ID, Last. Name, First. Name) VALUES (121, N'O''Neil', N'Carlene'); GO

Challenge -1 • Give examples of each database type • Flat / Hierarchical /

Challenge -1 • Give examples of each database type • Flat / Hierarchical / Relational; (15 minutes)

SQL Server Editions and Versions • SQL Server Editions

SQL Server Editions and Versions • SQL Server Editions

SQL Server Versions Version Release. Year 2016 2014 2008 R 2 2010 2008 2005

SQL Server Versions Version Release. Year 2016 2014 2008 R 2 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 https: //support. microsoft. com/en-us/help/321185/how-to-determine-the-version-edition-and-update-level-of-sql-server-an

SQL Server Editions • SQL Server Editions Main. Editions Other Editions Enterprise Developer Standard

SQL Server Editions • SQL Server Editions Main. Editions Other Editions Enterprise Developer Standard Express Business Intelligence Compact Azure SQL Database https: //www. microsoft. com/en-us/sql-server-2017 -editions

Installing MS SQL & SQL Server Management Studio (SSMS) • Installation of MS SQL

Installing MS SQL & SQL Server Management Studio (SSMS) • Installation of MS SQL (Evaluation Edition 180 days free) • Installation of SSMS

Getting Started with SQL Server Management Studio • Starting SSMS • Connecting to SQL

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

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:

Connecting to SQL Server • Connecting to SQL Server requires three pieces of information: • Instance name • • Database name • • Use the form host/instance, except for the default instance 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

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

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

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 F 5 • Click the Execute toolbar button •

Demonstration: Introducing Microsoft SQL Server 2016 In this demonstration you will see how to:

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