Welcome to learn SQL Server in 16 Hours.
In this complete
tutorial we will learn SQL Server step by step
in 16 hours
Whatever we are going to cover in 16 hours, that we have put on the video out there.
There is a complete
syllabus which we will be covering in this 16 hours.
Before we start with any of the topic of the syllabus
first we should
know is
from where to download SQL Server.
In order to get SQL Server
type download SQL Server on google.
we should get something like
SQL Server Downloads
If we go to SQL Server downloads
we should get this page.
It is very much possible that these links
what we are seeing on the video
can change because the google search engine changes,
the links from Microsoft changes.
SQL Server comes with lot of versions.
But will concentrate on primarily two versions which we need to
know
The first one is the free version which is termed as an Express edition.
An express edition we get it free, we can do development for free using it.
We can also go for production, go live using it
It has very very limited features.
While in developer edition
it's a full featured thing.
We can do development,
we can do test on non-production environment.
Non-production means not with the real cutomer
Inside the development house we can learn SQL Server.
We can do testing and so on.
Our goal through this training is to make you a real professional SQL Server developer.
Install developer edition not express edition.
Express edition does not have those
important features when it comes for
real develoopment
Developer edition
is must much needed
In case
if we are having problem with installation
then send email at questpond@questpond.com
Will make sure
we do not have
any hassles with the installation. Will guide you step by step
where we can see how to install SQL Server
Once we have installed SQL server
will get this SQL Server Management Studio
By using this management studio we can
do activities with SQL Server, create tables, create database and so on.
Open management studio out here
At this moment we are using SQL Server 2008.
For the fundamental section
We won't see lot of changes.
The menus,
the UI is almost same
Wherever new things are there we will be doing in the new version.
Do not worry that this video is in SQL Server 2008, still
all the menus what we will be seeing here is valid for 2016 as well.
In case we are not getting the login screen inside SQL server
Click on File -> Connect Object Explorer
We should get the default screen
Before we move ahead will try to define
what is the use of SQL Server?
Lot of people who have come to this video they already know about it.
but will still define it.
SQL Server
is a software which is created by Microsoft.
The main goal of SQL Server is to store data using the relational model.
It is a RDBMS
It is a Relational database management system
to store data
There are two major softwares
which gets installed when we install SQL server
First one is
a service, a service is a background process
In Servic.nse
there is something called as
SQL Server service
We have SQL Server 2008 as a service.
Also we have SQL express installed.
We can have multiple versions of SQL Server installed in the same computer.
This service over here
is the heart of SQL Server. It is that main core engine which searches, which creates tables, which handles all that things.
In order to create table and
backup the database,
Search.
via this service would be very difficult.
They created something called as the SQL Server Management Studio what we see here.
Via this we connect to the service
and do activities.
There are two major components, one is
the service which is running at the background.
which is handling that
relational
RDBMS things
Then we have GUI
via which we can connect to that service
and create tables and so on.
Connect from the SQL Server Management studio
to the
SQL Server Service
If the service is not started
then we can get this error.
At this moment the service is running.
For some reason if the service is stopped
and try to connect via the management studio
will end up into an exception
The SQL Server Management Studio is trying to connect to the
background
SQL Server process
Because the SQL Server process we have stopped at this moment
will land up in to an error.
It says
while establishing a connection to SQL Server
we found that it was not accessible.
If we restart the service
and connect then we will not have issues.
via the SQL Server Management Studio we are connected the
background service and now we can see databases and create tables
and do lot of activities.
Before we move ahead will again go through this screen what is here
Authentication screen
When we talk about data
data should be only access by authorized and authenticated people.
From the security point of view SQL Server has given
two ways of authenticating.
The first one is termed as windows authentication
and the second one is termed as a SQL server authentication
In SQL Server authentication
we are given a login id and password
we need to provide the login id and password.
In windows authentication
we have to login to the windows account of the computer.
At this moment we are logged in with the user called as
User
We will be
going via the windows
to SQL Server to authenticate.
There are two ways of
doing it. One is
we login
into the windows system
and the second one is
by using the
username and password
Windows authentication is more secured because
when we login in windows authentication somebody has given access to the
server and from there there is a
indirect impersonation done to SQL Server
In password authentication or in SQL Server authentication
anybody who gets the login id and password they can access SQL Server
Both of them have
own
benefits and own issues
We will be connecting to the RDBMS engine
Engine means
the process at the background
This engine is running at this moment in the local host.
or in the local computer.
Once we connect, we get such kind of object explorer
where we see
all the object of SQL Server
In case we do not get this window then click on View
Click on object explorer and will get it.
SQL Server
organizes data
in the format of database,
tables,
rows and columns.
On the top level we have a database
called as Invoice database
Inside the Invoice database we can have supplier table
We can have Customer table,
Accounts table, Invoices products table so on.
Every table will have row
Row will be structured in a column format.
The custumer table
will have a customer row and the customer row will have
customer code as a column, customer name as a column, customer amount as column etc.
Will create a database called as Invoice.
In the invoice database will create a table called as Customer
Create
two fields in that customer table one is CustomerCode
and the other one is CustomerName
To create a database go to the object explorer
When we click on the plus sign we see lots of databases
We need to create a new database
Click on databases -> click on new database
Will give a name here as InvoiceDB.
when we create database in SQL Server
it creates two files
Whatever data we are storing in SQL Server gets stored into two files.
One is the InvoiceDB file
which is the MDF file
and the other one is a log file
When we creating the database at the end of the day the database is a simple
file wherein everything gets stored.
In case we want to change that we can do it.
Will talk about both of these files
later.
There we can see the InvoiceDB has been created
Inside the InvoiceDB create a table
called as
tblCustomer
Inside the tblCustomer we will have two fields
Create a filed here called as CustomerCode
At this moment we will store
nvarchar. nvarchar means
this is going to be a string datatype
We will have
values which has numeric as well strings
We can either say Control+S
or press the save button
It says do you want to name this table as Table1
Will name this as tbl
Customer
It is created. Close this
To see
if the table has been created or not, go back to the object explorer
Click on the (+) sign
Here we have
the InvoiceDB at the top
Then we have the table
The table has two columns CustomerCode and CustomerName
In short
the way
SQL Server organizes it's data
To add customer record right click and click on Edit
We can add records
We are storing record over here
That brings us to the end of the first 15 minutes of
Learn SQL Server step by step in 16 hours.
We have more
15 hours and 45 still pending.
In the first 15 minutes we saw from where to get SQL Server
What is the concept of database? what is the concept of tables? what is the concept of rows and columns?
we created a simple database,
a table
as well as inserted some records
In the next
video we will talk about what is an identity column? What is referential integrity? What are constraints?
What is a primary key, unique key and foreign key?
The next session will be a long session
Let us try to become a proper
SQL Server professional.
Thank you
Here is a small gift from me.
Will give you this small SQL Server Q&A book wherein
we have covered lot of questions like Normalization,
SQL
Fundamental things we have covered in this book like Joints and Indexes and so on.
To get this book
share
this youtube video on facebook, on twitter account
Send us the link saying here you have shared.
Will give you this e-book for free
Keep hearing
and try to become a
SQL Server professional
Thank you