Joe Celko's Trees and Hierarchies in SQL for Smarties
暫譯: 喬·塞爾科的 SQL 樹與層級結構技巧
Joe Celko
- 出版商: Morgan Kaufmann
- 出版日期: 2004-05-21
- 售價: $1,980
- 貴賓價: 9.5 折 $1,881
- 語言: 英文
- 頁數: 240
- 裝訂: Paperback
- ISBN: 1558609202
- ISBN-13: 9781558609204
-
相關分類:
SQL
已過版
買這商品的人也買了...
-
$990Joe Celko's Data & Databases: Concepts in Practice
-
$980$784 -
$560$476 -
$750$593 -
$680$537 -
$480$379 -
$490$382 -
$620$490 -
$650$514 -
$450$383 -
$299$254 -
$2,220$2,109 -
$580$452 -
$620$490 -
$820$648 -
$490$417 -
$490$382 -
$590$460 -
$890$757 -
$780$663 -
$650$507 -
$680$537 -
$980$774 -
$720$569 -
$1,308Joe Celko's SQL for Smarties, 4/e : Advanced SQL Programming (Paperback)
商品描述
Description:
Joe Celko's Trees and Hierarchies in SQL is an intermediate to advanced-level practitioner’s guide to mastering the two most challenging aspects of developing database applications in SQL. In this book, Celko illustrates several major approaches to representing trees and hierarchies and related topics that should be of interest to the working database programmer. These topics include hierarchical encoding schemes, graphs, IMS, binary trees, and more. This book covers SQL-92 and SQL:1999.
Table of Contents:
1 Graphs, Trees and Hierarchies
1.1 Modeling a Graph in a Program
1.1.1 Adjacency Lists for Graphs
1.1.2 Adjacency Arrays for Graphs
1.1.3 Finding a path in a General Graphs in SQL
1.2 Defining Tree and Hierarchies
1.2.1 Trees
1.2.2 Properties of Hierarchies
1.2.3 Types of Hierarchies
1.3 Note on Recursion
2 Adjacency List Model
2.1 The Simple Adjacency List Model
2.2 The Simple Adjacency List Model is not normalized.
2.2.1 UPDATE Anomalies
2.2.2 INSERT Anomalies
2.2.3 DELETE Anomalies
2.2.4 Structural Anomalies
2.3 Fixing the Adjacency List Model
2.3.1 Concerning the Use of NULLs
2.4 Navigation in Adjacency List Model
2.4.1 Cursors and Procedural Code
2.4.2 Self-joins
2.5 Inserting Nodes in the Adjacency List Model
2.6 Deleting Nodes in the Adjacency List Model
2.6.1 Deleting an Entire Subtree
2.6.2 Promoting a Subordinate after Deletion
2.6.3 Promoting an Entire Subtree after Deletion
2.7 Leveled Adjacency List Model
2.7.1 Numbering the levels
2.7.2 Aggregation in the Hierarchy
3 Path Enumeration Models
3.1 Finding the Depth of the Tree
3.2 Searching for Subordinates
3.3 Searching for Superiors
3.4 Deleting a Subtree
3.5 Deleting a Single Node
3.6 Inserting a New Node
3.7 Splitting up a Path String
3.8 The Edge Enumeration Model
3.9 XPath and XML
4 Nested Set Model of Hierarchies
4.1 Finding Root and Leaf Nodes
4.2 Finding Subtrees
4.3 Finding Levels and Paths in a Tree
4.3.1 Finding the Height of a Tree
4.3.2 Finding Levels of Subordinates
4.3.3 Finding Oldest and Youngest Subordinates
4.3.4 Finding a Path
4.3.5 Finding Relative Position
4.4 Functions in the Nested Sets Model
4.5 Deleting Nodes and Subtrees
4.5.1 Deleting Subtrees
4.5.2 Deleting a Single Node
4.5.3 Pruning a Set of Nodes from a Tree
4.6. Closing Gaps in the Tree
4.7. Summary Functions on Trees
4.7.1 Iterative Parts Update
4.7.2 Recursive Parts Update
4.8 Inserting and Updating Trees
4.8.1 Moving a Subtree within a Tree
4.8.2 MoveSubtree Second Version
4.8.3 Subtree Duplication
4.8.4 Swapping Siblings
4.9 Converting Nested Sets Model to Adjacency List
4.10 Converting Adjacency List to Nested Sets Model
4.11 Separation of Edges and Nodes
4.11.1 Multiple Structures
4.11.2 Multiple Nodes
4.12 Comparing Nodes and Structure
5 Frequent Insertion Trees
5.1 The Datatype of (lft, rgt)
5.1.1 Exploiting the Full Range of Integers
5.1.2 FLOAT, REAL or DOUBLE PRECISION Numbers
5.1.3 NUMERIC(p,s) or DECIMAL(p,s) Numbers
5.2 Computing the Spread to Use
5.2.1 Varying the Spread
5.2.2 Divisor Parameter
5.2.3 Divisor via Formula
5.2.4 Divisor via Table Lookup
5.2.5 Partial Reorganization
5.2.6 Rightward Spread Growth
5.3 Total Reorganization
5.3.1 Reorganization with Lookup Table
5.3.2 Reorganization with Recursion
5.4 Rational Numbers and Nested Intervals model
5.4.1 Partial Order mappings
5.4.2 Summation of Coordinates
5.4.3 Finding Parent Encoding and Sibling Number
5.4.4 Calculating the Enumerated Path and Distance between Nodes
5.4.5 Building a Hierarchy
5.4.6 Depth-first Enumeration by Left Interval Boundary
5.4.7 Depth-first enumeration by Right Interval boundary
5.4.8 All Descendants of a Node
6 The Linear Version of the Nested Sets model
6.1 Insertion and Deletion
6.2 Finding Paths
6.3 Finding Levels
6.4 Summary
7 Binary Trees
7.1 Binary Tree Traversals
7.2 Binary Tree Queries
7.2.1 Find Parent of a Node
7.2.2 Find Subtree at a Node
7.3 Deletion from a Binary Tree
7.4 Insertion into a Binary Tree
7.5 Heaps
7.6 Binary Tree Representation of Multiway Trees
7.7 The Stern-Brocot Numbers
8 Other Models for Trees
8.1 Adjacency List with Self-References
8.2 Subordinate Adjacency List
8.3 Hybrid Models
8.3.1. Adjacency and Nested Set Model
8.3.2. Nested Set with Depth Model
8.3.3. Adjacency and Depth Model
8.3.4. Computed Hybrid Models
8.4 General Graphs
8.4.1 Detecting Paths in a Convergent Graph
8.4.2 Detecting Directed Cycles
9 Proprietary Extensions for Trees
9.1 Oracle Tree Extensions
9.2 XDB Tree Extension
9.3 DB2 and the WITH Operator
9.4 Date's EXPLODE Operator
9.5 Tillquist and Kuo's Proposals
9.6 Microsoft Extensions
9.7 Other Methods
10 Hierarchies in Data Modeling
10.1 Types of Hierarchies
10.2 DDL Constraints
10.2.1 Uniqueness Constraints
10.2.2 Disjoint Hierarchies
10.2.3 Representing 1:1, 1:m, and n:m Relationships
11 Hierarchical Encoding Schemes
11.1 ZIP codes
11.2 Dewey Decimal Classification
11.3 Strength and Weaknesses
11.4 Shop Categories
11.5 Statistical Tools for Decision Trees
12 Hierarchical Database Systems (IMS)
12.1 Types of Databases
12.2 Database History
12.2.1. DL/I
12.2.2 Control Blocks
12.2.3 Data Communications
12.2.4 Application Programs
12.2.5 Hierarchical Databases
12.2.6 Strengths and Weaknesses
12.3 Sample Hierarchical Database
12.3.1 Department Database
12.3.2 Student Database
12.3.3 Design Considerations
12.3.4 Example Database Expanded
12.3.5 Data Relationships
12.3.6 Hierarchical Sequence
12.3.7 Hierarchical Data Paths
12.3.8 Database Records
12.3.9 Segment Format
12.3.10 Segment Definitions
12.4 Summary
商品描述(中文翻譯)
**描述:**
Joe Celko 的《SQL 中的樹與層級》是一本針對中級到高級實務者的指南,旨在掌握在 SQL 中開發資料庫應用程式的兩個最具挑戰性的方面。在這本書中,Celko 說明了幾種主要的樹和層級表示方法,以及與之相關的主題,這些主題對於在職的資料庫程式設計師應該是有興趣的。這些主題包括層級編碼方案、圖形、IMS、二元樹等。本書涵蓋了 SQL-92 和 SQL:1999。
**目錄:**
1. 圖形、樹與層級
1.1 在程式中建模圖形
1.1.1 圖形的鄰接列表
1.1.2 圖形的鄰接陣列
1.1.3 在 SQL 中尋找一般圖形的路徑
1.2 定義樹和層級
1.2.1 樹
1.2.2 層級的特性
1.2.3 層級的類型
1.3 關於遞迴的說明
2. 鄰接列表模型
2.1 簡單的鄰接列表模型
2.2 簡單的鄰接列表模型不是正規化的。
2.2.1 更新異常
2.2.2 插入異常
2.2.3 刪除異常
2.2.4 結構異常
2.3 修正鄰接列表模型
2.3.1 關於使用 NULL 的考量
2.4 在鄰接列表模型中的導航
2.4.1 游標和程序碼
2.4.2 自我連接
2.5 在鄰接列表模型中插入節點
2.6 在鄰接列表模型中刪除節點
2.6.1 刪除整個子樹
2.6.2 刪除後提升下屬
2.6.3 刪除後提升整個子樹
2.7 分層的鄰接列表模型
2.7.1 標記層級
2.7.2 層級中的聚合
3. 路徑枚舉模型
3.1 尋找樹的深度
3.2 尋找下屬
3.3 尋找上級
3.4 刪除子樹
3.5 刪除單一節點
3.6 插入新節點
3.7 拆分路徑字串
3.8 邊緣枚舉模型
3.9 XPath 和 XML
4. 層級的嵌套集合模型
4.1 尋找根節點和葉節點
4.2 尋找子樹
4.3 尋找樹中的層級和路徑
4.3.1 尋找樹的高度
4.3.2 尋找下屬的層級
4.3.3 尋找最年長和最年輕的下屬
4.3.4 尋找路徑
4.3.5 尋找相對位置
4.4 嵌套集合模型中的函數
4.5 刪除節點和子樹
4.5.1 刪除子樹
4.5.2 刪除單一節點
4.5.3 從樹中修剪一組節點
4.6 關閉樹中的間隙
4.7 樹的摘要函數
4.7.1 迭代部分更新
4.7.2 遞迴部分更新
4.8 插入和更新樹
4.8.1 在樹中移動子樹
4.8.2 MoveSubtree 第二版
4.8.3 子樹複製
4.8.4 交換兄弟節點
4.9 將嵌套集合模型轉換為鄰接列表
4.10 將鄰接列表轉換為嵌套集合模型
4.11 邊緣和節點的分離
4.11.1 多重結構
4.11.2 多重節點
4.12 比較節點和結構
5. 頻繁插入樹
5.1 (lft, rgt) 的資料類型
5.1.1 利用整數的全範圍
5.1.2 FLOAT、REAL 或 DOUBLE PRECISION 數字
5.1.3 NUMERIC(p,s) 或 DECIMAL(p,s) 數字
5.2 計算要使用的擴展範圍
5.2.1 變化擴展範圍
5.2.2 除數參數
5.2.3 通過公式獲得除數
5.2.4 通過表查找獲得除數
5.2.5 部分重組
5.2.6 向右擴展增長
5.3 總重組
5.3.1 使用查找表的重組
5.3.2 使用遞迴的重組
5.4 有理數和嵌套區間模型
5.4.1 部分序映射
5.4.2 坐標的總和
5.4.3 尋找父編碼和兄弟數量
5.4.4 計算枚舉路徑和節點之間的距離
5.4.5 建立層級
5.4.6 通過左區間邊界的深度優先枚舉
5.4.7 通過右區間邊界的深度優先枚舉
5.4.8 節點的所有後代
6. 嵌套集合模型的線性版本
6.1 插入和刪除
6.2 尋找路徑
6.3 尋找層級
6.4 摘要
7. 二元樹
7.1 二元樹的遍歷
7.2 二元樹查詢
7.2.1 尋找節點的父節點
7.2.2 尋找節點的子樹
7.3 從二元樹中刪除
7.4 插入到二元樹中
7.5 堆
7.6 多路樹的二元樹表示
7.7 Stern-Brocot 數字
8. 樹的其他模型
8.1 帶自我參考的鄰接列表
8.2 下屬鄰接列表
8.3 混合模型
8.3.1 鄰接和嵌套集合模型
8.3.2 帶深度模型的嵌套集合
8.3.3 鄰接和深度模型
8.3.4 計算混合模型
8.4 一般圖形
8.4.1 在收斂圖中檢測路徑
8.4.2 檢測有向循環
9. 樹的專有擴展
9.1 Oracle 樹擴展
9.2 XDB 樹擴展
9.3 DB2 和 WITH 操作符
9.4 Date 的 EXPLODE 操作符
9.5 Tillquist 和 Kuo 的提案
9.6 微軟擴展
9.7 其他方法
10. 數據建模中的層級
10.1 層級的類型
10.2 DDL 約束
10.2.1 唯一性約束
10.2.2 不相交的層級
10.2.3 表示 1:1、1:m 和 n:m 關係
11. 層級編碼方案
11.1 郵遞區號
11.2 杜威十進制分類法
11.3 優勢與劣勢
11.4 商店類別
11.5 決策樹的統計工具
12. 層級資料庫系統 (IMS)
12.1 資料庫的類型
12.2 資料庫歷史
12.2.1 DL/I
12.2.2 控制區塊
12.2.3 數據通訊
12.2.4 應用程式
12.2.5 層級資料庫
12.2.6 優勢與劣勢
12.3 範例層級資料庫
12.3.1 部門資料庫
12.3.2 學生資料庫
12.3.3 設計考量
12.3.4 擴展的範例資料庫
12.3.5 數據關係
12.3.6 層級序列
12.3.7 層級數據路徑
12.3.8 資料庫記錄
12.3.9 段格式
12.3.10 段定義
12.4 摘要