SQL Query Design Patterns and Best Practices: A practical guide to writing readable and maintainable SQL queries using its design patterns (Paperback)

Hughes, Steve, Neer, Dennis, Singh, Ram Babu

  • 出版商: Packt Publishing
  • 出版日期: 2023-03-31
  • 售價: $1,490
  • 貴賓價: 9.5$1,416
  • 語言: 英文
  • 頁數: 270
  • 裝訂: Quality Paper - also called trade paper
  • ISBN: 1837633282
  • ISBN-13: 9781837633289
  • 相關分類: SQLDesign Pattern
  • 立即出貨 (庫存 < 3)

買這商品的人也買了...

商品描述

Enhance your SQL query writing skills to provide greater business value using advanced techniques such as common table expressions, window functions, and JSON

Key Features

• Examine query design and performance using query plans and indexes
• Solve business problems using advanced techniques such as common table expressions and window functions
• Use SQL in modern data platform solutions with JSON and Jupyter notebooks

Book Description

SQL has been the de facto standard when interacting with databases for decades and shows no signs of going away. Through the years, report developers or data wranglers have had to learn SQL on the fly to meet the business needs, so if you are someone who needs to write queries, SQL Query Design and Pattern Best Practices is for you.

This book will guide you through making efficient SQL queries by reducing set sizes for effective results. You’ll learn how to format your results to make them easier to consume at their destination. From there, the book will take you through solving complex business problems using more advanced techniques, such as common table expressions and window functions, and advance to uncovering issues resulting from security in the underlying dataset. Armed with this knowledge, you’ll have a foundation for building queries and be ready to shift focus to using tools, such as query plans and indexes, to optimize those queries. The book will go over the modern data estate, which includes data lakes and JSON data, and wrap up with a brief on how to use Jupyter notebooks in your SQL journey.

By the end of this SQL book, you’ll be able to make efficient SQL queries that will improve your report writing and the overall SQL experience.

What you will learn

• Build efficient queries by reducing the data being returned
• Manipulate your data and format it for easier consumption
• Form common table expressions and window functions to solve complex business issues
• Understand the impact of SQL security on your results
• Understand and use query plans and hints to optimize your queries
• Understand the impact of indexes on your query performance and design
• Work with data lake data and JSON in SQL queries
• Organize your queries using Jupyter notebooks

Who This Book Is For

This book is for SQL developers, data analysts, report writers, data scientists, and other data gatherers looking to expand their skills for complex querying as well as for building more efficient and performant queries.

For those new to SQL, this book can help you accelerate your learning and keep you from making common mistakes.

商品描述(中文翻譯)

提升您的SQL查詢寫作技巧,運用高級技巧如通用表達式、窗口函數和JSON,為業務提供更大價值。

主要特點:

- 通過查詢計劃和索引來檢查查詢設計和性能
- 使用通用表達式和窗口函數解決業務問題
- 在現代數據平台解決方案中使用SQL和JSON以及Jupyter筆記本

書籍描述:

SQL已成為與數據庫交互的事實標準已有數十年,並且沒有消失的跡象。多年來,報表開發人員或數據整理人員不得不即興學習SQL以滿足業務需求,因此如果您是需要編寫查詢的人,本書《SQL查詢設計和模式最佳實踐》適合您。

本書將指導您通過減少集合大小以獲得有效結果來進行高效的SQL查詢。您將學習如何格式化結果以便在目的地更容易消化。從那裡,本書將帶您解決複雜的業務問題,使用更高級的技術,如通用表達式和窗口函數,並進一步揭示底層數據集中的安全性問題。憑藉這些知識,您將擁有構建查詢的基礎,並準備轉向使用工具(如查詢計劃和索引)來優化這些查詢。本書將介紹現代數據庫,包括數據湖和JSON數據,並簡要介紹如何在SQL之旅中使用Jupyter筆記本。

通過閱讀本書,您將能夠進行高效的SQL查詢,從而改善報表編寫和整體SQL體驗。

您將學到什麼:

- 通過減少返回的數據量來構建高效的查詢
- 操作數據並將其格式化以便更容易消化
- 使用通用表達式和窗口函數解決複雜的業務問題
- 了解SQL安全性對結果的影響
- 了解並使用查詢計劃和提示來優化查詢
- 了解索引對查詢性能和設計的影響
- 在SQL查詢中處理數據湖數據和JSON
- 使用Jupyter筆記本組織您的查詢

本書適合SQL開發人員、數據分析師、報表編寫人員、數據科學家和其他數據收集者,他們希望擴展其複雜查詢的技能,以及構建更高效和性能更好的查詢。

對於初學SQL的人來說,本書可以幫助您加快學習速度,避免常見錯誤。

目錄大綱

1. Reducing Rows and Columns in Your Result Sets
2. Efficiently Aggregating Data in Your Results
3. Formatting Your Results for Easier Consumption
4. Manipulating Your Data Results Using Conditional SQL
5. Using Common Table Expressions
6. Analyze Your Data Using Window Functions
7. Reshaping Your Data with Advanced Techniques
8. Impact of SQL Security on Query Results
9. Understanding Query Plans
10. Understanding Query Hints
11. Understanding the Impact of Indexes on Your Query Design
12. Handling JSON Data in SQL Server
13. Integrating File Data and Data Lake Content with SQL
14. Organizing and Sharing Your Queries with Jupyter Notebooks
15. Appendix – Preparing Your Environment

目錄大綱(中文翻譯)

1. 減少結果集中的行和列
2. 高效地聚合結果中的數據
3. 格式化結果以便更容易閱讀
4. 使用條件SQL操作結果數據
5. 使用常用表達式
6. 使用窗口函數分析數據
7. 使用高級技巧重塑數據
8. SQL安全性對查詢結果的影響
9. 理解查詢計劃
10. 理解查詢提示
11. 理解索引對查詢設計的影響
12. 在SQL Server中處理JSON數據
13. 將文件數據和數據湖內容與SQL集成
14. 使用Jupyter Notebooks組織和分享查詢
15. 附錄 - 環境準備