Muutke küpsiste eelistusi

Transact-SQL Programming [Raamat]

  • Formaat: Book, 836 pages
  • Ilmumisaeg: 11-May-1999
  • Kirjastus: O'Reilly Media
  • ISBN-10: 1565924010
  • ISBN-13: 9781565924017
  • Raamat
  • Hind: 63,99 €*
  • * saadame teile pakkumise kasutatud raamatule, mille hind võib erineda kodulehel olevast hinnast
  • See raamat on trükist otsas, kuid me saadame teile pakkumise kasutatud raamatule.
  • Kogus:
  • Lisa ostukorvi
  • Tasuta tarne
  • Lisa soovinimekirja
  • Formaat: Book, 836 pages
  • Ilmumisaeg: 11-May-1999
  • Kirjastus: O'Reilly Media
  • ISBN-10: 1565924010
  • ISBN-13: 9781565924017
Provides detailed information about Transact-SQL programming and shows specific differences between the Microsoft and Sybase versions of the language.

Full of examples, best practices, and real-world advice, this book thoroughly explores Transact-SQL, a full-featured procedural language that extends the power of SQL on both Microsoft SQL Server 7.0 and Sybase version 11.5. Includes a diskette containing extensive examples.

Transact-SQL is a procedural language used on both Microsoft SQL Server and Sybase SQL Server systems. It is a full-featured programming language that dramatically extends the power of SQL (Structured Query Language).

The language provides programmers with a broad range of features, including:

  • A rich set of datatypes, including specialized types for identifiers, timestamps, images, and long text fields
  • Local and global variables
  • Fully programmable server objects like views, triggers, stored procedures, and batch command files
  • Conditional processing
  • Exception and error handling
  • Full transaction control
  • System stored procedures that reduce the complexity of many operations, like adding users or automatically generating HTML Web pages

In recent years, the versions of Transact-SQL have diverged on Microsoft and Sybase systems; the book explains the differences. It also contains up-to-the-minute information on the latest versions: Microsoft SQL Server versions 6.5 and 7.0 and Sybase version 11.5.

A brief table of contents follows:

PART I: The Basics: Programming in Transact-SQL

  1. Introduction to Transact-SQL
  2. Matching Business Rules
  3. SQL Primer
  4. Transact-SQL Fundamentals
  5. Format and Style

PART II: The Building Blocks: Transact-SQL Language Elements

  1. Datatypes and Variables
  2. Conditional Processing
  3. Row Processing with Cursors
  4. Error Handling
  5. Temporary Objects
  6. Transactions and Logging

PART III: Functions and Extensions

  1. Functions
  2. CASE Expressions and Transact-SQL Extensions

PART IV: Programming Transact-SQL Objects

  1. Stored Procedures and Modular Design
  2. Triggers
  3. Views
  4. System and Extended Stored Procedures and BCP

PART V: Performance Tuning and Optimization

  1. Transact-SQL Code Design
  2. Code Maintenance in the SQL Server
  3. Transact-SQL Optimization and Tuning
  4. Debugging Transact-SQL Programs

PART VI: Appendixes

A. System Tables B. What's New for Transact-SQL in Microsoft SQL Server 7.0? C. BCP

The book comes with a CD-ROM containing an extensive set of examples from the book and complete programs that illustrate the power of the language.



Full of examples, best practices, and real-world advice, this book thoroughly explores Transact-SQL, a full-featured procedural language that extends the power of SQL on both Microsoft SQL Server 7.0 and Sybase version 11.5. Includes a diskette containing extensive examples.
Foreword xi(2)
Preface xiii
I. The Basics: Programming in Transact-SQL 1(174)
1. Introduction to Transact-SQL
3(25)
SQL and the Introduction of Transact-SQL
3(1)
The Relational Database Model
4(2)
Normalization
6(7)
Row Processing Versus Set Processing
13(1)
The History of SQL Server
14(2)
What Is Transact-SQL?
16(10)
Summary
26(2)
2. Database Analysis and Design
28(23)
The Need for Adequate Analysis and Design
28(1)
The Systems Life Cycle
29(2)
Overview of Analysis
31(3)
Overview of Design
34(4)
Putting it Together with CASE Technology
38(11)
Summary
49(2)
3. SQL Primer
51(69)
SQL Versus Transact-SQL
51(1)
Data Definition Language
52(24)
Data Manipulation Language
76(43)
Summary
119(1)
4. Transact-SQL Fundamentals
120(27)
Server Character Sets
120(1)
Server Sort Orders
121(4)
Identifiers
125(2)
Foundation Units
127(9)
Executing Transact-SQL
136(7)
The GO Statement
143(1)
Transact-SQL Batches
144(2)
Summary
146(1)
5. Format and Style
147(28)
Why Bother?
147(2)
What Is a Good Coding Style?
149(4)
Case of Keywords and User-Defined Names
153(2)
Naming Conventions and Abbreviations
155(5)
Standard Error Handling
160(1)
Style Odds and Ends
161(3)
Formatting DML and DDL Statements
164(4)
Formatting Transaction Blocks and Procedural Blocks
168(3)
Commenting Your Code
171(2)
Summary
173(2)
II. The Building Blocks: Transact-SQL Language Elements 175(172)
6. Datatypes and Variables
177(32)
Datatypes
177(12)
User-Defined Datatypes
189(2)
Processing Nulls
191(1)
Variables
192(11)
Parameters
203(5)
Summary
208(1)
7. Conditional Processing
209(21)
BEGIN...END Constructs
210(1)
IF Constructs
211(7)
GOTO Branching and Error Handling
218(1)
WAITFOR Construct
219(3)
WHILE Loops
222(5)
RETURN Statement
227(2)
Summary
229(1)
8. Row Processing with Cursors
230(26)
Cursor Fundamentals
231(1)
Declaring a Cursor
232(2)
Opening a Cursor
234(1)
Asynchronous Keysets
235(2)
Fetching Data
237(4)
Closing and Deallocating a Cursor
241(1)
Working with Cursors
242(5)
Performance Issues for Cursors
247(7)
Summary
254(2)
9. Error Handling
256(18)
Code Processing and Error Handling: Basic Concepts
256(1)
Displaying an Error Message with PRINT
257(2)
Raising an Error with RAISERROR
259(9)
Finding Error Conditions with Global Variables
268(1)
Handling Errors with GOTO
269(1)
Creating Specialized Error Messages
270(1)
Finding Error Messages in Operating System Files
271(1)
Summary
272(2)
10. Temporary Objects
274(23)
Creating and Manipulating Temporary Objects
275(1)
The tempdb Database
276(1)
Classes of Temporary Objects
277(15)
Query Optimization with Temporary Tables
292(1)
Management of the tempdb Database
293(2)
Summary
295(2)
11. Transactions and Locking
297(50)
About Transactions
298(11)
Locking
309(24)
Transactions and the Database
333(13)
Summary
346(1)
III. Functions and Extensions 347(88)
12. Functions
349(65)
Aggregate Functions
353(6)
Mathematical Functions
359(7)
String Functions
366(15)
Date Functions
381(4)
Text and Image Functions
385(1)
Type Conversion Functions
386(10)
System Functions
396(16)
Summary
412(2)
13. CASE Expressions and Transact-SQL Extensions
414(21)
CASE Expressions
414(7)
COMPUTE
421(3)
CUBE and ROLLUP
424(10)
Summary
434(1)
IV. Programming Transact-SQL Objects 435(132)
14. Stored Procedures and Modular Design
437(52)
About Stored Procedures
438(1)
CREATE PROCEDURE
439(11)
Types of Stored Procedures
450(4)
Advantages of Stored Procedures
454(1)
Stored Procedures Versus Other Objects
454(2)
Executing Stored Procedures
456(3)
Remote Procedure Calls (RPCs)
459(6)
Stored Procedure Design
465(5)
Conditional Data Retrieval
470(2)
Data Formatting
472(4)
Data Security and Encryption
476(8)
Performance Issues
484(4)
Summary
488(1)
15. Triggers and Constraints
489(14)
Triggers
489(11)
Interaction of Triggers and Constraints
500(2)
Summary
502(1)
16. Views
503(24)
About Views
503(1)
Managing Views
504(5)
Querying Views
509(11)
View Dependencies, Permissions, and Data Manipulations
520(4)
Limitations of Views
524(1)
View Overhead
525(1)
Summary
526(1)
17. System and Extended Stored Procedures
527(40)
System Stored Procedures
527(1)
Common System Stored Procedures
528(30)
Extended Stored Procedures
558(8)
Summary
566(1)
V. Performance Tuning and Optimization 567(152)
18. Transact-SQL Code Design
569(17)
Coding for Reuse
569(2)
The Black Box Program
571(3)
Categorization Schemas
574(4)
RETURN
578(1)
RAISERROR
578(1)
Temporary Data Storage
578(4)
Using Parameters Effectively
582(1)
Help
583(2)
Summary
585(1)
19. Code Maintenance in SQL Server
586(18)
Using SQL Server System Tables
586(3)
Interdependence of Server-Side Objects
589(1)
Source Code Management
590(8)
Code Maintenance
598(4)
Related Topics
602(1)
Summary
603(1)
20. Transact-SQL Optimization and Tuning
604(68)
About Optimization
605(3)
Efficient Physical Database Design
608(4)
Indexing Strategies
612(7)
SQL Server Query Optimizer
619(6)
SHOWPLAN Output
625(7)
Optimizer Hints
632(6)
Query Analysis
638(14)
Optimization Tips and Techniques
652(18)
Summary
670(2)
21. Debugging Transact-SQL Programs
672(47)
Testing Versus Debugging
672(1)
Successful Debugging
673(7)
Specific Debugging Techniques
680(25)
The SET Command
705(11)
Debugging Utilities
716(1)
Summary
717(2)
VI. Appendixes 719(70)
A. System Tables
721(22)
B. What's New for Transact-SQL in Microsoft SQL Server 7.0
743(36)
C. The BCP Utility
779(10)
Index 789
Kevin Kline administrates well over 100 SQL Server installations across the country for Deloitte & Touche LLP. When he's not pulling out his hair, he likes to spend time with his wife and kids, play classical guitar, restore his '66 Chevy truck, and write screenplays. Kevin is also the author of Oracle CDE: Reference & User's Guide (Butterworth-Heinemann) and a coauthor of Professional SQL Server 6.5 Admin (WROX Press). Kevin is also an instructor at Ziff-Davis University (www.zdu.com). He can be reached at [email protected]. Lee Gould is a principal consultant with Sybase Professional Services in New York where she works mainly in the financial services industry on Wall Street. She has been working with SQL Server since 1992 and has been involved in the computer industry for over ten years. She has published numerous articles in Microsoft SQL Server Professional (Pinnacle Publishing) and presented on a variety of topics at the International Sybase User Group and Powersoft conferences. Lee was born in Liverpool, England. She grew up in Johannesburg, South Africa, where she attended the University of Witwatersrand and received her bachelors of commerce in business information systems. Lee immigrated to America four years ago and is currently pursuing an MBA at Seton Hall University in New Jersey. Lee lives in the suburb of North Brunswick, New Jersey, with her two cats, Lady and Paganini. She can often be seen running, cycling, swimming, and horseriding while she trains for marathons and ultra triathlon events. When not immersed in sport, Lee is an avid fan of classical music, good wine, the piano, science fiction and Terminator II. Her motto on life is "carpe diem," which she endeavors to follow regardless of where it leads her. Lee can be contacted at [email protected]. Andrew Zanevsky, an independent consultant and founder and president of AZ Databases, Inc., has been working with SQL Server since 1992. He writes a monthly column "Super Administrator," for Microsoft SQL Server Professional (Pinnacle Publishing) and has published more than a hundred technical articles throughout his career. He immigrated to the United States from Minsk, Belarus in 1991. He started programming in 1982 and holds a degree from the Belarus State University of Informatics and Radioelectronics (equivalent to an M.S. in computer science). Andrew lives in a suburb of Chicago with his wife Katrin, son Anthony, and stepdaughter Esther. Katrin is also a SQL Server consultant. They work on some projects together and can talk about Transact-SQL at dinner. Andrew's daughter Nikkie lives in New York, wants to be a writer, and has won numerous awards in art contests. Andrew was the president of the Great Lakes SQL Server Users Group in Chicago from 1994 through 1997. He can be reached at [email protected].