Type Inheritance and Relational Theory: Subtypes, Supertypes, and Substitutability (型別繼承與關聯理論:子型別、父型別與可替代性)

C. J. Date

  • 出版商: O'Reilly
  • 出版日期: 2016-10-18
  • 定價: $1,520
  • 售價: 8.0$1,216
  • 語言: 英文
  • 頁數: 572
  • 裝訂: Paperback
  • ISBN: 1491959991
  • ISBN-13: 9781491959992
  • 相關分類: SQL
  • 立即出貨

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

相關主題

商品描述

Type inheritance is that phenomenon according to which we can say, for example, that every square is also a rectangle, and so properties that apply to rectangles in general apply to squares in particular. In other words, squares are a subtype of rectangles, and rectangles are a supertype of squares. Recognizing and acting upon such subtype / supertype relationships provides numerous benefits: Certainly it can help in data modeling, and it can also provide for code reuse in applications. For these reasons, many languages, including the standard database language SQL, have long supported such relationships. However, there doesn’t seem to be any consensus in the community at large on a formal, rigorous, and abstract model of inheritance. This book proposes such a model, one that enjoys several advantages over other approaches, not the least of which it is that it’s fully compatible with the well known relational model of data.

Topics the model covers include:

  • Both single and multiple inheritance
  • Scalar, tuple, and relation inheritance
  • Type lattices and union and intersection types
  • Polymorphism and substitutability
  • Compile time and run time binding

All of these topics are described in detail in the book, with numerous illustrative examples, exercises, and answers. The book also discusses several alternative approaches. In particular, it includes a detailed discussion and analysis of inheritance as supported in the SQL standard.

商品描述(中文翻譯)

類型繼承是一種現象,根據這種現象,我們可以說,例如,每個正方形也是一個矩形,因此適用於矩形的屬性也適用於正方形。換句話說,正方形是矩形的子類型,而矩形是正方形的超類型。認識並根據這種子類型/超類型關係提供了許多好處:它可以幫助數據建模,並且還可以在應用程序中實現代碼重用。出於這些原因,許多語言,包括標準數據庫語言SQL,長期以來一直支持這種關係。然而,在整個社區中似乎沒有就繼承的形式、嚴謹和抽象模型達成共識。本書提出了這樣一個模型,它相對於其他方法具有幾個優勢,其中最重要的是它與眾所周知的關聯模型完全兼容。

該模型涵蓋的主題包括:
- 單一和多重繼承
- 标量、元组和關聯繼承
- 類型格子和聯合和交集類型
- 多態性和可替換性
- 編譯時綁定和運行時綁定

本書詳細描述了所有這些主題,並提供了眾多的例子、練習和答案。本書還討論了幾種替代方法。特別是,它詳細討論並分析了SQL標準中支持的繼承。