You are on page 1of 47

Module 1:

SQL Server Overview

Vidya Vrat Agarwal. | MCT, MCSD


What Is SQL Server

Results
Results

Transact-SQL
Transact-SQL
Application
Application
Client SQL Server
Relational Database
Management System
Integrating SQL Server with Operating Systems

Windows Me,
Windows 2000 Windows NT 98, and 95 Third Party Browsers

Internet
Internet

Client
Server

Windows 2000 Windows NT Windows Me Windows 98 Windows CE


SQL Server Platforms
SQL Server Integration with Microsoft BackOffice

Internet Microsoft Windows NT Server

Microsoft Systems
SQL Server Microsoft
Exchange
Management Server Server
IBM Host

Microsoft Data and


SNA Server Applications
SQL Server Integration with Microsoft BackOffice
SQL Server Services
 Data Management
MSSQLServer  Transaction and Query
Processing
 Data Integrity

 Jobs
SQLServerAgent  Alerts
 Operators

Microsoft Distributed  Distributed Transactions


Transaction Coordinator Management

Server
 Full-Text Catalogs
Microsoft Search  Full-Text Indexes
SQL Server Software

 SQL Server Enterprise Manager Snap-in for Microsoft


Management Console
 SQL Server Administration Tools and Wizards
 SQL Server Command Prompt Management Tools
 SQL Server Help and SQL Server Books Online
 Microsoft SQL Server OLAP Services
 Microsoft English Query Support
SQL Server Enterprise Manager

SQL Server provides an administrative client, SQL


Server Enterprise Manager, which is a Microsoft
Management Console (MMC) snap-in.

MMC is a shared user interface for BackOffice server


management. This shared console provides a convenient
and consistent environment for administration tools.
SQL Server Administration Tools and Wizards

Graphical Tool Purpose


SQL Server Client Utility used to manage the client
Configuration configuration for communication
components
SQL Server File used to integrate SQL Server with
Performance Monitor Windows NT Performance Monitor,
providing the latest activity and
performance statistics
SQL Server Query Graphical query tool used to analyze the
Analyzer plan of a query, view statistics information,
and manage multiple queries in different
windows Simultaneously
SQL Server Profiler Utility used to capture a continuous record
of server activity and provide auditing
capability
SQL Server Command Prompt Management Tools

SQL Server command prompt management tools allow


enter Transact-SQL statements and execute script files.

Utility Descpiption
osql Utility that uses Open Database Connectivity
(ODBC) to communicate with SQL Server—
primarily used to execute batch files containing one
or more SQL statements
bcp Batch utility used to import and export data to and
from SQL Server— copies data to or from a data file
in a user-specified format
SQL Server Help and SQL Server Books Online

SQL Server offers different types of Help to assist you.


The following table describes each type of Help that
SQL Server provides.

SQL Server documentation set - SQL Server Books


Online (BOL) provides online access to SQL Server
documentation.
Microsoft SQL Server OLAP Services

Microsoft SQL Server OLAP Services allows summary


data to be stored in a variety of formats and locations,
including SQL Server and Oracle databases.
Storing summary data increases query performance and
reduces the load on the data warehouse. Summary data
is often generated to satisfy the commonly executed
queries in the data warehouse.
Microsoft English Query Support

Using the Microsoft English Query environment,


developers can turn their relational databases into
English Query applications.
This environment allows end users to pose questions in
English instead of writing complex Transact-SQL
statements.
For example, users can simply ask the question,
“What are the total sales for Region 5?”
SQL Server Architecture

 Communication
 Application Development
 Administration
Communication

Client Server
Application
Application SQL
SQLServer
Server
Open
OpenData
Data
Database
DatabaseInterface
Interface Services
Services
Network
NetworkLibrary
Library Network
NetworkLibrary
Library

Tabular
Tabular Data
Data Stream
Stream
Application Development

Data
Data
Object
Object ADO RDO
Interfaces
Interfaces

Application
Application
Programming
Programming OLE DB ODBC
Interfaces
Interfaces

Other Data Relational


Sources Databases
Types of Databases

System Databases
master
model tempdb msdb distribution

pubs northwind user1

User Databases
System Databases

master Controls the user databases and operation of


SQL Server as a whole by keeping track of such
information as user accounts, configurable
environment variables, and system error messages.
model Provides a template or prototype for new user
databases
tempdb Provides a storage area for temporary tables and
other temporary working storage needs
msdb Supports SQL Server Agent and provides a
storage area for scheduling information and job history
Database Objects
Clustered Index
Anderson
Anderson Stored
Stored
PK Barr FK Procedure
Procedure
... UpdatePhone
UpdatePhone Trigger
Trigger

EmpNum LastName FirstName CtryCode Extension LastMod


integer longstring varchar(20) char(2) char(6) longstring

10191 Labrie Angela FR x19891 \HR\KarlD

10192 Labrie Eva FR x19433 \HR\KarlD

10202 Martin Jose SP x21467 \HR\AmyL

EmployeePhoneView
EmployeePhoneView
SELECT
SELECT lastname,
lastname, firstname,
firstname, extension
extension Check
FROM
FROM employee
employee x#####
x#####
Referring to SQL Server Objects

 Fully Qualified Names


server.database.owner.object
 Partially Specified Names
 Server defaults to local server

 Database defaults to current database

 Owner defaults to the user name in the database

CREATE
CREATE TABLE
TABLE northwind.dbo.order_history
northwind.dbo.order_history
Fully Qualified Names

The complete name of a SQL Server object includes four


identifiers: the server name, database name, owner name,
and object name in the following format:
server.database.owner.object
An object name that specifies all four parts is known as a
fully qualified name. Each object created in SQL Server
must have a unique, fully qualified name.
For example, you can have two tables named orders in
the same database as long as they belong to different
owners. Also, column names must be unique within a
table or view.
Partially Specified Names

When referencing an object, do not always have to


specify the server, database, and owner. Intermediate
identifiers can be omitted as long as their position is
indicated by periods. The valid formats of object names
are as follows:
server.database.owner.object
server.database..object
server..owner.object
server...object
database.owner.object
database..object
owner.object
object
System Tables

 Store Information (Metadata) About the System and


Database Objects
 Database Catalog Stores Metadata About a Specific
Database
 System Catalog Stores Metadata About the Entire
System and All Other Databases
Metadata Retrieval

 System Stored Procedures

EXEC
EXEC sp_help
sp_help employees
employees

 System Functions

SELECT
SELECT USER_NAME(10)
USER_NAME(10)

 Information Schema Views

SELECT
SELECT ** FROM
FROM INFORMATION_SCHEMA.TABLES
INFORMATION_SCHEMA.TABLES
Designing an Application for SQL Server
Intelligent
Intelligent Intelligent
Intelligent NN-Tier
-Tier Internet
Internet
Server
Server(2(2-Tier)
-Tier) Client
Client(2(2-Tier)
-Tier)

Browser
Browser
Presentation
Presentation Client
Client

Presentation
Presentation Presentation
Presentation
Business
Business Presentation
Presentation
Business
Business
Business Business
Business
Business
Data
Data Data
Data
Data
Data
Data
Data
Implementing a SQL Server Database

 Designing the Database


 Creating the Database and Database Objects
 Testing and Tuning the Application and Database
 Planning Deployment
 Administering the Application After Deployment
Administering a SQL Server Database

 Installing SQL Server


 Establish network security
 Configure SQL Server
 Building Databases
 Managing Ongoing Activities
 Import and export data
 Back up and restore the database and log
 Monitor and tune the database
Check Your Understanding.
Q.1. What is SQL Server ?
How many versions Microsoft has released and
what is the code name for SQL 7.0.
Q.2. Name the Supported Platforms available on which
Server components can run.
Q.3. What is Back – Office ?
Name the Server Components available having support
with SQL Server.
Q.4. What is SQL Server Enterprise manager.?
Q.5. What is SQL Server Query Analyzer.?
Q.6. Name the Command prompt management tools
supported by SQL Server.?
Q.7. What is the Name given by Microsoft for the Microsoft
Documentation Set.?
Q.8. What is Microsoft English Query.?
Q.9. What are the Type of Databases available in SQL
Server.?
Q.10. Name the System Databases available in SQL
Server.? and What is the Function of each database.
Q.11. What is the purpose of User Databases available
with SQL Server by default.
Q.12. What is Metadata.?
Q.13. What is the Difference between Database Catalog
and System catalog.?
Q.14. What is the Full Form of the Following.?
1- TDS 8- SQL
2- DTC 9- OLAP
3- ADO 10- RDO
4- OLE DB 11- ODBC
5- API 12- ASP
6- UDA 13- MMC
7- SNA 14. SMS
Q.15. What are Fully Qualified and Partially Specified
Domain name ?.
Q.16. What is the Code Name of Microsoft SQL Server 7.0
and what it meant for.?
Q.17. Who has worked with the first Hand Maintained
Database and when?
Thank You.

You might also like