With SQL Server 7's increased popularity, many developers are learning its Transact-SQL language for the first time. But even if you've worked with SQL Server before, you'll find plenty that's new. For instance, Transact-SQL now offers full support for Microsoft's powerful OLE DB interface and ADO model, simplifying development of multi-tier applications that require access to diverse relational and non-relational data.
William C. Amo's Transact-SQL is an excellent single source for learning all that Transact-SQL can do-from the absolute basics, all the way to advanced SQL Server features for the enterprise. What's really nice about this book: Amo writes with exceptional clarity. You won't find yourself rereading, scratching your head, and wondering where you misplaced those IQ points.
You'll start by reviewing the SQL Server Programming environment, including SQL Server Tools such as the Enterprise Manager, Query Analyzer, and Client Configuration Utility. Next, you'll review SQL Server's fundamental security mechanisms-critical information you must know before you start writing applications. You'll compare Windows NT Authentication mode and SQL Server Authentication mode and learn how to manage users, logins, roles and permissions.
Once you know your way around, Amo presents the basics of Transact-SQL commands and syntax, in the context of a sample investment database designed to store mutual fund account information for investors. (The database and all the book's sample scripts, queries, stored procedures and triggers are available on CD-ROM.) Along the way, you'll find detailed coverage of SET statements and batching.
Next, Amo introduces the basics of SQL Server Data Definition Language (DDL). You'll learn how to construct a database by defining data types, specifying physical and log files, creating tables, establishing constraints, using rule and default objects and creating indexes. Once you've created a database, of course, the next step is to manipulate it, so Amo introduces the Data Manipulation Language (DML)-INSERT, UPDATE, DELETE, basic SELECT statements, sorting results, creating tables with SELECT INTO and more.
Transact-SQL introduces the six categories of functions available to SQL Server 7 programmers; practical techniques for summarizing data into groups and displaying totals; and how to begin leveraging the true power of relational databases through joins, subqueries and unions. You'll learn how to enhance security and data integrity by implementing views-"virtual tables" that create a buffer between the base tables and your users. There's an excellent introduction to using cursors to improve database performance.
If you're a DBA, you'll find a full chapter covering T-SQL elements designed for you. Learn how to handle key database monitoring tasks through Database Consistency Check (DBCC) statements, including checking database page allocations, checking the integrity of database objects, rebuilding indexes and displaying memory usage. Review SQL Server jobs, jobsteps and schedules, as well as the SQL Server Agent tool that runs them. There's also coverage of backup and recovery via T-SQL.
Once you've got all this nailed down, Amo clearly explains the subtleties of stored procedures, extended stored procedures, and triggers-showing how they can speed execution, reduce network traffic and enhance system performance. Master SQL Server transactions-including Autocommit, implicit, and explicit modes and the Microsoft Distributed Traffic Coordinator (MS DTC). Use the SQL Server Profiler to monitor events and tune your database.
Amo sets aside a full section of the book for comprehensive, hands-on coverage of database access via each of Microsoft's APIs: DB-Library, Open Database Connectivity (ODBC), ActiveX Data Objects (ADO) and Open Data Services (ODS) programs. Finally, you'll walk through Microsoft's cool Data Transformation Wizards-a great new point-and-click tool for creating data marts and other data subsets.
Concise, practical and above all crystal clear, Transact-SQL is all you need to master SQL Server 7 programming.
Bill Carmada @ Cyberian Express