01_589237 ffirs.qxd 11/30/05 7:08 PM Page i Wrox’s SQL Server™ 2005 Express Edition Starter Kit 01_589237 ffirs.qxd 11/30/05 7:08 PM Page ii 01_589237 ffirs.qxd 11/30/05 7:08 PM Page iii Wrox’s SQL Server™ 2005 Express Edition Starter Kit Rajesh George and Lance Delano 01_589237 ffirs.qxd 11/30/05 7:08 PM Page iv Wrox’s SQL Server™ 2005 Express Edition Starter Kit Published by Wiley Publishing, Inc. 10475 Crosspoint Boulevard Indianapolis, IN 46256 www.wiley.com Copyright © 2006 by Wiley Publishing, Inc., Indianapolis, Indiana Published simultaneously in Canada ISBN-13: 978-0-7645-8923-2 ISBN-10: 0-7645-8923-7 Manufactured in the United States of America 10 9 8 7 6 5 4 3 2 1 1B/SR/RS/QV/IN Library of Congress Cataloging-in-Publication Data George, Rajesh, 1974- Wrox’s SQLserver 2005 : express edition starter kit / Rajesh George and Lance Delano. p. cm. Includes index. ISBN-13: 978-0-7645-8923-2 (paper/CD-ROM+online) ISBN-10: 0-7645-8923-7 (paper/CD-ROM+online) 1. SQLserver. 2. Client/server computing. 3. Database management. I. Delano, Lance, 1957- . II. Title. QA76.9.C55G46 2005 005.2’768--dc22 2005025426 No part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning, or otherwise, except as per- mitted under Section 107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or authorization through payment of the appropriate per-copy fee to the Copyright Clearance Center, Inc., 222 Rosewood Drive, Danvers, MA01923, (978) 750-8400, fax (978) 646-8600. Requests to the Publisher for permission should be addressed to the Legal Department, Wiley Publishing, Inc., 10475 Crosspoint Blvd., Indianapolis, IN 46256, (317) 572-3447, fax (317) 572-4355 or online at http://www.wiley.com/go/permissions. LIMIT OF LIABILITY/DISCLAIMER OF WARRANTY:THE PUBLISHER AND THE AUTHOR MAKE NO REPRESENTATIONS OR WARRANTIES WITH RESPECT TO THE ACCURACYOR COMPLETENESS OF THE CONTENTS OF THIS WORK AND SPECIFICALLY DISCLAIM ALL WARRANTIES, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR APARTICULAR PURPOSE. NO WARRANTY MAY BE CREATED OR EXTENDED BY SALES OR PROMOTIONAL MATERIALS. THE ADVICE AND STRATEGIES CONTAINED HEREIN MAYNOT BE SUITABLE FOR EVERYSITUATION. THIS WORK IS SOLD WITH THE UNDERSTANDING THAT THE PUBLISHER IS NOT ENGAGED IN RENDERING LEGAL, ACCOUNTING, OR OTHER PROFESSIONAL SERVICES. IF PROFESSIONAL ASSISTANCE IS REQUIRED, THE SERVICES OF A COMPETENT PROFESSIONAL PERSON SHOULD BE SOUGHT. NEITHER THE PUBLISHER NOR THE AUTHOR SHALLBE LIABLE FOR DAMAGES ARISING HERE- FROM. THE FACT THAT AN ORGANIZATION OR WEBSITE IS REFERRED TO IN THIS WORK AS ACITA- TION AND/OR APOTENTIALSOURCE OF FURTHER INFORMATION DOES NOT MEAN THAT THE AUTHOR OR THE PUBLISHER ENDORSES THE INFORMATION THE ORGANIZATION OR WEBSITE MAYPROVIDE OR RECOMMENDATIONS IT MAYMAKE. FURTHER, READERS SHOULD BE AWARE THAT INTERNET WEBSITES LISTED IN THIS WORK MAY HAVE CHANGED OR DISAPPEARED BETWEEN WHEN THIS WORK WAS WRITTEN AND WHEN IT IS READ. For general information on our other products and services please contact our Customer Care Department within the United States at (800) 762-2974, outside the United States at (317) 572-3993 or fax (317) 572-4002. Trademarks:Wiley, the Wiley logo, Wrox, the Wrox logo, Programmer to Programmer, and related trade dress are trademarks or registered trademarks of John Wiley & Sons, Inc. and/or its affiliates, in the United States and other countries, and may not be used without written permission. SQLServer is a trademark of Microsoft Corpo- ration in the United States and/or other countries. All other trademarks are the property of their respective own- ers. Wiley Publishing, Inc., is not associated with any product or vendor mentioned in this book.“Microsoft” is a registered trademark of Microsoft Corporation in the United States and/or other countries and is used by Wiley Publishing, Inc. under license from owner. [Wrox’s SQLServer 2005 Express Edition Starter Kit] is an independent publication not affiliated with Microsoft Corporation.” Wiley also publishes its books in a variety of electronic formats. Some content that appears in print may not be available in electronic books. 01_589237 ffirs.qxd 11/30/05 7:08 PM Page v About the Authors Rajesh Georgeis one of the founders of the SQLServer Express project within Microsoft, and has been involved in many of the key design decisions. He worked as a program manager on the SQLServer team responsible for various functionalities in SQLServer Express, MSDE, and SQLData Access layers. He has spoken at several conferences and has authored the SQLServer Express Overview white paper on Microsoft.com. With prior software development experience in the Windows team at Microsoft as well as companies such as Nortel Networks and Netscape, he is currently a development manager at Amazon.com. Rajesh holds a Masters in Computer Science from Mississippi State University and MBA from University of Washington. You can reach him directly at [email protected]. Lance Delanois a lead program manager in Visual Studio. Lance has an extensive background in database tools including database design and query tools. He is heavily involved in the customer research, proposals, specification, and program management of SQLServer Express. 01_589237 ffirs.qxd 11/30/05 7:08 PM Page vi 01_589237 ffirs.qxd 11/30/05 7:08 PM Page vii Credits Executive Editor Vice President and Executive Publisher Robert Elliott Joseph B. Wikert Development Editor Project Coordinator Sara Shlaer Ryan Steffen Technical Editor Graphics and Production Specialists Andrew Watt Jonelle Burns Carrie Foster Production Editor Laura Goddard Felicia Robinson Mary Gillot Virgin Lynsey Osborn Copy Editor Alicia B.South Kathryn Duggan Quality Control Technician Editorial Manager Jessica Kramer Mary Beth Wakefield Proofreading and Indexing Production Manager TECHBOOKS Production Services Tim Tate Vice President & Executive Group Publisher Richard Swadley 01_589237 ffirs.qxd 11/30/05 7:08 PM Page viii 01_589237 ffirs.qxd 11/30/05 7:08 PM Page ix To my mother,Valsa George. Her determination and sacrifice remains an inspiration. —Rajesh George Thanks Natalie, and thanks kids, for the sacrifice you made so I could write this book. Now, let’s go camping. —Lance Delano