1. Trang chủ
  2. » Khoa Học Tự Nhiên

2006 AW hitchhikers guide to visual studio and SQL serv

1,7K 144 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 1.688
Dung lượng 37,43 MB

Nội dung

Hitchhiker's Guide to Visual Studio and SQL Server, 7th Edition: Best Practice Architectures and Examples By R Vaughn William, Peter Blackburn Publisher: Addison Wesley Professional Pub Date: November 02, 2006 Print ISBN-10: 0-321-24362-5 Print ISBN-13: 978-0-321-24362-1 Pages: 1128 Table of Contents | Index Since 1994 when he wrote his first "Hitchhiker's Guide", William Vaughn has been providing developers all over the world the intimate details of how SQL Server can be accessed and managed from RAD languages like Visual Basic and Visual Basic NET With the 7th Edition, Bill has completely rewritten this encyclopedic work from cover to covergiving readers his insightful views on how applications should be built to maximize both developer and code performance Visual Studio and the languages it hosts have never been as sophisticated as they are todaythe same can be said for SQL Server This makes it even more important for developers to understand how to best leverage their features without being held back by their complexity That's what this book is all aboutmaking it easier for developers regardless of their know-how The 7th edition is unique in that it's designed to provide not only up-to-date tutorials on the latest development tools provided by Visual Studio and SQL Server, but also a solid platform of architectural advice and rich examples for developers trying to choose between the myriad of platform options Beginners and experts alike will find comprehensive stepby-step instructions that can make the reader's introduction to the latest versions of Visual Studio and SQL Server far easier Key topic coverage includes: • Data access architectures and how to choose the best strategy for Windows Forms, ASP.NET, XML Web Services, and SQL Server CLR executables Where do these make sense and how much will they cost to build and maintain? • SQL Server and relational database fundamentals and inner-machinery How does SQL Server work and why is it important that developers know? • Making the development experience more productive through judicious use of the Visual Studio toolset, and how to know when the wizards can help • Using the latest ADO.NET data provider efficiently and safely • How to protect the security of your databaseand your jobby avoiding common mistakes • How to build secure, efficient, scalable applications in less time with fewer resourceshow to create faster code faster • How to leverage the potential of SQL Server CLR executables and knowing when these features make sense • How to work with your DBA to maintain database integrity and security • Working with the new Visual Studio report controls to expose your organization's data safely and easily with or without leveraging existing SQL Server Reporting Services technology William R Vaughn is the President of Beta V Corporation and a Microsoft MVP In 2000 he retired from Microsoft after 14 years to focus on mentoring, speaking, and writing His specialty is data access application design especially when connecting to SQL Serverover the years he's written 12 books on the subject He's a popular speaker at technical conferences all over the world where his wit and no-holds-barred technical insights win him rave reviews William is also a member of the prestigious INETA Speaker's Bureau His works include articles for SQL Server Magazine and a bi-weekly editorial for Processor Magazine as well as books published by Microsoft Press and Apress The book includes a DVD that contains a wealth of examples as well as several sample databases used to illustrate points discussed in the book Authenticated readers will also have unrestricted access to the book's supporting web site, www.hitchhikerguides.net, where additional examples, online forums, and other supplementary materials are available www.awprofessional.com/msserverseries www.hitchhikerguides.net www.betav.com/blogs/billva www.betav.com Hitchhiker's Guide to Visual Studio and SQL Server, 7th Edition: Best Practice Architectures and Examples By R Vaughn William, Peter Blackburn Publisher: Addison Wesley Professional Pub Date: November 02, 2006 Print ISBN-10: 0-321-24362-5 Print ISBN-13: 978-0-321-24362-1 Pages: 1128 Table of Contents | Index Copyright Microsoft Windows Server System Series Foreword Acknowledgments About the Authors Introduction How Did I Get to This Point? The 7th Edition's Scope Keeping Current Is This Book Written For You? Getting Help and Support Chapter 1 Exploring Application Architectures Introduction Choosing the "Right" Architecture Understanding Your Toolset Recognizing Application Design Constraints Choosing the Right Data Access Interface Choosing the Right Database Management System Understanding Basic Data Access Architectures Summary Chapter 2 How Does SQL Server Work? Introduction Servers and Versions Installing SQL Server Running SQL Server Services Touring the SQL Server System Databases Understanding the SQL Server Security System Managing SQL Server Connections Using the SQL Query Tools Creating SELECT Queries Creating and Querying Views Implementing Business Rules User-Defined (Aliased) Types Implementing Constraints Managing Databases and Queries with Batches and Scripts The Query Optimizer and the Query Plan Understanding the Buffer Cache Executing Action Commands Introducing Stored Procedures Introducing Triggers Using Transactions to Protect Data Integrity Administrative Functions Working with the Transaction Log Summary Chapter 3 Relational Databases 101 Introduction Getting Started with Solid Database Design Understanding Relational Database Normalization Creating Tables, Rows, and Columns Summary Chapter 4 Getting Started with Visual Studio Introduction How I Got Here Installing the "Right" Version of Visual Studio Launching Visual Studio Customizing Visual Studio 2005 Configuring Server (or Database) Explorers Creating and Managing Database Connections Managing Database Objects with the Server Explorer Managing Queries with the Query Designer Using the Server Explorer to View Synonyms Using the Server Explorer to Manage Types Using the Server Explorer to Manage Assemblies Using the Server Explorer to Manage Servers Summary Chapter 5 Managing Executables with the Server Explorer Introduction Creating and Editing Stored Procedures Creating New Stored Procedures Executing T-SQL with Run Selection Debugging Stored Procedures Debugging Stored Procedures on Remote Instances Debugging Stored Procedures from Code Using the Server Explorer to Manage Functions Summary Chapter 6 Building Data Sources, DataSets, and TableAdapters Why Create YADAI? Is Strongly Typed Data Important? What Is a Data Source? What Is a TableAdapter? What's Missing in the TableAdapter? Creating Database-Based Data Sources Configuring a TableAdapter Binding to the TableAdapter Using Drag and Drop Using a TableAdapter DirectlyWithout Drag-and-Drop? Managing DataTable Classes in the Data Source Designer Moving Data Sources Between Applications Creating Web Service Data Sources Summary Chapter 7 Managing Data Tools and Data Binding Introduction Touring the Visual Studio Toolbox Using the DataSet Toolbox Element Introduction to Data Binding Using the BindingSource Class Using the BindingNavigator Control Using the DataGridView Control Using the ProgressBar Control Summary Chapter 8 Getting Started with ADO.NET Introduction Approaching Data Access Challenges ADO.NET from 50,000 Feet Using the Visual Studio Object Browser to Explore ADO.NET Instantiating ADO.NET Objects Exploring the System.Data.SqlClient Namespace Exploring the SqlClient Namespace Exploring the System.Data Namespace Summary Chapter 9 Getting Connected Introduction Connectivity StrategiesThat Include Security Configuring the Server and Firewall Connection Strategies Establishing a Connection Writing Code to Create Connections Understanding and Managing the Connection Pool Building a ConnectionString for Other Providers Getting Visual Studio to Build Your ConnectionString Opening and Closing Connections (Semi-) Automatically Understanding the Connection Properties Using the Connection Methods Handling Connection Events Managing Connection Exceptions Summary Chapter 10 Managing SqlCommand Objects Introduction Creating SqlCommand Objects Integrating Ad Hoc Queries into Your Application Coding Parameter Queries Validating the Value Executing Stored Procedures Summary Chapter 11 Executing SqlCommand Objects Introduction Executing SqlCommand Objects Synchronously Understanding the SqlDataReader Populating Data Structures Fetching Rows Asynchronously Executing Commands Asynchronously Summary Chapter 12 Managing Updates Introduction Using Wizards to Generate Update Action Commands Update Alternatives: Using the TableAdapter Configuration Wizard Complex Updates with Server-Side Logic Managing Concurrency by Design or Collision Summary Chapter 13 Managing SQL Server CLR Executables Introduction Evolving CLR Executables Technology Where Do CLR Executables Make Sense? Designing a CLR Executable Building Your First CLR Executable Building and Deploying a CLR Executable Setting Up a Test Environment Working with ADO.NET from Within CLR Executables Coding CLR Stored Procedures Implementing Basic User-Defined Type (UDT) CLR Executables Implementing Advanced CLR User Defined Types Accessing CLR UDTs Elsewhere Implementing CLR Aggregate Executables Implementing CLR Triggers Advanced Debugging UDT Safety and IP Security Summary Chapter 14 Creating and Managing Reports Introduction Understanding Reporting Services and RDL Visual Studio 2005 Reporting What Are the Visual Studio 2005 Report Tools? Building Your First Report Exploring the ReportViewer Class in Depth Managing Server Reports Managing Parameters Advanced Reporting Techniques Implementing the Matrix Report Summary Chapter 15 Summary and Wintry: Where We Are Now Appendix I Installing the Examples and Test Databases Installing the Examples Installing the Example Databases Chapter-Specific Configuration Issues Summary Appendix II Reinstalling the DACW and Other Missing Functionality in Visual Studio Appendix III Monitoring SQL Server Monitoring SQL Server with the SQL Profiler Monitoring SQL Server and ADO.NET with Performance Counters Summary Appendix IV Creating and Managing Server-Side Cursors Why Are Server-side Cursors Important? How Does ADO.NET Implement Cursors? How Are Server-Side Cursors Managed? How Can ADO.NET Create a Server-Side Cursor? Fetching Data from the Cursor Updating with a Server-Side Cursor Summary Index Copyright Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks Where those designations appear in this book, and the publisher was aware of a trademark claim, the designations have been printed with initial capital letters or in all capitals The authors and publisher have taken care in the preparation of this book, but make no expressed or implied warranty of any kind and assume no responsibility for errors or omissions No liability is assumed for incidental or consequential damages in connection with or arising out of the use of the information or programs contained herein The publisher offers excellent discounts on this book when ordered in quantity for bulk purchases or special sales, which may include electronic versions and/or custom covers and content particular to your business, training goals, marketing focus, and branding interests For more information, please contact: U.S Corporate and Government Sales (800) 382-3419 corpsales@pearsontechgroup.com For sales outside the United States please contact: International Sales international@pearsoned.com Visit us on the Web: www.awprofessional.com Library of Congress Cataloging-in-Publication Data: Vaughn, William R Hitchhiker's guide to Visual studio and SQL server : best practice architect Vaughn, Peter Blackburn p cm ISBN 0-321-243625 (pbk : alk paper) 1 Application softwareDevelopment Microsoft Visu SQL server I Blackburn, Peter, 1967- II Title QA76.76.A65V39 2006 005.3dc22 2006030355 Copyright © 2007 Pearson Education, Inc All rights reserved Printed in the United States of America This publication is protected by copyright, and permission must be obtained from the publisher prior to any prohibited reproduction, storage in a retrieval system, or transmission in any form or by any means, electronic, mechanical, photocopying, recording, or likewise For information regarding permissions, write to: Pearson Education, Inc Rights and Contracts Department 75 Arlington Street, Suite 300 Boston, MA 02116 Fax: (617) 848-7047 Text printed in the United States on recycled paper at R.R Donnelley and Sons in Crawfordsville, Indiana First printing, November 2006 Dedication To Fran and Jack Vaughn and to all that have fallen in service of their country Index [SYMBOL] [A] [B] [C] [D] [E] [F] [G] [H] [I] [J] [K] [L] [M] [N] [O] [P] [Q] [R] [S] [T] [U] [V] [W] [X] [Y] [Z] UDF (User-Defined Functions) advantages of Inline Functions return values Scalar Functions structure of Table Functions UDTs (user-defined types) 2nd AddLoan CLR UDTs challenges of debugging IsNull property methods Null property NULL values Parse function performance tuning public properties 2nd public structure declaration referencing referencing and updating values SELECT queries SqlUserDefinedTypeAttribute stepping through code templates ToString function typICurrencyV2 UDT user-defined serialization validating data when to use creating with Server Explorer 2nd instantiating UDT variables UID connection pools underscore (_) Unicode compared to ANSI data types literals UNION queries UNIQUE constraint unique identifier data type UNSAFE setting (CLR executables) untyped DataSets Update Criteria property Update method 2nd Update Query type (Query Designer) UPDATE statement BLOBs concurrency decimal and floating point numbers generating with Query Designer parameter-based updates SET clause strings strongly typed data columns updating cursors UpdateBatchSize property (SqlDataAdapter class) UpdateCommand object UpdateCommand property (SqlDataAdapter class) UpdatedRowSource property (SqlCommand object) 2nd UpdateEvent sample application CustomerUpdate stored procedure DataRow versions Update application batch mode updates RowUpdated event, trapping RowUpdating event, trapping Update method updates batch mode updates CLR UDT (user-defined type) values 2nd with CommandBuilder action commands, generating adding to applications capabilities of concurrency management wizard dependency on complex updates with server-side logic executing with RowUpdating event overview of UpdateEvent example [See application design, UpdateEvents application.] concurrency management Identity column values overview of rows BLOBs concurrency decimal and floating point numbers parameter-based updates strings strongly typed data columns UPDATE SET syntax server-side cursors SqlDataAdapter class with TableAdapter example generated parameters, managing parameters, configuring with Visual Studio stored procedures triggers UPPER function user choices, limiting user databases creating managing User ID keyword user instances, enabling 2nd user settings user-defined types [See UDTs (user-defined types).] usernames Using operator 2nd Index [SYMBOL] [A] [B] [C] [D] [E] [F] [G] [H] [I] [J] [K] [L] [M] [N] [O] [P] [Q] [R] [S] [T] [U] [V] [W] [X] [Y] [Z] validation CLR UDTs (user-defined types) overview of sample application Value property (SqlParameter class) ValueMember property varchar data type 2nd variables, @@IDENTITY 2nd VIA (Virtual Interface Adaptor) View menu commands, Server Explorer views creating Database Snapshots indexes managing with Query Designer T-SQL views Virtual Interface Adaptor (VIA) Visual Basic Visual Basic NET CLR executables Imports statement NULL values, testing for Using block Visual Studio beta software building ConnectionStrings class diagrams CLR executables code generation configuring parameters with controls [See classes, BindingNavigator; controls, BindingNavigator.] CTP (community tech preview) releases custom configurations creating with Options dialog custom project templates online or local help saving and loading database connections Database Diagrams creating definition of databases creating in code creating with Server Explorer installing image library MSDN documentation Setup program launching Object Browser overview of Query Designer criteria pane Delete Query type derived tables diagram pane Insert Results Query type Insert Values Query type JOIN behavior 2nd Make Table Query type managing database views with overview of Select Query type SQL pane Update Query type Report Designer Report Items toolbox Report Viewer configuring events methods overview of properties Server Explorer [See Server Explorer, assemblies, managing.] SKUs (stock-keeping units) SQLEv (SQL Server Everywhere Edition), support for TableAdapter objects tables, editing with Server Explorer Toolbox [See also controls, BindingNavigator.] BindingNavigator class BindingSource class DataGridView control DataSet element deprecated data access controls finding controls in ProgressBar control Tool Tray versions Visual Studio Toolbox [See also controls, BindingNavigator.] BindingNavigator class BindingSource class events methods properties typical data binding scenarios DataGridView control DataSet element deprecated data access controls finding controls in ProgressBar control Tool Tray Index [SYMBOL] [A] [B] [C] [D] [E] [F] [G] [H] [I] [J] [K] [L] [M] [N] [O] [P] [Q] [R] [S] [T] [U] [V] [W] [X] [Y] [Z] WaitAll function WaitAny function WaitHandle objects 2nd waiting for asynchronous operations 2nd web application connection pools Web Services ASP applications versus building consuming and testing defined exposing Data Sources in the UI NET Framework and XMLWeb Service architectures WHERE clause "white window of death," whiteboards wizards DACW (DataAdapter Configuration Wizard) dependency on CommandBuilder installing dependency on CommandBuilder Export Template Wizard Import and Export Settings Wizard Workgroup Edition (SQL Server) 2nd Index [SYMBOL] [A] [B] [C] [D] [E] [F] [G] [H] [I] [J] [K] [L] [M] [N] [O] [P] [Q] [R] [S] [T] [U] [V] [W] [X] [Y] [Z] xml data type XML Web Service architectures XSD files XZoomModeproperty (Report Viewer class) Index [SYMBOL] [A] [B] [C] [D] [E] [F] [G] [H] [I] [J] [K] [L] [M] [N] [O] [P] [Q] [R] [S] [T] [U] [V] [W] [X] [Y] [Z] YADAI (yet another data access interface) Yukon [See SQL Server, action commands.] Index [SYMBOL] [A] [B] [C] [D] [E] [F] [G] [H] [I] [J] [K] [L] [M] [N] [O] [P] [Q] [R] [S] [T] [U] [V] [W] [X] [Y] [Z] ZoomPercent property (Report Viewer class) ... Reinstalling the DACW and Other Missing Functionality in Visual Studio Appendix III Monitoring SQL Server Monitoring SQL Server with the SQL Profiler Monitoring SQL Server and ADO.NET with Performance Counters Summary Appendix IV Creating and Managing Server-Side Cursors... previous as I expanded my understanding of Visual Basic and SQL Server and as these products evolved and matured Each edition focused on the latest Visual Basic and SQL Server interfaces and features, and each became the definitive source... The 7th Edition's Scope The Hitchhiker's Guide to Visual Studio and SQL Server, 7th Edition, is intended to provide a broad treatment of Visual Studio and SQL Server, how they interact, and how developers can build professional applications using these tools and

Ngày đăng: 25/03/2019, 15:59

TỪ KHÓA LIÊN QUAN