Microsoft SQL Server Tips

#1 SQL Tips

ยท

3 min read

Microsoft SQL Server Tips

Hello there ๐Ÿ‘‹

Welcome to its first edition of SQL Tips.

Today, we will be talking about the basics of Microsoft SQL Server;

Table of Contents

  • SQL Server & Database

  • Microsoft SQL Server

  • Microsoft SQL Server System Database

  • Things to note while creating a database without SQL

  • Things to note while creating a database with SQL

  • Things to note while backing up your database

  • Bonus Tip

Let's start

SQL Server & Database

Before I talk about Microsoft SQL Server, let's talk about SQL Server, database, and why you need it.

WHAT IS SQL & SQL SERVER? SQL means Structured Query Language. SQL Server is server focused tool built to help work on databases and it supports the SQL Language.

WHY DO YOU NEED IT? It is a more advanced tool that can support BI functions, analytics, as well as the processing of data at the server level. It helps retrieve data stored in the database, it makes work easier.

WHAT IS A DATABASE? A database is a collection of organized data. The work of a database for a developer is to store data.

Now that is said and done. Let's talk Microsoft SQL Server.

Microsoft SQL Server

Microsoft SQL Server is a relational database management system (RDBMS) that supports a wide variety of transaction processing, business intelligence, and analytics applications in corporate IT environments. As RDBMS, the database stores and provides access to data points that are related to one another.

Microsoft SQL Server System Database

There are four visible system databases, they are;

  1. Master Database: This system database is the first folder you would see on the server. As the name implies, it stores other databases and their locations. It also stores the logs.

  2. Model Database: This is a template system database. It stores all the template data.

  3. MSDB Database: This system database tracks the history of a series of common DBA (DataBase Analysis) activities like backups and restores.

  4. Tempdb Database: This system database is created by the model database. It is a temporary location for temporary data. The data is lost each time the system restarts.

Things to note while creating a database without SQL

  1. For text, use varchar.

  2. While using the varchar keyword, it will limit the number of characters. To get unlimited use of characters, use varchar(MAX).

  3. Checking the Allow Nulls box means you want to make a specific column optional.

  4. For numbers, use int.

Things to note while creating a database using SQL

  1. After creating the database, make sure to refresh. If you do not do this, you will not be able to access your database.

  2. When deleting the database, do not forget to check the box that says Close existing connections. If you do not do this, it will show an error and your database will not be deleted.

Things to note while backing up your database

Under the backup type:

  • Full means to back up the whole database.

  • Differential means backup the changes made to a specific database.

BONUS

Using SQL to change the user database setting from single user to multi-user, use the master keyword. A single user is only for a user and it's for maintenance while a multi-user is for more than one user and it is best for collaborations.

Keep in touch:

Thanks for reading till the end, if this was helpful, kindly leave a comment. It would most definitely help my writing. Thank you :) โค๏ธ

You can contact me via Email and Discord:

Email -

Discord - Sophyia#8929

ย