Microsoft SQL SERVER Microsoft SQL SERVER 2008: Prepared By: Engr. Cherryl D. Cordova 1
Microsoft SQL SERVER Microsoft SQL SERVER 2008: Prepared By: Engr. Cherryl D. Cordova 1
Windows NT
Windows 9x
Database Engine
And Data Storage
Linux
SQL Server
Windows 2000
UNIX
Client Computer
ODBC
Application
DAO
SQL Server
OLE DB
Provider
DB-Library
application
Embedded SQL
application
SQL Server
DB-Library .dll
RDO
SQL Server
ODBC Driver
Client Net-libraries
Network
Server Net-libraries
SQL Server
Computer
10
11
12
13
14
15
16
Database
4 System Databases
Master
keeps track of all data values that affect the operation of SQL
Server. It contains information about the login accounts, the
existence of all the other SQL Server databases, and all the
servers configuration settings.
Model
a template SQL Server uses to create new databases. It
contains the system tables used by each database. The
system tables keep track of the database options, including
default settings, user authorities, and database rules.
Prepared by: Engr. Cherryl D. Cordova
17
Msdb
contains information about scheduling jobs and alerts,
as well as tracking the operators that receive alerts.
Tempdb
is used to store temporary tables built by SQL Server. It
is re-created each time SQL server is started. It is a
global resource, and all users must have permission to
use it.
18
Database Objects
Tables An organized set of columns. Each set
of columns is referred to as a row.
Two Types:
System Tables contain information about SQL Server
and its various objects. Named with the prefix sys
User Table contain user data, and represents some
type of entity
19
20
21
22
Views
doesnt actually exist as a separate table,but,
instead, is stored as a Select Statement that
references one or more base tables.
It can be queried just like base tables.
Common uses include selecting a subset of rows
or columns from a table, joining columns from
different tables, and summarizing the data from
one or more columns.
23
Rules
similar to check constraints because they restrict
the values that can be entered into a column It
can be queried just like base tables.
Defaults
specifies the value used automatically for a given
column when no data values are explicitly
assigned to the column and a new row is inserted.
Stored Procedures
are a group of Transact-SQL statement compiled
into a single execution plan at the time the stored
procedure is created.
Prepared by: Engr. Cherryl D. Cordova
24
Transact-SQL
A high-level language originally developed by
IBM to provide access to the data contained in
relational databases.
Standardized by American National Standards
Institute (ANSI)
Commonly used for database management
tasks
25
3 Categories of Transact-SQL
Data Definition Language (DDL)
commands are used for database management
tasks such as creating tables and views.
26