SQL Server Management Studio

Aim: Overview of SQL Server 2018 Database and Analysis Services. Create a database schema using SQL Server Management Studio 



SQL Server Management Studio:


SQL Server Management Studio is an integrated environment for managing any SQL infrastructure, from SQL Server to Azure SQL database. SSMS provides tools to configure and administer instances of SQL Server and databases. Use SSMS to deploy, monitor, and upgrade the data-tier components used by your applications, and build queries and scripts. 

Database Engine:

The Database Engine is the core service for storing, processing and securing data. The database engine provides controlled access and rapid transaction processing to meet the requirements of the most demanding data consuming application within your enterprise. Use the database engine to create relational databases for online transaction processing or online analytical processing data. This includes creating a table for storing data and database objects such as index, views and stored procedure for viewing, managing and securing data. You can use SQL Server Management Studio to manage the database objects and SQL server Profiler for capturing server events.


You can download the Microsoft SQL Server Management tool from here. You can also find the SQL server in the same link that we have to download.


After downloading the tool and installing it when you open the software first of all you have to select SQL server for performing the operations. We will see all that step by step.

Step 1: Open the SQL server management tool and choose the server you would like to work with. You will see the screen as shown in below image.


Here you have to just select the Server name and click on connect button.

Step 2: Right click on the Database folder and create new database by giving it a name and continue to the next step.


After creating the database go to that database and create the tables by right clicking on the tables folder. for example tables are given bellow.

Tables Design:

1. Students Table


2. Subject/ Teacher Table


3. Subjects Table


 4. Groups Table


5. Marks Table


Step 3: Assign primary key and foreign key to the column that needed to connect with other tables column.

First assign primary key in every table where it is needed. To assign primary key follow the steps. Right click on the column that you want to give primary key and select set primary key. As shown in the image bellow


After assigning the key you will see key symbol in that column. 

Now in go to the table where you want to assign foreign key, and follow the same process as above and this time select Relationships instead of set primary key. You will see the dialog box as shown in figure.


Now click on the Add button and new key will be created. Then select tables and columns option and click on the 3 dots. You can see that in above figure.


Here select the primary key table from list and foreign key table from the list. Then under that select the column from the primary key table to which we have assign primary key and for foreign key, select the same column from the foreign key table.

Then click ok and close both dialog box and press ctr+s to save the changes. 


After all that now we are going to create the database diagram. Right click on the database diagram folder and select new database diagram option. After selecting it you will able to see the database diagram.


Conclusion: In this practical I have learnt about the software MS SQL Server Management Tool, where we can create the database and table as well as database diagram and we can manage it easily and manipulate data of the table.

No comments:

Post a Comment

Welcome to my blog