Getting Started SQL Server 2005 Dr Ron Eaglin

  • Slides: 32
Download presentation
Getting Started SQL Server 2005 Dr. Ron Eaglin

Getting Started SQL Server 2005 Dr. Ron Eaglin

Lecture Topics • Installing SQL Server 2005 • Getting Started with SQL Server Management

Lecture Topics • Installing SQL Server 2005 • Getting Started with SQL Server Management Studio • Creating a New Database • Performing Queries

Installation • Multiple Editions with Different Licensing – Express – Workgroup – Standard –

Installation • Multiple Editions with Different Licensing – Express – Workgroup – Standard – Enterprise – Developer

http: //www. sqlservercentral. com/columnists/bknight/comparisonofsqlserver 2005 editions. asp

http: //www. sqlservercentral. com/columnists/bknight/comparisonofsqlserver 2005 editions. asp

Installation • For use with the coursework required you must download and install the

Installation • For use with the coursework required you must download and install the Developer Edition of SQL Server 2005. • You may install the database to your own machine or use the servers available to you from the ENT Department.

Logging In to a Database

Logging In to a Database

Logging In SQL Server Services

Logging In SQL Server Services

Available SQL Server Machines

Available SQL Server Machines

Once Logged In

Once Logged In

Common Tasks • • • Creating a Database Creating a Table Performing a Query

Common Tasks • • • Creating a Database Creating a Table Performing a Query Viewing SQL Creating Views and Other Manageable Objects

Creating a Database • Start at SQL Server Management Studio • Right Click on

Creating a Database • Start at SQL Server Management Studio • Right Click on Databases • Select New Databases

Creating a Database • Must Assign a Name for the Database – Data Files

Creating a Database • Must Assign a Name for the Database – Data Files – Log Files – Options

Creating a Database • Once database is created then you can start adding tables,

Creating a Database • Once database is created then you can start adding tables, views, etc… • Can add items using the GUI tools or use SQL script to create items

Creating Database Objects Query Tool

Creating Database Objects Query Tool

Put SQL Statements Here

Put SQL Statements Here

Creating Tables • Right Click on Tables • Select New Table • Table Editor

Creating Tables • Right Click on Tables • Select New Table • Table Editor Appears

Creating Tables • Setting PK in GUI – Right Click on Field in Table

Creating Tables • Setting PK in GUI – Right Click on Field in Table Editor – Select Set Primary Key • Other Options – Insert/Delete Column – Relationships, Index/Keys, Fulltext Indexes, XML Indexes, Check Constraints

Setting Foreign Keys in GUI • Right Click on Column in Tabled Editor –

Setting Foreign Keys in GUI • Right Click on Column in Tabled Editor – Select Relationships, Click Add

Adding FK in GUI • Properties of New Key Appear, click into Tables and

Adding FK in GUI • Properties of New Key Appear, click into Tables and Columns Specification

Adding FK in GUI Denotes Available Wizard

Adding FK in GUI Denotes Available Wizard

Specify PK and FK Tables

Specify PK and FK Tables

Adding FK to Table

Adding FK to Table

Creating Views

Creating Views

Creating Diagrams

Creating Diagrams

Creating Triggers

Creating Triggers

Conclusion • SQL Server 2005 Provides – Consolidated interface for management of database objects

Conclusion • SQL Server 2005 Provides – Consolidated interface for management of database objects – Ability to create and maintain basic objects; Tables, Views, Keys, Constraints, Triggers, etc….