Skip to main content

Introduction to Microsoft SQL Server

Hello everybody. Welcome to my blog. This is my very first post and thanks in advance for reading this.

I will be writing a series of blogs on learning Microsoft SQL Server. My target though will be for students and beginners, but the long-term goal is to make every beginner an expert. Experienced professionals can also use this to revise the topics as everything is going to be in a short and crisp format.

I am not going to concentrate too much about the theories, architectures and designs. My posts will be on to start coding in SQL. However, important theoretical concepts will be explained simultaneously along with the code. From writing a simple SQL query to creating complex Stored Procedures and functions, we will be crossing all nook and corner of this great stuff. Let’s dive into the tutorial.

Getting started with SQL                                
                                                         
                                                I will be using Microsoft SQL Server Management Studio 17. You all require a similar kind of version. I recommend every beginner to try to install this. If you work Hands-on in parallel, then you can master SQL in every passing day. If you do not have this installed, cool. You can understand the concepts just by going through this post.

Open Microsoft SQL Server Management Studio 17 -> Click the plug button in the Object Explorer (see Figure1) to get the server pop up, sometimes it appears without clicking it along with a server name. (see Figure2)


Figure1: Connect to a server


Figure2: Choose Server name
                                                To know about the server, it is a place where a large amount of data is stored. For Example, if we want to save our Name and Age, we write a query and the record is inserted in a table. This table is a part of a database, which can store a large number of tables, stored procedures, views etc. This database is a part of a server, which can store multiple databases. Thus, to make it clear, the order goes like this,
Record->Table->Database->Server

If you are working in an organisation, there will be many servers containing data. However, to start practising or working on your own machine, you can work with the local server i.e your PC or laptop.

Figure3: Choose the local server

In Figure2, the default server name appears after we try to connect to a server. However, if you are unaware of connecting to a local server, in the Server name field (see Figure3), if you click “<Browse for more…>” from the drop-down you will get the below pop up (see Figure4).



Figure4: Select your local server

 
You have to choose Local Servers->Expand the Database Engine->Your local server>Connect. This is the local server and it is enough for us to practice and master SQL.

We will start the proceedings by creating a database. To create a new database, right-click database (see Figure5) ->New Database

Figure5: Select New Database

Fill the Database name field with an appropriate name related to the content you are going to store(see Figure6).

Figure6: Name the database

Click OK. Here we have named the database as "Customers".(see Figure7)

Figure7: Customers has been added to the list of databases 
Now we can see that the Customers database have been added to the list of databases.


That’s it for today. Tomorrow we will start with creating tables inside this Customers database. Thank you for reading my blog. Share it with people who will find this useful. Also, comment on your doubts and questions on this topic. You are welcomed to criticise my mistakes. Thanks for your support. See you tomorrow.
















Comments