Traditional Data Models : Hierarchical, Network (since mid-
60’s), Relational (since 1970 and commercially since 1982) Object Oriented (OO) Data Models since mid-90’s Reasons for creation of Object Oriented Databases – Need for more complex applications – Need for additional data modeling features – Increased use of object-oriented programming languages Commercial OO Database products – several in the 1990’s, but did not make much impact on mainstream data management
Elmasri/Navathe, Fundamentals of Database Systems, Fourth Edition
structure of arbitrary complexity in order to contain all of the necessary information that describes the object. In contrast, in traditional database systems, information about a complex object is often scattered over many relations or records, leading to loss of direct correspondence between a real-world object and its database representation.
Elmasri/Navathe, Fundamentals of Database Systems, Fourth Edition
ODMG ODL is ndependent of any programming language ODL is used to create object specification (classes and interfaces) ODL is not used for database manipulation
Elmasri/Navathe, Fundamentals of Database Systems, Fourth Edition Chapter 21-18
type defined in the ODMG model A query does not have to follow the select…from…where… format A persistent name on its own can serve as a query whose result is a reference to the persistent object, e.g., departments; whose type is set<Departments>
Elmasri/Navathe, Fundamentals of Database Systems, Fourth Edition Chapter 21-24
attributes and objects in an entry point A path expression starts at a persistent object name (or its iterator variable) The name will be followed by zero or more dot connected relationship or attribute names, e.g., departments.chair;
Elmasri/Navathe, Fundamentals of Database Systems, Fourth Edition Chapter 21-25
specify an identifier for a named query The name should be unique; if not, the results will replace an existing named query Once a query definition is created, it will persist until deleted or redefined A view definition can include parameters
Elmasri/Navathe, Fundamentals of Database Systems, Fourth Edition Chapter 21-26
OQL’s element operator can be used to return a single element from a singleton collection that contains one element: element (select d from d in departments) where d.dname = ‘Software Engineering’);
If d is empty or has more than one elements,
an exception is raised
Elmasri/Navathe, Fundamentals of Database Systems, Fourth Edition Chapter 21-28
operators that can be applied to query results The aggregate operators include min, max, count, sum, and avg and operate over a collection count returns an integer; others return the same type as the collection type
Elmasri/Navathe, Fundamentals of Database Systems, Fourth Edition Chapter 21-29
quantification operators: – (e in c) is true if e is in the collection c – (for all e in c: b) is true if all e elements of collection c satisfy b – (exists e in c: b) is true if at least one e in collection c satisfies b
Elmasri/Navathe, Fundamentals of Database Systems, Fourth Edition Chapter 21-31
retrieving their first, last, and ith elements OQL provides additional operators for extracting a sub-collection and concatenating two lists OQL also provides operators for ordering the results
Elmasri/Navathe, Fundamentals of Database Systems, Fourth Edition Chapter 21-33
Download Complete (Ebook) IB Environmental Systems and Societies Skills and Practice by Jill Rutherford, Gillian Williams ISBN 9780198366690, 0198366698 PDF for All Chapters