第8章データ管理
OODBMSs and ODBsOODBMSとオブジェクトデータベース
OODBMSs appeared around 1985 and originated as extensions of OO programming languages. Object-oriented programmers store the developed products as objects and modify existing objects to make new objects within the OODBMS. OODBMSs store persistent objects in a transparent way, support persistence orthogonality, and guarantee the ACID properties. OODBMS has many limitations such as lack of a universal data model, lack of experience compared to RDBMS, lack of support, and complexity. The object data management group (ODMG) was created in 1991 and is based on object management group (OMG) standard; its main idea is to create a set of specifications to develop applications for an object database. There have been five revisions of ODMG and the last version is ODMG 3.0. Most mainstream database applications are built using an OO programming language in combination with an RDBMS rather than using an object-relational mapping (ORM).
英語のヒント
OODBMSは1985年ごろに登場し、オブジェクト指向プログラミング言語の拡張として始まった。オブジェクト指向のプログラマーは、開発した成果物をオブジェクトとして格納し、OODBMS内の既存のオブジェクトを変更して、新しいオブジェクトを作る。OODBMSは、利用者が格納を意識せずに済む形で永続オブジェクトを保存し、永続化の直交性を支え、ACID特性を保証する。OODBMSには、共通のデータモデルがないこと、RDBMSに比べた利用経験の不足、支援の不足、複雑さなど、多くの制約がある。オブジェクトデータ管理グループ(ODMG)は1991年に設立され、オブジェクト管理グループ(OMG)の標準を基礎としている。主な考えは、オブジェクトデータベース用のアプリケーションを開発するための、一連の仕様を作ることである。ODMGは5回改訂され、最後の版はODMG 3.0である。主流のデータベースアプリケーションの多くは、オブジェクト関係マッピング(ORM)を使うのではなく、オブジェクト指向プログラミング言語とRDBMSを組み合わせて作られる。
INDUSTRY SPOTLIGHT産業の現場から
MongoDBMongoDB
MongoDB is the most popular NoSQL database; it has delivered substantial values for some businesses that have been struggling to handle their unstructured data with the traditional RDBMS approach. After MetLife spent years trying to build a centralized customer database on a RDBMS that could handle all its insurance products, someone at an internal hackathon built one with MongoDB within hours, which went to production in 90 days.
英語のヒント
MongoDBは最も人気のあるNoSQLデータベースであり、従来のRDBMSの方法では非構造化データを扱うのに苦労していた一部の企業に、大きな価値をもたらしてきた。MetLifeは、すべての保険商品を扱える集中型の顧客データベースをRDBMS上に作ろうとして、何年も費やしていた。その後、社内ハッカソンで、ある人がMongoDBを使って数時間で構築し、それは90日で本番稼働に入った。
Extended Relational Databases拡張関係データベース
Extended relational databases (ERDBMSs) combine characteristics of RDBMS and OODBMS. The products of ERDBMSs provide a relational data model and query language that have been extended to include features of OODBMSs.
英語のヒント
拡張関係データベース(ERDBMS)は、RDBMSとOODBMSの特徴を組み合わせる。ERDBMS製品は、OODBMSの機能を取り込むように拡張した、関係データモデルと問い合わせ言語を提供する。
Limitations of the Relational Model関係モデルの制約
The relational model has a flat structure, and expensive joins are needed to defragment the data before it can be successfully used, which increases the complexity of the objects due to normalization. Specialization, categorization, and aggregation cannot be directly supported. A tuple constructor can only be used on atomic values while a set constructor can only be used on tuples; however, both constructors are not orthogonal, cannot model behavior or store functions, and both provide poor support for multimedia.
英語のヒント
関係モデルは平面的な構造を持ち、データをうまく利用するには、まず処理費用の大きい結合で断片化されたデータをまとめる必要がある。このため、正規化によってオブジェクトの複雑さが増す。特殊化、カテゴリー化、集約を直接支援することはできない。タプル構成子は原子値だけに使え、集合構成子はタプルだけに使える。ただし、この二つの構成子は直交しておらず、振る舞いをモデル化したり関数を格納したりできない。また、どちらもマルチメディアの支援が弱い。
Active RDBMS Extensions能動的なRDBMS拡張
A trigger is a statement consisting of declarative and/or procedural instructions and is stored in the catalog of the RDBMS. Triggers can also reference attribute types in other tables. Triggers are automatically executed when a triggering event occurs such as any change in the database. Triggers are similar to procedures stored in the database but differ in that they need to be explicitly invoked. Triggers are easy to code, are useful in the validation process, allow calling other procedures from the trigger, and allow recursion.
英語のヒント
トリガーは、宣言的な命令や手続き的な命令からなる文であり、RDBMSのカタログに格納される。ほかの表の属性型を参照することもできる。データベースの変更など、きっかけとなる事象が起こると、トリガーは自動的に実行される。トリガーは、データベースに格納された手続きと似ているが、後者は明示的に呼び出す必要があるという違いがある。トリガーは記述しやすく、妥当性確認に役立ち、トリガーからほかの手続きを呼び出せて、再帰も利用できる。
Object-Relational RDBMS Extensionsオブジェクト関係型のRDBMS拡張
Object-relational DBMSs (ORDBMSs) keep the relation as the fundamental building block and SQL as the core DDL/DML, but they use the following OO extensions: user-defined types (UDTs), user-defined functions (UDFs), inheritance, behavior, polymorphism, collection types, large objects (LOBs), and recursive SQL queries.
英語のヒント
オブジェクト関係DBMS(ORDBMS)は、関係を基本構成単位とし、SQLを中核のDDL/DMLとしたまま、次のオブジェクト指向の拡張を使う。利用者定義型(UDT)、利用者定義関数(UDF)、継承、振る舞い、多相性、コレクション型、ラージオブジェクト(LOB)、再帰的なSQL問い合わせである。
TECHNOLOGY IN EVERYDAY LIFE日常生活の中の技術
Nonrelational Database Management System非関係データベース管理システム
You are told that a new type of data structure has been unveiled and that it characterizes new forms of data being collected from sensors located at the edge of the network.
英語のヒント
新しい種類のデータ構造が発表され、ネットワークの末端にあるセンサーから集められる、新しい形のデータを特徴付けるものだと聞いたとしよう。
Would you conclude that a new kind of nonrelational database management system needs to be developed? What would be your approach for selecting the best possible type of nonrelational database management system for this application?
英語のヒント
新しい種類の非関係データベース管理システムを開発する必要があると結論するだろうか。この用途に最も適した非関係データベース管理システムの種類を選ぶには、どのような方法を取るだろうか。
XML DatabasesXMLデータベース
Extensible Markup Language (XML) is a markup language similar to HTML, but users define their tags; predefined tags such as HTML are not used. The oldest schema language for XML is the document type definition (DTD). An XML Schema is the metadata that describes the structure of an XML document. Extensible Stylesheet Language (XSL) defines the features and syntax of XML and consists of a language for transforming XML documents (XSLT) and an XML vocabulary for specifying formatting (XSL-FO). An XML namespace is a collection of names that can be used as element names in an XML document. XML Path Language (XPath) uses path expressions to select nodes in an XML document. An XML database is a data persistence system whereby the data are specified and stored in XML format. It is easy to code but has no universally accepted rules for the XML database.
英語のヒント
拡張可能マークアップ言語(XML)はHTMLに似たマークアップ言語だが、利用者が自分でタグを定義する。HTMLのような、あらかじめ定義されたタグは使わない。XMLの最も古いスキーマ言語は、文書型定義(DTD)である。XML Schemaは、XML文書の構造を記述するメタデータである。拡張可能スタイルシート言語(XSL)は、XMLの特徴と構文を定める。XML文書を変換する言語(XSLT)と、書式を指定するXML語彙(XSL-FO)からなる。XML名前空間は、XML文書内で要素名として使える名前の集合である。XML Path Language(XPath)は、パス式を使ってXML文書内のノードを選ぶ。XMLデータベースは、データをXML形式で指定し格納する、データ永続化システムである。記述は容易だが、XMLデータベースについて広く受け入れられた共通規則は存在しない。