SQL Server 2008 Tutorial 1:: IT 5101 Introduction To Database Systems
SQL Server 2008 Tutorial 1:: IT 5101 Introduction To Database Systems
Introduction
IT 5101
Introduction to Database Systems
J.G. Zheng
Fall 2011
Overview
SQL Server introduction
2
SQL Server Overview
SQL Server is a relational database
management and analysis system by
Microsoft
Targeting the enterprise-level database market
Major versions
SQL Server 7.0 (Windows NT)
SQL Server 2000 (Windows Server 2000)
SQL Server 2005 (Windows Server 2003)
SQL Server 2008 (Windows Server 2008)
SQL Server 2008 R2 (Windows Server 2008)
3
SQL Server Services
Database Engine is the core service for
storing, processing and securing data.
4
SQL Server 2008 Download
SQL Server 2008 R2 Express Edition
The express edition offers database engine
service and management tools
Download
http://www.microsoft.com/express/Database/
Choose 32-bit or 64-bit based on your
operating system (Windows)
Make sure the installation options include at
least Database with Management Tools
5
SQL Server 2008 Installation
SQL Server 2008 is a complex program, so please follow
an installation guide to install SQL Server 2008
6
Post-Installation Check
Use the SQL Server Configuration Manager
to view service status
7
First Feel of SQL Server 2008
Configuration manager
Database engine
Databases, tables, and other objects
Retrieving table data
Designing tables and columns
Editing tables and records
Relationship diagram
8
Configuration Manager
Configuration manager is a tool to view SQL
Server service status, start or stop services
http://technet.microsoft.com/en-
us/library/ms174212.aspx
9
SQL Server Management Studio
SQL Server Management Studio is a major tool to control the
DBMS
Object
Explorer: all
databases and
other objects
are here.
11
Attach Sample Databases (1)
Download the Northwind sample
database and extract the two files Right click on Databases
to bring up the menu.
to a folder
Northwind2003-mini.mdf
Northwind2003-mini_log.ldf
The 2 files must be in the same
folder
Note
Its recommended that database files
should be put into a designated
folder where you know its directory
path, otherwise you will have a
difficult time to find them later.
12
Attach Database (2) 2. Select the Northwind2003-
mini.mdf file and click OK.
You need to remember in
which folder you put the two
database files.
13
Attach Database (3)
14
Table Data
Right click
for menus
15
Database Diagram
View a diagram
of tables,
columns and
relationships.
16
Database Properties Go to the
Files Tab.
17
Table Design Metadata
Right click on a
table and
select Design
18
Using Management Studio
SQL Server Management Studio
http://technet.microsoft.com/en-
us/library/ms174173.aspx
19
Readings and Resources
SQL Server introduction on Wikipedia
http://en.wikipedia.org/wiki/Microsoft_SQL_Server
20