数据库史笔记

原文:What goes around comes around pdf

The following are quotes and notes taken from the cited paper above. If in a hurry, it suffices to skim all the "lessons learned". However, the content is entertaining and well worth a read.

IMS

Takeaways

Lesson 1: Physical and logical data independence are highly desirable
Lesson 2: Tree structured data models are very restrictive
Lesson 3: It is a challenge to provide sophisticated logical reorganizations of tree
structured data
Lesson 4: A record-at-a-time user interface forces the programmer to do manual query optimization, and this is often hard.

Notes

  • Hierarchical data model (tree)
  • Record type: collection of named fields with associated datatypes.
  • Instance of record type obeys definition.
  • Each record type has a key (some subset of named fields).
  • Each record type has unique parent record key.
  • Each record has a hierarchical sequence key (concatenate keys of ancestors and key of current record).
  • Data manipulation language.

IMS supported four different storage formats for hierarchical data. Basically root records can either be:

  • Stored sequentially
  • Indexed in a B-tree using the key of the record
  • Hashed using the key of the record

Dependent records are found from the root using either

  • Physical sequentially
  • Various forms of pointers.

The ability of a data base application to continue to run, regardless of what tuning is
performed at the physical level will be called physical data independence.

IMS supports a certain level of logical data independence, because DL/1 is actually defined on a logical data base, not on the actual physical data base that is stored.

CODASYL

Takeaways

Lesson 5: Networks are more flexible than hierarchies but more complex
Lesson 6: Loading and recovering networks is more complex than hierarchies

Notes

  • Network data model. Not tree. Graph.
  • Record-at-a-time data manipulation language. Enters database at entry point, navigates via sets.
  • No physical data independence or logical data independence.
  • Trades increased complexity for the possibility of easily representing non-hierarchical data. CODASYL offers poorer logical and physical data independence than IMS.

Relational

Takeaways

Lesson 7: Set-a-time languages are good, regardless of the data model, since they offer much improved physical data independence.
Lesson 8: Logical data independence is easier with a simple data model than with a
complex one.
Lesson 9: Technical debates are usually settled by the elephants of the marketplace, and often for reasons that have little to do with the technology.
Lesson 10: Query optimizers can beat all but the best record-at-a-time DBMS application programmers.

Notes

  • Relational algebra
  • SQL Won due to:
    a) the success of the VAX
    b) the non-portability of CODASYL engines
    c) the complexity of IMS logical data bases

Entity-Relationship Model

Takeaways

Lesson 11: Functional dependencies are too difficult for mere mortals to understand.

Notes

  • Databases are collections of instances of entities.
  • Entities have attributes.
  • Entities have relationships with each other.
  • Do database design by constructing an initial collection of tables and then normalizing them.

First, real DBAs immediately asked “How do I get an initial set of tables?” Normalization theory had no answer to this important question. Second, and perhaps more serious, normalization theory was based on the concept of functional dependencies, and real world DBAs could not understand this construct.

R++

Takeaways

Lesson 12: Unless there is a big performance or functionality advantage, new constructs will go nowhere

Notes

  • In the 1980's, database papers looked like this:
    • Consider an application, call it X
    • Try to implement X on a relational DBMS
    • Show why the queries are difficult or why poor performance is observed
    • Add a new “feature” to the relational model to correct the problem
  • Here are the significant features that came up:
    • set-valued attributes
    • aggregation (tuple-reference as a data type): pointers instead of foreign keys. weird.
    • generalization: i.e. inheritance hierarchies

Semantic Data Model

Notes

  • Focus on classes and inheritance.
  • They failed because "they were a lot of machinery that was easy to simulate on relational systems".
  • Also offered no performance improvement.

OO (Object Oriented)

Takeaways

Lesson 13: Packages will not sell to users unless they are in “major pain”
Lesson 14: Persistent languages will go nowhere without the support of the programming language community.

Notes

To address the engineering market, an implementation of persistent C++ had the
following requirements:

  1. no need for a declarative query language. All one needed was a way to reference
    large disk-based engineering objects in C++.
  2. no need for fancy transaction management. This market is largely one-user-at-a-time processing large engineering objects. Rather, some sort of versioning system
    would be nice.
  3. The run-time system had to be competitive with conventional C++ when operating on the object. In this market, the performance of an algorithm using persistent C++ had to be competitive with that available from a custom load program and conventional C++

In our opinion, there are a number of reasons for this market failure.

  1. absence of leverage. The OODB vendors presented the customer with the opportunity to avoid writing a load program and an unload program. This is not a major service, and customers were not willing to pay big money for this feature.
  2. No standards. All of the OODB vendor offerings were incompatible.
  3. Relink the world. In anything changed, for example a C++ method that operated on persistent data, then all programs which used this method had to be relinked. This was a noticeable management problem.
  4. No programming language Esperanto. If your enterprise had a single application not written in C++ that needed to access persistent data, then you could not use one of the OODB products

What is the idea of a persistent programming language?

  • "one where the variables in the language could represent disk-based data as well as main memory data and where data base search criteria were also language constructs"
  • it requires the compiler for the programming language to be extended with DBMS-oriented functionality
    What does this mean?

O2 supported an object-oriented data model, but it was not C++. Also, they embedded a high level declarative language called OQL into a programming language. Hence, they proposed what amounted to a semantic data model with a declarative query language, but marketed it as an OODB.

Object-Relational

Takeaways

Lesson 14: The major benefits of OR is two-fold: putting code in the data base (and
thereby blurring the distinction between code and data) and user-defined access methods.
Lesson 15: Widespread adoption of new technology requires either standards and/or an elephant pushing hard.

Notes

  • Motivated by storing geographic data. Searching for all points within a rectangle is a 2-dimensional search.
  • GIS queries are difficult to say in SQL and perform badly on B-Trees.
  • Basically the outcome of the whole OR era was better support for UDFs.
  • the OR proposal added user defined things to SQL: data types, operators, functions, access methods.

Semi Structured Data

Schema Last

  • This means having a self-describing schema.
  • semantic heterogeneity: information on a common object does not conform to a common representation; difficult for query processing as there is no structure on which to base indexing decisions.
  • designed for semi-structured data

XML Data Model

  1. XML records can be hierarchical, as in IMS
  2. XML records can have “links” (references to) other records, as in CODASYL, Gem and SDM
  3. XML records can have set-based attributes, as in SDM
  4. XML records can inherit from other records in several ways, as in SDM
  • union types: an attribute in a record can be of one of a set of possible types
  • set-at-a-time query language
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 205,132评论 6 478
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 87,802评论 2 381
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 151,566评论 0 338
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 54,858评论 1 277
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 63,867评论 5 368
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 48,695评论 1 282
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 38,064评论 3 399
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 36,705评论 0 258
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 42,915评论 1 300
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 35,677评论 2 323
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 37,796评论 1 333
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 33,432评论 4 322
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 39,041评论 3 307
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 29,992评论 0 19
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 31,223评论 1 260
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 45,185评论 2 352
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 42,535评论 2 343

推荐阅读更多精彩内容