Transact-SQL Cookbook

個数:

Transact-SQL Cookbook

  • 提携先の海外書籍取次会社に在庫がございます。通常3週間で発送いたします。
    重要ご説明事項
    1. 納期遅延や、ご入手不能となる場合が若干ございます。
    2. 複数冊ご注文の場合、分割発送となる場合がございます。
    3. 美品のご指定は承りかねます。
  • 【入荷遅延について】
    世界情勢の影響により、海外からお取り寄せとなる洋書・洋古書の入荷が、表示している標準的な納期よりも遅延する場合がございます。
    おそれいりますが、あらかじめご了承くださいますようお願い申し上げます。
  • ◆画像の表紙や帯等は実物とは異なる場合があります。
  • ◆ウェブストアでの洋書販売価格は、弊社店舗等での販売価格とは異なります。
    また、洋書販売価格は、ご注文確定時点での日本円価格となります。
    ご注文確定後に、同じ洋書の販売価格が変動しても、それは反映されません。
  • 製本 Paperback:紙装版/ペーパーバック版/ページ数 304 p.
  • 言語 ENG
  • 商品コード 9781565927568
  • DDC分類 005.7565

Full Description

This unique cookbook contains a wealth of solutions to problems that SQL programmers face all the time. The recipes inside range from how to perform simple tasks, like importing external data, to ways of handling issues that are more complicated, like set algebra. Authors Ales Spetic and Jonathan Gennick, two authorities with extensive database and SQL programming experience, include a discussion with each recipe to explain the logic and concepts underlying the solution. SQL (Structured Query Language) is the closest thing to a standard query language that currently exists, and Transact-SQL -- a full-featured programming language that dramatically extends the power of SQL -- is the procedural language of choice for both Microsoft SQL Server and Sybase SQL Server systems. The Transact-SQL Cookbook is designed so you can use the recipes directly, as a source of ideas, or as a way to learn a little more about SQL and what you can do with it. Topics covered include: *Audit logging.
In addition to recipes for implementing an audit log, this chapter also includes recipes for: improving performance where large log tables are involved; supporting multiple-languages; and simulating server push. *Hierarchies. Recipes show you how to manipulate hierarchical data using Transact-SQL. *Importing data. This chapter introduces concepts like normalization and recipes useful for working with imported data tables. *Sets. Recipes demonstrate different operations, such as how to find common elements, summarize the data in a set, and find the element in a set that represents an extreme. *Statistics. This chapter?s recipes show you how to effectively use SQL for common statistical operations from means and standard deviations to weighted moving averages. *Temporal data. Recipes demonstrate how to construct queries against time-based data. *Data Structures. This chapter shows how to manipulate data structures like stacks, queues, matrices, and arrays. With an abundance of recipes to help you get your job done more efficiently, the Transact-SQL Cookbook is sure to become an essential part of your library.

Contents

Preface 1. Pivot Tables Using a Pivot Table 2. Sets Introduction The Students Example Implementing Set Difference Comparing Two Sets for Equality Implementing Partial Intersection Implementing Full Intersection Classifying Subsets Summarizing Classes of Sets Aggregating Aggregates Summarizing Aggregated Classes Including Nonaggregated Columns Finding the Top N Values in a Set Reporting the Size of a Set's Complement Finding the Complement of a Set Finding the Complement of a Missing Set Finding Complements of Sets with Different niverses Comparing a Set with Its Universe Dynamic Classification System 3. Data Structures Types of Data Structures Working Example Finding Regions Reporting Region Boundaries Limiting Region Size Ranking Regions by Size Working with Sequences Working with Runs Cumulative Aggregates in Lists Implementing a Stack Implementing Queues Implementing Priority Queues Comparing Two Rows in an Array Printing Matrices and Arrays Transposing a Matrix Calculating a Matrix Trace Comparing Two Matrices for Size Adding and Subtracting Matrices Multiplying Matrices 4. Hierarchies in SQL Types of Hierachies Creating a Permission Hierarchy Changing Individual Permissions Adding New Individual Permissions Centralizing Authorization Logic Implementing General Hierarchies Traversing Hierarchies Recursively Manipulating Hierarchies Recursively Aggregating Hierarchies Preparing Multilevel Operations Aggregating Hierarchies Revised 5. Temporal Data Introduction The Schedules Example Enforcing Granularity Rules Storing Out-of-Range Temporal Values Deriving the First and Last Dates of the Month Printing Calendars Calculating Durations Reporting Durations Querying Periods Querying Periods and Respecting Granularity Finding Available Periods Finding Common Available Periods Excluding Recurrent Events Excluding Nonrecurring Events Finding Continuous Periods Using Calendar Information with Periods Using Calendar Information with Durations 6. Audit Logging Audit Logs The Warehouse Example Row-Level Logging Reporting Log Events Generating Current Snapshots Generating Time-Restricted Snapshots Undoing Table Changes Minimizing Audit-Log Space Consumption Online Account Balancing Activity-Level Logging Partitioning Large Log Tables Server Push 7. Importing and Transforming Data Considerations When Importing Data Working Examples Importing External Data Importing Data into a Live System Importing with a Single Procedure Hiding the Import Procedure Folding Tables Pivoting Tables Joining Arrays with Tables Joining Arrays with Master Tables Joining Arrays with Multiple Master Records Extracting Master Records from Tables Generating Master Records Online Working with Duplicates 8. Statistics in SQL Statistical Concepts The Light-Bulb Factory Example Calculating a Mean Calculating a Mode Calculating a Median Calculating Standard Deviation, Variance, and Standard Error Building Confidence Intervals Calculating Correlation Exploring Patterns with Autocorrelation Using a Simple Moving Average Extending Moving Averages Appendix: The T-Distribution Table Index