MariaDB and MySQL Common Table Expressions and Window Functions Revealed

Daniel Bartholomew

  • 出版商: Apress
  • 出版日期: 2017-11-03
  • 售價: $1,170
  • 貴賓價: 9.5$1,112
  • 語言: 英文
  • 頁數: 106
  • 裝訂: Paperback
  • ISBN: 1484231198
  • ISBN-13: 9781484231197
  • 相關分類: MySQLSQL
  • 海外代購書籍(需單獨結帳)

商品描述

Walk away from old-fashioned and cumbersome query approaches and answer your business intelligence questions through simple and powerful queries built on common table expressions (CTEs) and window functions. These new features in MariaDB and MySQL help you to write queries without having to wade through a quagmire of brittle self-joins and other crazy techniques from the past. Your queries will generate correct results, be more readable and less brittle in the face of unexpected data, and you’ll be able to adapt them quickly in the face of changing business requirements.

MariaDB and MySQL Common Table Expressions and Window Functions Revealed introduces and explains CTEs and window functions, newly available in MariaDB 10.2 and MySQL 8.0, and helps you understand why and how every MariaDB and MySQL database programmer should learn and apply these features in their daily work. CTEs and especially window functions enable easy solutions to many query challenges that in prior releases have been difficult and sometimes impossible to surmount. Mastering these features opens the door to query solutions that are more robust, execute faster, and are easier to maintain over time than prior solutions using older techniques. The book:
  • Takes you step-by-step through the workings of common table expressions and window functions
  • Provides easy-to-follow examples of the new syntax
  • Helps you answer business questions faster and easier than ever
What You'll Learn
  • Answer business questions using simple queries that don’t break in the face of unexpected data
  • Avoid writing queries that are a difficult-to-maintain quagmire of self-joins and nested subqueries
  • Recognize situations that call for window functions, and learn when to use these features
  • Reduce the need for performance-robbing self-joins
  • Simplify and speed the execution of analytical queries
  • Create queries that finish in seconds instead of hours
Who This Book Is For

Database administrators and application developers who want to quickly get up to speed on important features in MariaDB and MySQL for writing business intelligence queries. Any developer writing SQL against MariaDB and MySQL databases will benefit tremendously from the knowledge and techniques this book provides. 

商品描述(中文翻譯)

擺脫過時且繁瑣的查詢方法,透過基於公共表達式(CTEs)和視窗函數的簡單而強大的查詢來回答您的商業智慧問題。MariaDB 和 MySQL 中的這些新功能幫助您撰寫查詢,而無需在脆弱的自我連接和其他過去的複雜技術中掙扎。您的查詢將產生正確的結果,並在面對意外數據時更具可讀性和穩定性,您也能夠在業務需求變化時迅速調整它們。

《MariaDB 和 MySQL 公共表達式與視窗函數揭密》介紹並解釋了在 MariaDB 10.2 和 MySQL 8.0 中新推出的 CTEs 和視窗函數,並幫助您理解為什麼以及如何每位 MariaDB 和 MySQL 數據庫程序員都應該在日常工作中學習和應用這些功能。CTEs,尤其是視窗函數,能夠輕鬆解決許多在先前版本中難以甚至無法克服的查詢挑戰。掌握這些功能將為您打開更穩健、執行更快且隨時間更易於維護的查詢解決方案的大門,這些解決方案比使用舊技術的先前解決方案更具優勢。這本書:

- 逐步帶您了解公共表達式和視窗函數的運作
- 提供易於理解的新語法範例
- 幫助您比以往更快、更輕鬆地回答商業問題

您將學到的內容:

- 使用簡單的查詢回答商業問題,這些查詢在面對意外數據時不會崩潰
- 避免撰寫難以維護的自我連接和嵌套子查詢的查詢
- 辨識需要使用視窗函數的情況,並學習何時使用這些功能
- 減少性能損耗的自我連接需求
- 簡化並加速分析查詢的執行
- 創建在幾秒鐘內完成而非幾小時的查詢

本書適合對象:

數據庫管理員和應用開發人員,想要快速掌握 MariaDB 和 MySQL 中撰寫商業智慧查詢的重要功能。任何對 MariaDB 和 MySQL 數據庫撰寫 SQL 的開發人員都將從本書提供的知識和技術中獲益良多。