topic 1 intro to sql server

27
7/25/2019 TOPIC 1 Intro to SQL Server http://slidepdf.com/reader/full/topic-1-intro-to-sql-server 1/27 HIGHER DIPLOMA IN INFORMATION TECHNOLOGY Database Systems Topic 1: Introduction to SQL Server 1

Upload: marcus-ong

Post on 28-Feb-2018

235 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: TOPIC 1 Intro to SQL Server

7/25/2019 TOPIC 1 Intro to SQL Server

http://slidepdf.com/reader/full/topic-1-intro-to-sql-server 1/27

HIGHER DIPLOMA IN INFORMATION TECHNOLOGY

Database Systems

Topic 1: Introduction to SQL Server 

1

Page 2: TOPIC 1 Intro to SQL Server

7/25/2019 TOPIC 1 Intro to SQL Server

http://slidepdf.com/reader/full/topic-1-intro-to-sql-server 2/27

LEARNING OBJECTIVES

• At the end of the topic, participants should be able to – derive an overview of the features provided by the SQL

Server 

2

Page 3: TOPIC 1 Intro to SQL Server

7/25/2019 TOPIC 1 Intro to SQL Server

http://slidepdf.com/reader/full/topic-1-intro-to-sql-server 3/27

Introduction

• hat is a Database – A collection of !elated data

 – A lo"ically coherent collection of data with some inherent

meanin"

 – Is desi"ned, built and populated with data for a specific

purpose

 – #as an intended "roup of user and some preconceived

applications in which these users are interested

3

Page 4: TOPIC 1 Intro to SQL Server

7/25/2019 TOPIC 1 Intro to SQL Server

http://slidepdf.com/reader/full/topic-1-intro-to-sql-server 4/27

Introduction

• Database $ana"ement System %D&$S' – A collection of pro"rams that enables users to create and

maintain a database %software'

 – A "eneral(purpose software system that facilitates the

processes of definin", constructin" and manipulatin"

databases for various applications

 – )*amples of D&$S, +racle Database, +racle Database

Tools, $icrosoft SQL Server, Sybase Database

4

Page 5: TOPIC 1 Intro to SQL Server

7/25/2019 TOPIC 1 Intro to SQL Server

http://slidepdf.com/reader/full/topic-1-intro-to-sql-server 5/27

Introduction

• $icrosoft SQL Server --. relational database en"ine is ahi"hly scalable, reliable en"ine for storin" data/

• The SQL Server --., )nterprise )dition can support "roups of

database servers that cooperate to form terabyte(si0ed

databases accessed by thousands of concurrent users

• Its database en"ine is able to dynamically ac2uire3releaseresources dependin" on the number of users connectin" to the

database

• )asy to administer usin" the "raphical user interface %45I'

administration utilities

%database en"ine enables D&$S to run data'

5

Page 6: TOPIC 1 Intro to SQL Server

7/25/2019 TOPIC 1 Intro to SQL Server

http://slidepdf.com/reader/full/topic-1-intro-to-sql-server 6/27

Introduction

• !eliable %minimum down time'• Administrative actions without restartin"

• Inte"ration with indows --. and indows 6T7 failover

clusterin" to define virtual servers that 8eep runnin" even if

one of the physical servers in the node fails

6

Page 7: TOPIC 1 Intro to SQL Server

7/25/2019 TOPIC 1 Intro to SQL Server

http://slidepdf.com/reader/full/topic-1-intro-to-sql-server 7/27

Introduction

• #i"hly Secure – Lo"in authentication can be inte"rated with indows

Authentication

• Therefore no passwords are stored in SQL Server or

sent across the networ8 where they could be read by

networ8 sniffers

 – Sites can set up 9(level auditin" of all users accessin" a

database, and can use Secure Soc8ets Layer %SSL'

encryption to encrypt all data transferred between

applications and the database/

7

Page 8: TOPIC 1 Intro to SQL Server

7/25/2019 TOPIC 1 Intro to SQL Server

http://slidepdf.com/reader/full/topic-1-intro-to-sql-server 8/27

Introduction

• Distributed 2uery feature of the database en"ine – allows access to data usin" +L) D&

 – The tables of the remote +L) D& data source can be

referenced in Transact(SQL statements ust li8e tables that

actually reside in a SQL Server database

 – ;ull(te*t search feature allows you to perform sophisticated

pattern matches a"ainst te*tual data stored in SQL Server

databases or indows files/

8

Page 9: TOPIC 1 Intro to SQL Server

7/25/2019 TOPIC 1 Intro to SQL Server

http://slidepdf.com/reader/full/topic-1-intro-to-sql-server 9/27

Introduction

• The relational database en"ine is capable of storin" detailedrecords of all the transactions "enerated by the top online

transaction processin" %+LT<' systems

• The en"ine can also support the demandin" processin"

re2uirements for fact tables and dimension tables in the lar"est

online analytical %+LA<' data warehouses• Internet Inte"ration

 – includes inte"rated =$L support

 – scalability, availability, and security features re2uired to

operate as the data stora"e component of the lar"est

websites

9

Page 10: TOPIC 1 Intro to SQL Server

7/25/2019 TOPIC 1 Intro to SQL Server

http://slidepdf.com/reader/full/topic-1-intro-to-sql-server 10/27

Feature o! S"L Ser#er $%%&

• SQL Server --. pro"rammin" model is inte"rated with theindows D6A architecture for developin" eb applications

• Supports features such as )n"lish Query and the $icrosoft

Search Service to incorporate user(friendly 2ueries and

powerful search capabilities in eb applications

10

Page 11: TOPIC 1 Intro to SQL Server

7/25/2019 TOPIC 1 Intro to SQL Server

http://slidepdf.com/reader/full/topic-1-intro-to-sql-server 11/27

Feature o! S"L Ser#er $%%&

• Scalability and Availability – Same database en"ine can be used across platforms

ran"in" from mobile palmtop, laptop computers runnin"

$icrosoft indows7 =<3>ISTA throu"h lar"e,

multiprocessor servers runnin" $icrosoft indows --.

Data 9enter )dition – )nterprise )dition supports features such as federated

servers, inde*ed views, and lar"e memory support that

allow it to scale to the performance levels re2uired by the

lar"est websites/

11

Page 12: TOPIC 1 Intro to SQL Server

7/25/2019 TOPIC 1 Intro to SQL Server

http://slidepdf.com/reader/full/topic-1-intro-to-sql-server 12/27

Feature o! S"L Ser#er $%%&

• )nterprise(Level Database ;eatures

 – Database en"ine supports the features re2uired to support

demandin" data processin" environments

 – The database en"ine protects data inte"rity while minimi0in"

the overheads of mana"in" thousands of users modifyin" thedatabase concurrently

 – SQL Server --. distributed 2ueries allows referencin" data

from multiple sources as if it were a part of a SQL Server --.

database, while at the same time, the distributed transaction

support protects the inte"rity of any updates of the distributed

data

 – !eplication allows one to maintain multiple copies of data,

while ensurin" that the separate copies remain synchroni0ed

12

Page 13: TOPIC 1 Intro to SQL Server

7/25/2019 TOPIC 1 Intro to SQL Server

http://slidepdf.com/reader/full/topic-1-intro-to-sql-server 13/27

Feature o! S"L Ser#er $%%&

• )ase of installation, deployment, and use – includes a set of administrative and development tools that

improve upon the processes of installin", deployin",

mana"in", and usin" SQL Server 

 – supports a standards(based pro"rammin" model inte"rated

with the indows D6A, ma8in" the use of SQL Serverdatabases and data warehouses a seamless part of buildin"

powerful and scalable systems

 – allows rapid deliverin" SQL Server applications that

customers can implement with a minimum of installation

and administrative overheads

13

Page 14: TOPIC 1 Intro to SQL Server

7/25/2019 TOPIC 1 Intro to SQL Server

http://slidepdf.com/reader/full/topic-1-intro-to-sql-server 14/27

Feature o! S"L Ser#er $%%&

• Data warehousin" – includes tools for e*tractin" and analy0in" summary data

for online analytical processin"

 – includes tools for visually desi"nin" databases and

analy0in" data usin" )n"lish(based 2uestions

14

Page 15: TOPIC 1 Intro to SQL Server

7/25/2019 TOPIC 1 Intro to SQL Server

http://slidepdf.com/reader/full/topic-1-intro-to-sql-server 15/27

S"L Ser#er En#iron'ent

• SQL Server?s database en"ine is the primary server applicationin the SQL Server pac8a"e

• ;ollowin" are the main responsibilities of the database en"ine:

 – <rovide reliable stora"e for data sent to the en"ine

 – <rovide a means to rapidly access this data rapidly

 – <rovide consistent access to the data

 – 9ontrol access to the data throu"h security

 – )nforce data(inte"rity rules to ensure the data actually

means somethin"

15

Page 16: TOPIC 1 Intro to SQL Server

7/25/2019 TOPIC 1 Intro to SQL Server

http://slidepdf.com/reader/full/topic-1-intro-to-sql-server 16/27

S"L Ser#er En#iron'ent

• SQL Server )nterprise $ana"er 

 – The )nterprise $ana"er is the central console from which

most database(mana"ement tas8s can be coordinated

• SQL )nterprise $ana"er %SQL()$' provides a sin"le interface

from which all servers in a company can be mana"ed• The Service $ana"er is a small applet that allows easy control

of several 8ey SQL services:

 – SQL Server, the database en"ine

 – SQL A"ent, a ob scheduler 

 – SQL Search, a full(te*t search en"ine

 – +LA< Server, a separate service used for warehousin"

16

Page 17: TOPIC 1 Intro to SQL Server

7/25/2019 TOPIC 1 Intro to SQL Server

http://slidepdf.com/reader/full/topic-1-intro-to-sql-server 17/27

S"L Ser#er En#iron'ent

• SQL Server A"ent – The SQL Server A"ent is an inte"rated schedulin" tool that

allows convenient e*ecution of scheduled scripts and

maintenance obs

 – It is re2uired to use of replication services

 – The a"ent also handles automated alerts, for e*ample, if the

database runs out of space

17

Page 18: TOPIC 1 Intro to SQL Server

7/25/2019 TOPIC 1 Intro to SQL Server

http://slidepdf.com/reader/full/topic-1-intro-to-sql-server 18/27

S"L Ser#er En#iron'ent

• The A"ent is a indows service that runs on the same machineas the SQL Server en"ine

 – controlled throu"h either the SQL()$ or 

 – ordinary indows service mana"er 

 – the A"ent is confi"ured throu"h the )nterprise $ana"er by

drillin" down throu"h the SQL Server instance @

$ana"ement @ SQL Server A"ent

18

Page 19: TOPIC 1 Intro to SQL Server

7/25/2019 TOPIC 1 Intro to SQL Server

http://slidepdf.com/reader/full/topic-1-intro-to-sql-server 19/27

S"L Ser#er En#iron'ent

• SQL Query Analy0er  – The Query Analy0er is the easiest place to run SQL scripts

• )ach window in the Query Analy0er represents a

connection to a database

• Able to have connections to many different servers

 – obect browser3template mana"er and

 – an inte"rated stored procedure debu""er 

19

Page 20: TOPIC 1 Intro to SQL Server

7/25/2019 TOPIC 1 Intro to SQL Server

http://slidepdf.com/reader/full/topic-1-intro-to-sql-server 20/27

S"L Ser#er En#iron'ent

• SQL <rofiler  – The SQL <rofiler is a client tool that captures the 2ueries

and results flowin" to and from the server 

 – It is analo"ous to a networ8 sniffer 

 – <rofiler has the ability to capture and save a complete

record of all the traffic passed to the server 

 – A series of filters is useful for parin" down the results when

you want to drill down to a sin"le connection or even a

sin"le 2uery/

20

Page 21: TOPIC 1 Intro to SQL Server

7/25/2019 TOPIC 1 Intro to SQL Server

http://slidepdf.com/reader/full/topic-1-intro-to-sql-server 21/27

S"L Ser#er En#iron'ent

• The SQL <rofiler can be used to perform these helpful tas8s: – Steppin" throu"h problem 2ueries to find the cause of the

problem

 – ;indin" and dia"nosin" slow(runnin" 2ueries

 – 9apturin" the series of SQL statements that lead to a

problem/ The saved trace can then be used to replicate the

problem on a test server where the problem can be

dia"nosed

 – $onitorin" the performance of SQL Server to tune

wor8loads

21

Page 22: TOPIC 1 Intro to SQL Server

7/25/2019 TOPIC 1 Intro to SQL Server

http://slidepdf.com/reader/full/topic-1-intro-to-sql-server 22/27

S"L Ser#er En#iron'ent

• Inte"ration Services – is a powerful tool used to move data from one form to

another 

 – If the file was relatively uniform and strai"htforward, you

mi"ht be able to use a command(line &9< pro"ram to

import, or bul8(copy your data inside

 – )lse, you mi"ht have to resort to a simple >& pro"ram to

parse out each line and insert it into the SQL Server 

22

Page 23: TOPIC 1 Intro to SQL Server

7/25/2019 TOPIC 1 Intro to SQL Server

http://slidepdf.com/reader/full/topic-1-intro-to-sql-server 23/27

S"L Ser#er En#iron'ent

• !eplication – is a server(based tool that allows data to be synchroni0ed

between two or more databases

 – It can send data from one SQL Server to another, or it can

include +racle, Access, or any other database that is

accessible via +D&9 or +L)D&

• SQL Server supports three 8inds of replication:

 – Snapshot replication

 – Transactional replication

 – $er"e replication

23

Page 24: TOPIC 1 Intro to SQL Server

7/25/2019 TOPIC 1 Intro to SQL Server

http://slidepdf.com/reader/full/topic-1-intro-to-sql-server 24/27

S"L Ser#er En#iron'ent

• Snapshot !eplication – Ta8es a picture, or snapshot, of the published data in the

database at one moment in time

 – The simplest type of replication, and it "uarantees latent

consistency between the <ublisher and Subscriber 

 – $ost appropriate in read(only application scenarios such as

loo8(up or code tables, or in decision support systems in

which data latency re2uirements are not strict and data

volumes are not e*cessive

 – 9an be on a scheduled basis or on demand

24

Page 25: TOPIC 1 Intro to SQL Server

7/25/2019 TOPIC 1 Intro to SQL Server

http://slidepdf.com/reader/full/topic-1-intro-to-sql-server 25/27

S"L Ser#er En#iron'ent

• Analysis %+LA<' Services connects to one or more SQL Serverdatabases containin" a data warehouse

• &ased on the criteria you select, data cubes are created on this

data to allow powerful searches, called data minin"

• The Analysis %+LA<' Services client tool assists in the addition

of new data to the warehouse and allows schedulin" of cubeupdates

25

Page 26: TOPIC 1 Intro to SQL Server

7/25/2019 TOPIC 1 Intro to SQL Server

http://slidepdf.com/reader/full/topic-1-intro-to-sql-server 26/27

S"L Ser#er En#iron'ent

• +LA< is commonly used to perform the followin" tas8s: – Trend analysis to forecast the future trends

 – 9ombine otherwise disconnected variables to "ain insi"hts

into past performance

 – <erform offline summaries of commonly used data points

for instant access via eb or custom interface

26

Page 27: TOPIC 1 Intro to SQL Server

7/25/2019 TOPIC 1 Intro to SQL Server

http://slidepdf.com/reader/full/topic-1-intro-to-sql-server 27/27

NE(T SESSION

T+<I9

)!($+D)L A6D DIA4!A$S

27