2. Introduction
● Microsoft SQL Server is a relational database management system developed
by Microsoft.
● As a database server, it is a software product with the primary function of
storing and retrieving data as requested by other software applications.
3. What is Database ?
● A collection of information organized
in such a way that a computer
program can quickly select desired
pieces of data.
● You can think of a database as an
electronic filing system.
4. Database Management System (DBMS)
● Simply put DBMS helps you to create and manage databases same like
MSWord helps you to create or manage word document.
● DBMS is a computer software providing the interface between user and
a database or multiple databases.
● It is a software system designed to allow the definition, creation,
querying, update and administration of databases.
5. SQL Server
● Microsoft SQL (Structured Query Language) Server is a
relational database management system developed by
Microsoft.
● As a database server, it is a software product whose primary
function is to store and retrieve data as requested by other
software application, be it those on the same computer or
those running on another computer across a network.
6. Features Of MS SQL Server
● Query Analyzer
● Profiler
● Service Manager
● Bulk Copy Program (BCP)
7. Query Analyzer
● Allows us to write queries and SQL statements
● Checks syntax of the SQL statement
written.
● Executes the statements
● Store and reload statements
● Save the results in file
● View reports (either as grid or as a text)
8. Profiler
● Monitoring tool
● Used for performance tuning
● An event monitoring protocol
● Event may be a query or a
transaction like logins etc
9. Service Manager
● Helps us to manage services
● More than one instance of SQL server can be
installed in a machine
● First Instance is called as default instance
● Rest of the instances (16 max) are called as
named instances
● Service manager helps in starting or stopping
the instances individually
10. Bulk Copy Program (BCP)
● Bulk Copy Program
● A powerful command line utility
that enables us to transfer large
number of records from a file to
database
● Time taken for copying to and from
database is very less
● Helps in back up and restoration
11. Database operations
● Creating a database
Create database <dbname>
● Changing a database
Use <dbname>
● Dropping a database
Drop database <dbname>
12. SQL DDL and DML Statements
● Data Definition Language (DDL) Statements
○ CREATE TABLE – Create a new table
○ ALTER TABLE – Modify a table
○ DROP TABLE – Delete a already existing a table
○ RENAME TABLE – Rename a table
● Data Manipulation Language (DML) Statements
○ SELECT – Extract data from the table
○ UPDATE – Update data in the table
○ DELETE – Deletes data from the table
○ INSERT INTO – Inserts new data into the table