SQL Server Tutorial For Beginners | SQL Server Management Studio Install & Tips 2022

Teddy Smith
23 Jan 202215:05

Summary

TLDRIn this instructional YouTube video, Teddy guides viewers through the process of installing SQL Server 2019 and SQL Server Management Studio (SSMS). He emphasizes the use of the Express edition for most users and provides practical tips for navigating SSMS efficiently. Teddy also offers a basic overview of SQL Server, explaining it as a database typically run on servers but also installable on desktops. He simplifies the concept of databases as interconnected Excel spreadsheets, highlighting the importance of tables and keys. The tutorial concludes with a demonstration of creating a test database and table, and executing a basic SQL query, all aimed at empowering beginners to grasp SQL fundamentals.

Takeaways

  • 😀 The video is a tutorial on installing SQL Server 2019 and SQL Server Management Studio (SSMS).
  • 🔍 The presenter advises downloading SQL Server 2019 from the official Microsoft downloads page, opting for the Express edition which is suitable for most production environments.
  • 💻 The presenter suggests choosing the 'basic' version of SQL Server for simplicity and to avoid unnecessary installations.
  • 📚 SQL Server is described as a database typically run on a server, but it can also be installed on a desktop computer.
  • 🛠️ SSMS is introduced as a graphical tool that simplifies server communication, reducing the need for command-line operations.
  • 🔑 The presenter emphasizes that SSMS allows for both GUI operations and command-line style SQL input within a graphical interface.
  • ⏬ The installation of SSMS is shown to be straightforward, with the software handling much of the setup automatically.
  • 🌐 The video highlights that while the local server instance runs on the user's computer, in a professional setting, servers are often remote.
  • 🔑 The presenter explains the use of Windows Authentication for connecting to the local SQL Server instance, eliminating the need for a password.
  • 📈 The video provides a practical demonstration of creating a new database and table within SSMS, illustrating the process step-by-step.
  • 📝 An analogy is used to explain databases and tables as Excel spreadsheets that can be interconnected, simplifying the concept for beginners.

Q & A

  • What is the main topic of the YouTube video by Teddy?

    -The main topic of the video is teaching viewers how to install SQL Server 2019 and SQL Server Management Studio (SSMS), along with providing quick tips for getting started and using SSMS effectively.

  • Why does Teddy recommend downloading the Express version of SQL Server?

    -Teddy recommends the Express version of SQL Server because it is typically what users will be using in a production environment, and it is suitable for developers or analysts unless specified otherwise by an employer.

  • What does Teddy suggest as the best starting point for SQL Server Management Studio?

    -Teddy suggests that the best starting point for SSMS is the 'Databases' tab, as most of the work will be concentrated there.

  • How does Teddy describe SQL Server in relation to a regular computer?

    -Teddy describes SQL Server as a database that can be run on a server, which isn't much different from a regular computer. The main difference is that servers are meant to be communicated with over networks, but as every computer is now connected to a network, the difference is negligible.

  • Why is SQL Server Management Studio (SSMS) considered a valuable tool according to Teddy?

    -SSMS is considered valuable because it provides a graphical user interface for interacting with servers, which simplifies tasks that would otherwise require typing out commands in a command-line interface.

  • What is the significance of the 'Databases' tab in SSMS according to the video?

    -The 'Databases' tab in SSMS is significant because it is where users will spend most of their time working with databases and tables, which are the core components of SQL Server.

  • What is the analogy Teddy uses to explain databases?

    -Teddy uses the analogy of Excel spreadsheets that can be tied together through keys to explain what databases are.

  • What is the command Teddy uses daily at work within SSMS?

    -The command Teddy uses daily at work within SSMS is 'SELECT TOP 1000 ROWS', which he finds very useful for quickly viewing data within a table.

  • What advice does Teddy give regarding the execution of SQL queries in SSMS?

    -Teddy advises to always be aware of the database on which SQL queries are being executed to avoid accidentally executing against the master or model databases.

  • What is Teddy's tip for remembering what a database is?

    -Teddy's tip for remembering what a database is, is to think of it as a bucket that holds tables, which are like Excel spreadsheets.

Outlines

00:00

💻 Installing SQL Server 2019 and SSMS

The speaker, Teddy, introduces the video's purpose: to guide viewers through the installation of SQL Server 2019 and SQL Server Management Studio (SSMS). He explains the process of downloading SQL Server, suggesting the Express version for most users, and emphasizes the Basic version as sufficient for most needs. Teddy provides tips to help viewers quickly become proficient with SSMS, focusing on the most commonly used features to avoid confusion. He also discusses the difference between a server and a regular computer, explaining that SQL Server is typically run on a server but can also be installed on a desktop for learning purposes. The speaker concludes by highlighting the benefits of SSMS over command-line interfaces for database management.

05:01

🔧 Setting Up SQL Server Management Studio

Teddy continues by discussing the setup process for SQL Server Management Studio (SSMS), noting its ease of use compared to other database systems like PostgreSQL. He explains that SSMS acts as a graphical interface to connect with the SQL Server running in the background on the computer. The speaker clarifies misconceptions about the location of servers in a professional setting, emphasizing that they are often remote and not located on the user's computer. Teddy then demonstrates how to launch SSMS and connect to the local server using Windows authentication, bypassing the need for a password. He guides viewers through creating a test database and navigating the SSMS interface, highlighting the 'Databases' tab as the primary area of focus for most tasks.

10:02

📚 Understanding Databases and Tables in SQL

In the final paragraph, Teddy provides a conceptual understanding of databases and tables in SQL. He uses the analogy of an Excel spreadsheet to explain databases, suggesting that a database is like a collection of interconnected spreadsheets. The speaker emphasizes the importance of tables within a database and demonstrates how to create a new table in SSMS. Teddy also explains the three main parts of SSMS: the graphical layout of databases and tables, the SQL query writing area, and the results display. He advises viewers to avoid executing SQL commands on system databases like 'master' or 'model' unless they are database administrators, and assures viewers that the knowledge shared is sufficient for most SQL professional needs, including developers and analysts.

Mindmap

Keywords

💡SQL Server

SQL Server is a relational database management system developed by Microsoft. It's used for storing, managing, and retrieving data in a structured format. In the video, the presenter discusses how to install SQL Server 2019, emphasizing its use in production environments and its importance for developers and analysts.

💡SQL Server Management Studio (SSMS)

SSMS is a graphical management tool for managing and administering SQL Server databases. It provides a user-friendly interface for executing SQL queries, managing databases, and automating administrative tasks. The video focuses on installing SSMS and how it simplifies database management compared to command-line interfaces.

💡Installation

Installation refers to the process of setting up a software application on a computer system. The video script includes detailed steps for downloading and installing SQL Server 2019 and SSMS, highlighting the ease of installation and the importance of choosing the right version for one's needs.

💡Express Version

The Express version of SQL Server is a free, lightweight edition designed for learning and development. It's mentioned in the script as the recommended version for beginners and small-scale production environments, contrasting with the Developer version which is also available.

💡Database

A database is an organized collection of structured data. The video uses the analogy of Excel spreadsheets to explain databases, emphasizing how they can hold multiple tables and be interconnected through keys. The script also demonstrates creating a new database within SSMS.

💡Tables

Tables are the primary component of a relational database, used to store data in a structured format. The video script describes how tables within a database are analogous to Excel spreadsheets, with columns and rows representing data fields and records, respectively.

💡Windows Authentication

Windows Authentication is a security method that allows users to log in to SQL Server using their Windows account credentials. The video script explains that this method eliminates the need for a separate password, streamlining the login process for local databases.

💡Server

In the context of the video, a server refers to a computer system that provides resources or services to other computers over a network. The script clarifies the difference between a regular computer and a server, noting that servers are designed for network communication and can host software like SQL Server.

💡Query

A query is a request for data from a database, typically expressed in SQL (Structured Query Language). The video script demonstrates how to use SSMS to write and execute queries, such as 'SELECT TOP 1000 ROWS', to retrieve data from a table.

💡Graphical User Interface (GUI)

A GUI is a user interface that allows users to interact with a system through graphical icons and visual indicators, as opposed to text-based interfaces. The video highlights SSMS as a GUI tool that simplifies database management by providing a visual interface for executing SQL commands.

💡Development Environment

The development environment refers to the tools, software, and settings used by developers to create applications. The video script guides viewers through setting up a development environment for SQL Server, including installing necessary software and understanding its components.

Highlights

Introduction to the video and the tutorial on installing SQL Server 2019 and SQL Server Management Studio (SSMS).

Downloading SQL Server 2019 from the official Microsoft website and choosing the Express edition for most users.

Recommendation to use the Basic version of SQL Server for simplicity and lack of unnecessary installations.

Explanation of what SQL Server is and its typical use on servers, despite being installable on desktops.

Introduction to SQL Server Management Studio (SSMS) as a GUI for interacting with SQL Server databases.

Advantages of SSMS over command line for database management, including ease of use and graphical tools.

Installation process of SQL Server 2019 and the subsequent steps to install SSMS.

The automatic setup by SSMS and its ease of use compared to other database systems like PostgreSQL.

Understanding the difference between a local and a remote server in the context of SQL Server.

Launching SSMS and connecting to the local SQL Server instance using Windows Authentication.

Navigating the SSMS interface and focusing on the 'Databases' tab for most database-related tasks.

Creating a new database within SSMS and the importance of refreshing to view new objects.

Analogy of databases to Excel spreadsheets that can be interconnected through keys.

Demonstration of creating a table within a database and the need to refresh to see new tables.

Using the 'Select Top 1000 Rows' command as a common daily task in SSMS.

Highlighting the three important parts of SSMS: database and table layout, SQL query writing, and results display.

Advice on executing SQL scripts and the importance of not executing on system databases like 'master' or 'model'.

Conclusion of the tutorial and a call to action for viewers to subscribe for more content.

Transcripts

play00:00

what's up guys this is teddy welcome to

play00:02

my youtube channel this video i'm gonna

play00:04

be teaching you guys how to install sql

play00:06

server 2019 and how to install sql

play00:09

server management studio so after i get

play00:13

done with both of those downloads and

play00:15

show you how to install it i'm also

play00:16

going to be giving you quick tips so

play00:19

that you can kind of just get up and

play00:21

running and be able to actually use sql

play00:24

server management studio without getting

play00:26

so confused and show you a lot of the

play00:29

tips and tricks that i use on a daily

play00:31

basis so that you're not burning

play00:33

yourself out wasting your time learning

play00:36

a bunch of features that you don't even

play00:38

really need all the things you know at

play00:40

the end of the at the end of this video

play00:42

are going to be like i said 90 of what

play00:45

you're going to be using as a uh

play00:48

developer or any type of analyst too so

play00:52

first first thing

play00:54

what i did is i just typed in sql server

play00:56

download 2019 it's fairly easy to find

play00:59

there's this up here i don't know why

play01:02

their people are putting ads on top of a

play01:04

sql server download but

play01:06

go to sql server downloads and then go

play01:09

to express

play01:11

many people i've seen use the developer

play01:14

version but the express version is

play01:16

probably what you're going to be using

play01:18

in a production environment and if

play01:19

you're a developer or some type of

play01:21

analyst

play01:22

you probably just want to use the

play01:24

express version unless your employer or

play01:27

somebody else tells you to use or has a

play01:30

different version for you to use so next

play01:32

thing is you want to go to basic

play01:34

you could sift through here and maybe

play01:36

try and find some like a custom version

play01:38

that you want but um i found that the

play01:41

basic version works just fine and

play01:44

it's there's very rarely are they ever

play01:47

going to install any type of junk onto

play01:48

your computer so i would say just go for

play01:50

the basic version

play01:52

so while this is installing i kind of

play01:54

just like to go through and give just a

play01:56

basic overview of like what is sql

play01:59

server well sql server is a database and

play02:02

it's called sql server because most of

play02:04

the time sql server is going to be run

play02:06

on an actual server

play02:09

so a a server really isn't that much

play02:12

different from a regular computer and

play02:13

you can actually install server software

play02:16

on your desktop there's no the only real

play02:18

difference between a regular server and

play02:22

a desktop computer is very negligible

play02:25

and it really has to do with the fact

play02:27

that servers are meant to be

play02:28

communicated with over networks and as

play02:31

uh time has progressed every computer is

play02:33

connected to a network so there's not

play02:35

really like i said there's not much

play02:37

difference but they call it sql server

play02:38

for that reasons for that reason

play02:41

what is

play02:43

sql server management studio and why are

play02:46

we also learning sql server management

play02:48

studio with a server course well

play02:52

back in the day

play02:53

you had to communicate with servers

play02:55

through command line uh kind of like

play02:58

matrix hacker looking letters and these

play03:01

days we have very powerful guise that

play03:03

will or guis or just graphical software

play03:07

that we can use to communicate with

play03:09

servers that can do a lot of the tedious

play03:11

work

play03:12

of typing out these commands and they

play03:14

can do them in

play03:15

graphical user interfaces that make it

play03:18

just a lot more pleasing and more

play03:21

human-like as opposed to the command

play03:23

line now if you want to you could go and

play03:26

become a command line master but

play03:28

the great thing about sql server

play03:30

management studio is it's very versatile

play03:32

and you can even do a lot of the command

play03:35

line type uh

play03:37

you know you could type in sql straight

play03:39

into in almost like a command line

play03:41

fashion but you're doing it in a gui and

play03:43

you can save scripts and you can click

play03:45

and it can give you

play03:47

very powerful graphical tools to also go

play03:50

through all of your data as well so even

play03:52

though we have the capabilities with

play03:54

just using a gui sql server management

play03:57

studio is going to make our lives a lot

play03:59

easier and speaking of the devil we've

play04:02

just installed sql server 2019 and

play04:06

don't copy down any of this right here

play04:08

just going to install smss

play04:13

or ssms i'm sorry and go down to here to

play04:16

download ssms and

play04:21

go ahead and download uh smss is

play04:24

actually like three gigs in size so it's

play04:26

it's a huge it's a monster of a program

play04:30

and

play04:30

it could take us here

play04:32

take us

play04:34

just a little bit give us five seconds

play04:36

three seconds just to run out the clock

play04:39

and download this thing so

play04:41

here we go gonna go ahead and click it

play04:42

open

play04:50

and if you don't see this it's i've got

play04:52

dual screens just click yes it's gonna

play04:54

ask it's going to ask for permission to

play04:56

download the app then i'm going to bring

play04:58

this over here

play05:00

and we're going to go ahead and install

play05:01

it

play05:05

now the great thing about sql server

play05:07

management studio 2 and when you in

play05:09

install all these things is that it's

play05:12

going to do a lot of the setting up for

play05:15

you so

play05:16

if you've ever installed other databases

play05:18

like postgres postgres can give you

play05:21

uh a lot of trouble with how the

play05:24

graphical or the gui and how the actual

play05:27

server connect to each other

play05:30

the sm many times people get confused

play05:33

about how they interface the smss

play05:36

actually is uh not really connected with

play05:39

the server the server is running on the

play05:41

back of your computer in the background

play05:43

of your computer and

play05:45

uh these graphical tools like sm or a

play05:47

sql server management studio are meant

play05:49

to connect to

play05:51

server centers in distant remote places

play05:54

or places that you don't actually live

play05:56

for testing purposes our physical server

play05:59

is going to live within our desktop

play06:02

computer but just realize that once you

play06:04

get a job the server that you're going

play06:05

to work on is probably not even going to

play06:07

be in your building or it's not

play06:10

definitely not going to be in your

play06:11

computer

play06:12

and that's also a kind of another thing

play06:16

and another important point too is that

play06:19

um this is like a lab but when you

play06:21

actually start working just realize or

play06:23

ask your boss you know where is the

play06:25

server because that's actually something

play06:27

that i did when i first started my job i

play06:28

thought the server was going to be like

play06:30

i had to put the server on my computer

play06:32

but that really wasn't the case

play06:34

and

play06:35

kind of made me look stupid but whatever

play06:38

we live when we learn so go in here

play06:41

and type in sql sql server management

play06:43

studio and we're just going to go ahead

play06:45

and boot that up

play06:52

and it should be we can just go ahead

play06:54

let's try and con just click connect now

play06:56

you don't have to do that but i'm going

play06:57

to make sure that the

play06:59

server instance is actually running

play07:01

and we're gonna go ahead and exit out of

play07:03

that

play07:04

so

play07:05

we

play07:06

when you are connecting to a foreign

play07:08

server you're actually gonna have a

play07:09

password but we're not gonna have a

play07:10

password because we have this thing

play07:12

called windows authentication so many

play07:14

times people are like well what password

play07:15

do i put in you're not going to need one

play07:17

when it the local database is actually

play07:19

installed on your computer

play07:22

so we're just going to go in here

play07:23

and we are congratulations guys you have

play07:26

installed sql server management studio

play07:29

but i'm not going to stop there like i

play07:30

said i'm going to give you

play07:32

a really good

play07:35

uh

play07:36

place to start and i'm going to tell you

play07:38

where like 99 of your time is going to

play07:40

be concentrated so you're not you know

play07:42

out here you know searching through

play07:44

files and doing all these crazy things

play07:46

99

play07:48

of what you're going to be doing is

play07:49

going to be

play07:50

under this tab right here

play07:53

so if you ever just get lost just be

play07:55

like okay i'm just going to go back to

play07:56

the databases tab and

play08:00

go back just go back here so

play08:02

next thing is let's just go ahead and

play08:04

create just like a quick little test

play08:06

database so i can show you guys what a

play08:09

database actually even looks like so go

play08:11

in here

play08:12

click new database and just

play08:15

click testdb

play08:18

don't even mess with any of that stuff

play08:20

down there and don't mess with the owner

play08:21

because you don't need to worry about

play08:22

that just type just type in testdb

play08:29

hold on

play08:30

um you could actually create testdb what

play08:32

happened there was i actually have

play08:34

installed like i had to uninstall sql

play08:36

server so it's it's showing that there's

play08:38

another instance there but you could

play08:40

type in test

play08:42

or you could just type in bb test like

play08:44

this

play08:45

and we're just kind of doing this for

play08:47

example sake two so you could just type

play08:49

in db test

play08:50

and then

play08:52

that's going to actually create a db

play08:54

test for you so

play08:56

within

play08:57

this within the 90

play09:00

90 is going to be spent like within here

play09:02

or whichever database that you're going

play09:04

to be working on so when you guys start

play09:06

working you're going to go in here and

play09:08

you're going to see probably 20

play09:10

databases right now there's only one

play09:12

database because it's just a local

play09:14

computer but when you start working

play09:16

you're going to have like 20 databases

play09:18

in here

play09:19

and when you fold this down

play09:21

you're going to have these things called

play09:22

tables so within the database test

play09:24

you're going to have

play09:26

tables

play09:28

i'm going to

play09:30

this

play09:31

explanation of what a database is blew

play09:34

my mind so i used to run with a data

play09:36

scientist

play09:38

or i had a i had a really big if you

play09:40

know me i was a really big runner and i

play09:42

used to run with a data scientist and

play09:43

one day he said something to me really

play09:45

profound

play09:46

he said that databases are excel

play09:49

spreadsheets that can be tied together

play09:52

through keys and

play09:54

if any if you don't even remember any

play09:57

bit of this course remember that because

play09:59

that is going to help you a lot when

play10:02

you're trying to visualize you know what

play10:04

exactly is a database a database is

play10:07

really just an excel spreadsheet on

play10:09

steroids it's an ex a database can hold

play10:13

uh

play10:15

like hundreds of tables and it's meant

play10:18

for all of these tables to be logically

play10:20

be able to be connected together and

play10:23

manipulated through sql queries so if

play10:25

you ever just get freaked out be like oh

play10:27

i just can't understand like what a

play10:29

database is or what these table things

play10:31

are just remember that

play10:34

tables are excel spreadsheets

play10:36

and these tables are stored within

play10:39

buckets of these databases if this thing

play10:42

kind of looks like a bucket i think it

play10:43

looks like a bucket and that's how i

play10:45

remember it tables are our databases are

play10:48

just buckets of tables and

play10:50

that's going to be the important part so

play10:53

let's go ahead let's right click on the

play10:55

tables and let's just create a table

play10:56

really quick and i'll even go kind of

play10:59

just show you this excel spreadsheet

play11:01

analogy and why i think it's you know

play11:03

such a good analogy

play11:04

so we'll go test

play11:07

you can name it whatever you want to you

play11:08

can just call it

play11:10

i don't know dog

play11:13

and we're going to call it table tip and

play11:14

then we're going to call this one table

play11:16

test

play11:20

and

play11:21

you will notice that nothing actually

play11:23

happens you'll say well we created our

play11:25

table

play11:27

why isn't showing up because you have to

play11:29

hit this you have to refresh it you have

play11:30

to hit this little button right here

play11:32

so

play11:34

go here

play11:35

and you will see it's created our actual

play11:38

table so within

play11:40

our database we have tables and within

play11:43

our tables

play11:44

you can see if you right click it and

play11:46

you go to select top 1000 rows this i do

play11:49

this i use this command every single day

play11:52

literally every single day at work i'm

play11:54

using this command

play11:55

so make sure to take take note of this

play11:57

command select top 1000 rows

play12:02

and

play12:03

we've got our table so just like an

play12:06

excel spreadsheet if you looked at an

play12:08

excel spreadsheet you would have

play12:10

um i don't know you'd have like a name

play12:12

then you'd have a price like if we had

play12:14

an excel spreadsheet of products you'd

play12:16

have a name then you would have a price

play12:18

then you would have

play12:19

uh like maybe like the location of the

play12:22

product or which warehouse it was in and

play12:24

then you would have just columns of data

play12:26

and it looks just exactly like an excel

play12:28

spreadsheet and up here this is another

play12:31

important part this is the query that's

play12:33

actually being run so

play12:35

this is all of our

play12:37

in three

play12:38

really important parts just to get like

play12:40

conceptually of like where to look in

play12:42

sql server management studio we have

play12:45

three important parts this is where all

play12:46

of our databases and our table tables

play12:49

are going to be graphically laid out

play12:51

this is where we're going to be actually

play12:52

writing our uh sql queries

play12:55

and then this down here is where all of

play12:58

our results from our sql queries are

play13:00

going to be displayed you see when i

play13:02

right click that and i went select top

play13:04

1000 rows it showed

play13:06

uh it created that sql for us and then

play13:10

displayed it down at the bottom and

play13:12

in a nutshell that's

play13:14

to get started in sql server management

play13:16

studio that's probably all you're going

play13:19

to need now other things that you're

play13:21

going to want to know is that this is

play13:24

how you execute the sql

play13:26

you can go up here to save your scripts

play13:28

like if you have a script that you're

play13:30

using all the time you can save them in

play13:32

particular folders

play13:34

and you always need to be cognizant and

play13:37

aware that

play13:39

don't

play13:40

execute

play13:41

sql on master model or

play13:44

msdb temp db always make sure that

play13:47

you're executing sql on

play13:49

the actual data database that you plan

play13:52

to otherwise you could accidentally

play13:54

execute against the master you could

play13:57

execute against the model

play13:59

and

play14:00

don't even worry about any of this stuff

play14:02

down here because you're never until you

play14:04

become like a db if you become a dba

play14:06

admin you might use this stuff down here

play14:08

but

play14:09

for people who

play14:11

are trying to get developer

play14:13

analyst jobs or just become some type of

play14:16

sql professional unless you're like a

play14:17

serious dba

play14:19

and you if you're trying to become a dba

play14:22

there's courses on that will teach you

play14:23

how to do that but for just being able

play14:25

to get you know up and running with sql

play14:28

that's all you're gonna need and not uh

play14:31

all you're going to need but that's

play14:32

going to be enough so that you could

play14:34

actually be able to google stuff and

play14:36

figure out stuff intuitively on your own

play14:38

which is kind of like the whole reason

play14:40

of this course that i'm going to uh take

play14:42

you guys on

play14:43

anyway that's gonna be my video for

play14:45

today i hope that you guys enjoyed this

play14:46

i hope that it was very helpful provided

play14:49

a lot of value for you if you did make

play14:51

sure to stick around for the rest of my

play14:53

videos make sure to drop a sub join my

play14:55

discord if you guys uh enjoyed it just

play14:58

or above all just hit that subscribe

play15:00

button anyway hope that you guys have a

play15:02

good one see you later

Rate This

5.0 / 5 (0 votes)

Связанные теги
SQL ServerInstallation GuideSSMSDatabase ManagementDeveloper ToolsExpress EditionTutorialData AnalysisServer SetupTech Tips
Вам нужно краткое изложение на английском?