Introduction

Database solutions are integral to every organization that needs to store, analyze, and report on data. Microsoft SQL Server 2005 provides a robust platform for implementing your database solutions. SQL Server 2005 is packed with easy-to-use features that make it an ideal environment. In particular, this latest version of SQL Server is more secure, more scalable, and easier to use and manage than previous versions.

Microsoft SQL Server 2005: Database Essentials Step by Step is the first book in a series of two designed to help you build skills in a number of essential SQL Server areas. You can use this book if you are new to programming databases or if you are switching from another information storage system, such as Microsoft Office Access, or from a file-based storage system, such as .dbf or .txt files.

Inside, you’ll find information on which installation options to use in both a development and a production environment; which tools to use during your database design, database creation, and database objects definition; and what steps to take to retrieve and update data. The hands-on presentation of database skills will prepare you to move to the next level of SQL Server database management and to start applying the tools you’ve practiced in these chapters to your own work.

The second book in the series, Microsoft SQL Server 2005: Applied Techniques Step by Step, builds on the material presented in this book, with more extensive coverage of retrieving and analyzing data and of many features that make SQL Server 2005 such a comprehensive solution to your database needs.

Who This Book Is For

Microsoft SQL Server 2005: Database Essentials Step by Step is intended for developers and database administrators who want to begin using SQL Server 2005 as their main data repository and to use it not only as another file storage method, but also to enhance and speed their applications. By following the step-by-step procedures in each chapter, you will obtain a comprehensive, hands-on introduction to the most important options needed to program your database solutions using SQL Server 2005. Your skill level, job function, and familiarity with SQL Server will determine how this book will best serve you. See the chart in "Finding Your Best Starting Point in This Book" to determine how you can get what you need from this book.

How This Book Is Organized

Part I of this book describes why you need a database system, what tools you need to easily create database solutions, and how to utilize the different applications and tools that accompany SQL Server 2005. Part II provides the step-by-step procedures needed to both design and create a database and its objects. Part III explains how to retrieve information. Part IV details the steps and various methods used to update information in a database.

Finding Your Best Starting Point in This Book

If you are:

Follow these steps:

New to Relational Databases

  1. Install the sample files as described in the "Sample Files" section of this Introduction.

  2. Start at the beginning and work through the entire book for a quick introduction to the many capabilities of SQL Server 2005.

Planning to Set Up a Database in Your Shop

  1. Install the sample files as described in the "Sample Files" section of this Introduction.

  2. Pay particular attention to Chapter 4, which will guide you through some of the analysis you’ll need before beginning to design your system.

Familiar with Relational Databases or Migrating from an Earlier Version of SQL Server

  1. Install the sample files as described in the "Sample Files" section of this Introduction.

  2. Skim Chapter 2 as necessary and then work through Chapter 3. Skim the remainder of the book to find the areas that might be new to you.

Migrating to SQL Server from Another Database Platform

  1. Install the sample files as described in the "Sample Files" section of this Introduction.

  2. Work carefully through Chapter 2 and Chapter 3, skip (or skim) Chapter 4 and Chapter 5, and then work through the remainder of the book.

Familiar with SQL Server and Want to Enhance Your Understanding of the Capabilities in SQL Server 2005

  1. Install the sample files as described in the "Sample Files" section of this Introduction.

  2. Focus on Chapter 3, Chapter 4, and Chapter 5 and work through the rest of the book depending on your areas of interest.

Wanting to Deepen Your Level of Expertise in Coding Database Applications

  1. Install the sample files as described in the "Sample Files" section of this Introduction.

  2. Skim Chapter 3, Chapter 4, and Chapter 5, then work carefully through the remaining chapters.

Referencing the Book after Working Through the Exercises

  1. Use the index or the table of contents to find information about particular subjects.

  2. Read the Quick Reference sections at the end of each chapter to find a brief review of the syntax and techniques presented in the chapter.

Interested in Learning More about Applying the Techniques Covered in This Book

See Microsoft SQL Server 2005: Applied Techniques Step by Step, Microsoft Press, 2006 (ISBN 0-7356-2316-3).

Conventions and Features in This Book

This book presents information using conventions designed to make the information readable and easy to follow. Before you start the book, read the following list, which explains conventions you will see throughout the book and points out helpful features in the book that you might want to use.

Conventions

  • Each chapter gives you a background explanation as well as a set of procedures for learning by doing. Each procedure is presented as a series of numbered steps (1, 2, and so on).

  • Notes labeled "Tip" provide additional information or alternative methods for completing a step successfully.

  • Notes labeled "Important" alert you to information you need to check before continuing.

  • Text that you type appears in bold.

  • SQL keywords appear in uppercase.

  • Visual Basic programming elements appear in italics.

  • A series of menu commands are shown separated by the pipe character (|).

  • A plus sign (+) between two key names means that you must press those keys at the same time. For example, "Press Alt+Tab" means that you hold down the Alt key while you press the Tab key.

Other Features

  • Sidebars throughout the book provide more in-depth information about the topic. The sidebars might contain background information, design tips, or features related to the information being discussed.

  • Each chapter ends with a Quick Reference section. The Quick Reference section contains quick reminders of how to perform the tasks you learned in the chapter.

System Requirements

You will need the following hardware and software to complete the practice exercises in this book.

Note

Note

Microsoft SQL Server 2005 and Microsoft Visual Studio 2005 software are not included with this book! The CD-ROM packaged in the back of this book contains the code samples needed to complete the exercises. SQL Server 2005 and Visual Studio 2005 software must both be purchased separately.

  • Microsoft Windows XP with Service Pack 2, Microsoft Windows Server 2003 with Service Pack 1, or Microsoft Windows 2000 with Service Pack 4

  • Microsoft Visual Studio 2005 Standard Edition or Microsoft Visual Studio 2005 Professional Edition. For Chapter 5, you will need Microsoft Visio 2003, which is included with Visual Studio 2005 Professional with MSDN Premium. Alternatively, you can execute most of the code in this book using Microsoft Visual Basic 2005 Express Edition, which is available as a free download from www.microsoft.com.

  • Microsoft SQL Server 2005 Express (included with Visual Studio 2005) or Microsoft SQL Server 2005 Developer Edition

  • 600 MHz Pentium or compatible processor (1 GHz Pentium recommended)

  • 256 MB RAM (512 MB or more recommended)

  • Video monitor (800 × 600 or higher resolution) with at least 256 colors (1024 × 768 high-color 16-bit recommended)

  • CD-ROM or DVD-ROM drive

  • Microsoft mouse or compatible pointing device

Sample Files

The companion CD inside this book contains the sample files that you will use as you perform the exercises in the book. The files and step-by-step instructions in the chapters allow you to learn by doing, which is an easy and effective way to acquire and remember new skills.

Installing the Sample Files

Follow these steps to install the sample files on your computer so that you can use them with the exercises in this book.

  1. Remove the companion CD from the package inside this book and insert it into your CD-ROM drive.

    Note

    Note

    An end user license agreement should open automatically. If this agreement does not appear, open My Computer on the desktop or Start menu, double-click the icon for your CD-ROM drive, and then double-click StartCD.exe.

  2. Review the end user license agreement. If you accept the terms, select the accept option and then click Next.

    A menu will appear with options related to the book.

  3. Click Install Sample Files.

  4. Follow the instructions that appear.

    The sample files are installed to the following location on your computer:

    My DocumentsMicrosoft PressSQL DB Essentials SBS\

Using the Sample Files

Each chapter in this book explains when and how to use any sample files for that chapter. When it’s time to use a sample file, the book will point you to the appropriate file or folder. The chapters are built around scenarios that simulate real programming projects so that you can easily apply the skills you learn to your own work. For SQL Script samples, you will typically open the file in SQL Server Management Studio, highlight the relevant portion of the script, and execute only that portion before proceeding. For Visual Studio projects, you will double-click the .sln file to open the project and navigate within Visual Studio to the relevant code.

Project

Description

Chapter 3

Scripts to learn how to create traces, to study how different actions against the database alter its performance, and to create some deadlock troubleshooting.

Chapter 6

Samples allow you to test each of the different ways to access database information using the different technologies that can be used.

Chapter 7

Samples show you how to perform select operations against the database to obtain different results.

Chapter 8

Samples demonstrate how to create and work with views.

Chapter 9

Samples demonstrate how to use programmable objects to retrieve information.

Chapter 10

AdoNet Samples folder: Shows you how to insert information using ADO.NET objects.

Sample Codes folder: Includes different T-SQL scripts to insert information.

SSIS folder: Contains samples about how to insert data using Integration Services.

Chapter 11

Samples to learn how to perform delete operations.

Chapter 11-Completed

Contains the final version after performance of all step-by-step operations in the chapter.

Chapter 12

Shows how to perform update operations against the database.

Chapter 12-Completed

Contains the final version after performance of all step-by-step operations in the chapter.

Uninstalling the Sample Files

Follow these steps to remove the sample files from your computer.

  1. In the Control Panel, open Add Or Remove Programs.

  2. From the list of Currently Installed Programs, select Microsoft SQL Server 2005 Database Essentials Step by Step.

  3. Click Remove.

  4. Follow the instructions that appear to remove the sample files.

Note

Note

Sample files for this book are on the companion CD.

Support for This Book

Every effort has been made to ensure the accuracy of this book and the contents of the companion CD. As corrections or changes are collected, they will be added to a Microsoft Knowledge Base article. To view the list of known corrections for this book, visit the following site:

http://support.microsoft.com/kb/

Microsoft Learning provides support for books and companion CDs at the following address:

http://www.microsoft.com/learning/support/search.asp

Questions and Comments

If you have comments, questions, or ideas regarding the book or the companion CD or have questions that are not answered by visiting the sites listed above, please send them to Microsoft Press via e-mail to

Or via postal mail to

Microsoft PressAttn: Microsoft SQL Server 2005: Database Essentials Step by Step EditorOne Microsoft WayRedmond, WA 98052-6399

Please note that Microsoft software product support is not offered through the above addresses.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.217.156.236