Object Databases Baochuan Lu. outline Concepts for Object Databases Object Database Standards, Languages, and Design Object-Relational and Extended-Relational.

Slides:



Advertisements
Similar presentations
Chapter 10: Designing Databases
Advertisements

Object Oriented Database Group 4 Mathieu Metz Palani Kumaresan Napa Gavinlertvatana Kristine Pei Keow Lee Prabhu Ramachandran.
Jane Reid, BSc/IT DB, QMUL, 25/2/02 1 Object-oriented DBMS Background to ODBMS ODBMS requirements Object components ODB conceptual design –Graphical ODB.
Distributed DBMS©M. T. Özsu & P. Valduriez Ch.15/1 Outline Introduction Background Distributed Database Design Database Integration Semantic Data Control.
--The Object Database--1 The Object Database  Object databases integrate database technology with the object-oriented paradigm  In object databases,
ODMG Standard: Object Model1 OBJECT-ORIENTED DATABASE SYSTEMS ODMG Standard: Object Model Susan D. Urban and Suzanne W. Dietrich Department of Computer.
Object-Oriented Standards OMG OMDG. Overview Object Management Group (OMG) International non profit-making consortium founded in 1989 to address object.
Chapter 20 Concepts for Object-Oriented Databases Copyright © 2004 Pearson Education, Inc.
Programs with SQL Host language + Embedded SQL Preprocessor Host Language + function calls Host language compiler Host language program Preprocessor Host.
Fundamentals, Design, and Implementation, 9/e Chapter 16 Object-Oriented Database Processing.
Object Oriented Databases - Overview
July 13, 2015ADBS: OODB1 Concepts for Object-Oriented Databases Chapter 20.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 11 Object and Object- Relational Databases.
Object-Oriented Methods: Database Technology An introduction.
1 Announcements Research Paper due Monday November 22.
Databases Illuminated Chapter 7 The Object-Oriented Model.
RIZWAN REHMAN, CCS, DU. Advantages of ORDBMSs  The main advantages of extending the relational data model come from reuse and sharing.  Reuse comes.
Chapter 4 Object and Object-Relational Databases (Part ½: Object-Oriented Concepts) Lecturer: H.Ben Othmen Department of Computer Science, Umm Al-Qura.
1 Chapter 2 Database Environment. 2 Chapter 2 - Objectives u Purpose of three-level database architecture. u Contents of external, conceptual, and internal.
Object-Oriented Database Design using UML and ODMG
EER vs. UML Terminology EER Diagram Entity Type Entity Attribute
Object and object-relational databases 1. Object databases vs. Object-relational databases Object databases Stores complex objects – Data + functions.
Advanced Database CS-426 Week 2 – Logic Query Languages, Object Model.
Database System Concepts and Architecture Lecture # 3 22 June 2012 National University of Computer and Emerging Sciences.
Chapter 24 Introduction to Object DBMSs Prepared by Kai Huang CS157B Prof Sin-Min Lee.
Object Query Language (OQL) and Language Binding
Agenda  TMA03  M877 Block 3 Databases with Objects.
DBMS Lecture 9  Object Database Management Group –12 Rules for an OODBMS –Components of the ODMG standard  OODBMS Object Model Schema  OO Data Model.
By: Blake Peters.  OODB- Object Oriented Database  An OODB is a database management system in which information is represented in the form of objects.
Database System Concepts and Architecture Lecture # 2 21 June 2012 National University of Computer and Emerging Sciences.
Why Object-Oriented DBMS? Abstract data types (relational data model is too simple). Interface with host programming language Managing large number of.
Chapter 21 A Object Data Model - Intro Copyright © 2004 Pearson Education, Inc.
Chapter 20 Concepts for Object-Oriented Databases Copyright © 2004 Pearson Education, Inc.
Object-Oriented Database Management Systems (ODBMS)
1 CS 430 Database Theory Winter 2005 Lecture 17: Objects, XML, and DBMSs.
Database Management COP4540, SCS, FIU Database Modeling A Introduction to object definition language (ODL)
Chapter 18 Object Database Management Systems. McGraw-Hill/Irwin © 2004 The McGraw-Hill Companies, Inc. All rights reserved. Outline Motivation for object.
Chapter 21 C OQL Copyright © 2004 Pearson Education, Inc.
Chapter 21 Object Database Standards, Languages, and Design Copyright © 2004 Pearson Education, Inc.
© 2002 by Prentice Hall 1 David M. Kroenke Database Processing Eighth Edition Chapter 18 Object- Oriented Database Processing.
1 CS457 Object-Oriented Databases Chapters as reference.
CSE 6331 © Leonidas Fegaras OODB1 Object-Oriented Databases and the ODMG Standard.
OODBMS: Introduction and Logical Database Design
Chapter 2 Object-Relational DBMSs Chapter 28 in Textbook.
Object Relational Features
11-1 CHAPTER 11 Concepts for Object-Oriented Databases.
© D. Wong Security and User Authorization in SQL 8.7 pp. 410  Authorization ID = user name  Special authorization ID: PUBLIC  Privileges for:
Object-Relational Model. Review: Data Models Hierarchical Network ER (Pure) Relational (Pure) Object-oriented (ODMG) Object-relational (since SQL:1999)
AND OBJECT-ORIENTED DATABASES OBJECT-RELATIONAL DATABASES.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Chapter 7 Object-Oriented Database.
The ODMG Standard for Object Databases
Chapter 18 Object Database Management Systems. Outline Motivation for object database management Object-oriented principles Architectures for object database.
The Object-Oriented Database System Manifesto Malcolm Atkinson, François Bancilhon, David deWitt, Klaus Dittrich, David Maier, Stanley Zdonik DOOD'89,
Chapter 20 Concepts for Object-Oriented Databases Copyright © 2004 Pearson Education, Inc.
1 Advanced Databases – Lecture # 12: The ODMG Standard for Object Databases Advanced Databases The ODMG Standard for Object Databases.
Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe Chapter 12 Outline Overview of Object Database Concepts Object-Relational Features Object Database.
1 10 Systems Analysis and Design in a Changing World, 2 nd Edition, Satzinger, Jackson, & Burd Chapter 10 Designing Databases.
Faeez, Franz & Syamim.   Database – collection of persistent data  Database Management System (DBMS) – software system that supports creation, population,
OOPSLA Lab1 Chapter 7 Java Binding Prof. Hyoung-Joo Kim OOPSLA Lab. Dept. of Computer Engineering Seoul National University.
Object-Oriented Databases (chapter 2/3) Object Persistence - Introduction Persistent Programming Languages Specifying Object Persistence via Naming and.
Chapter 21 Object Database Standards, Languages, and Design Copyright © 2004 Pearson Education, Inc.
CSE202 Database Management Systems
Object-Oriented Database Management System (ODBMS)
Object – Oriented Databases
Chapter 12 Outline Overview of Object Database Concepts
ISC321 Database Systems I Chapter 10: Object and Object-Relational Databases: Concepts, Models, Languages, and Standards Spring 2015 Dr. Abdullah Almutairi.
Object Databases: Logical Data Modeling
Object-Oriented Databases
Object Database Standards, Languages, and Design
Presentation transcript:

Object Databases Baochuan Lu

outline Concepts for Object Databases Object Database Standards, Languages, and Design Object-Relational and Extended-Relational Systems

Introduction Traditional data models (relational, network, and hierarchical) is successful in traditional database applications. Shortcomings: engineering design, manufacturing, scientific experiments, telecommunications, geographic information systems and multimedia. New requirements: complex structure for objects, longer-duration transactions, new data-types for storing images or large textual items, and the need to define non standard application-specific operations.

Introduction Key feature of OODB: designer can specify both the structure of complex objects and the operations to them. ODMG: a consortium of object-oriented DBMS venders and users. Two component of an object: state(value) and behavior(operations). Transient objects: exist only during program execution

Introduction Persistent object: persist beyond program termination and can be retrieved later. Goal of OODB: maintain a direct correspondence between real-world and database objects so that objects do not lose their integrity and identity and can easily be identified and operated upon.

Object Identity Object Identity (OID): unique, system- generated, for each independent object, immutable (it’s common to use long integers)

Object Structure A feature of OODB: objects may have an object structure of arbitrary complexity. The state of a complex object may be constructed from other objects. Object triple representation: (i, c, v) i is a unique OID, c is a type constructor, v is the object state.

Type Constructors Basic constructors: atom, tuple, and set. Others: list, bag, and array. Represent object as a graph structure: apply the type constructors recursively. Identical states: Identical graph in every respect (OID at every level) Equal states(shallow equality): –Same graph structure –Same corresponding atomic values –Internal nodes may have different OIDs

Encapsulation of Operation, Methods Main idea: define the behavior of a type of object based on the operations that can be externally applied to objects of that type. Method: operation implementation(interface: operation signature) Complete encapsulation is stringent. Visible attributes: may be directly accessed for reading by external operators, or by high level query language. hidden attributes: completely encapsulated, can be accessed only through predefined operators.

Persistence Typical mechanism: naming and reachability Naming: give an object a unique persistent name (must be unique within a particular database) Reachability: works by making the object reachable from some persistent object.

Class Hierarchies and Inheritance Attributes and operations are together called functions (attributes resemble functions with zero arguments) Type: a type name and a listing of the names of its visible (public) functions: –PERSON: Name, Address, Birthdate, Age, SSN Defining a type: –defining all functions –Implementing them as attributes or as methods

extends Extends: collections of objects of the same type It’s common in database application that each type or subtype will have an extent associated with it, which holds the collection of all persistent object of that type or subtype. Persistent collection, transient collection

Complex Objects Two main types: structured and unstructured Structured: –made up of components –Defined by applying available type constructors recursively Unstructured: a data type requires a large amount of storage (image or large textual object) ODBMS can be viewed as having a extensible type system. DBMS internals provide the underlying storage and retrieval capabilities.

Other Concepts Polymorphism: same name bound to different implementations Mutiple inheritance Selective inheritance

Object Database Standards, Languages, and Design

Introduction Why a standard is needed? Portability: execute an application program on different systems with minimal modifications to the program. Interoperability ODMG 2.0 standard: object model, object definition language (ODL), object query language (OQL), and bindings to object-oriented programming languages.

Object Model of ODMG The data model upon which ODL and OQL are based. Provides: data type, type constructors SQL report describes a standard data model for relational database.

Object Model of ODMG Object and literal: –Literal has only a value but no object identifier –Object has four characteristics: identifier Name life time (persistent or not) Structure (how to construct)

Object Model of ODMG Atomic object: not a collection, includes structured objects created using the struct constructor Three types of literals: –Atomic –Collection –Structured

Object Model of ODMG Atomic literals: correspond to the values of basic data types, predefined Collection literals: specify a value that is a collection of objects or values but the collection itself does not have an OID. Structured literals: values that are constructed using the tuple constructor (Date, Interval, Time, Timestamp), user defined are created uing the struct keyword in ODL.

Object Model of ODMG Dictionary : a collection of associations, k is a key (a unique search value) associated with a value v. Factory object: an object that can be used to generate or create individual objects via its operations.

Object Definition Language (ODL) Designed to support the semantic constructs of the ODMG data model. Independent of any programming language. Create object specifications: classes and interfaces Specify a database schema: –In ODL –Use the specific language bindings to specify how ODL constructs can be mapped to constructs in specific programming language.

Object Query Language (OQL) Embedded into one of these programming languages Return objects that match the type system of that language Similar to SQL with additional features (object identity, complex objects, operations, inheritance, polymorphism, relationships)

Object Query Language (OQL) -Entry Points and Iterator Variables Entry point: named persistent object (for many queries, it is the name of the extent of a class). Iterator variable: when a collection is referenced in OQL query. –d in departments –departments d –departments as d

Object Query Language (OQL) -Entry Points and Iterator Variables Example SELECT d.dname FROM d in departments WHERE d.college = ‘Engineering’ ;

Object Query Language (OQL) -Query Results and Path Expressions Any persistent object is a query, result is a reference to that persistent object. Path expression: once an entry point is specified, it can be used to specifies a path to related attributes and objects. E.g. Q1: departments; Q2: csdepartment.chair; Q2a: csdepartment.chair.rank; Q2b: csdepartment.has_faculty;

Object Query Language (OQL) -Query Results and Path Expressions select f.rank from f in csdepartment.has_faculty; select distinct f.rank from f in csdepartment.has_faculty;

Object Query Language (OQL) OQL query can return a result with a complex structure specified in the query itself by utilizing the struct keyword. E.g. select struct (name:struct(last_name: s.name.lname, first_name: s.name.fname), degree:(select struct (deg:d.degree, yr: d.year, college:d.college) from d in s.degrees) from s in csdepartment.chair.advises;

Object Query Language (OQL) -Specifying Views as Named Queries define keyword: specify an identifier of the named query, unique among all named objects, class names, method names, or function names in the scheme. A query definition is persistent until it is redefined or deleted.

Object Query Language (OQL) -Specifying Views as Named Queries A view can have parameters. Example: define has_minors(deptname) as select s from s in students where s.minors_in.dname = deptname;

Object Query Language (OQL) -Extracting Single Elements from Singleton Collections element operator: guaranteed to return a single element from a singleton collection that contains only one element. Example: element (select d from d in departments where d.dname = ‘Computer Science’);

Object Query Language (OQL) -Collection Operators Aggregate operators: min, max, count, sum, and avg. Membership and qualification expressions: returns a boolean type. Example: count (s in has_minors(‘Computer Science’));

Object Query Language (OQL) -Ordered (Indexed) Collection Expressions first (select struct(faculty:f.name.lname, salary:f.salary) from f in faculty order by f.salary desc);

Object Query Language (OQL) -Grouping Operator group by clause: provides explicit reference to the collection of objects within each group or partition. select struct (deptname, number_of_majors: count (partition)) from s in students group by deptname: s.majors_in.dname A having can be used to filter the partitioned sets (that is select only some of the groups based on group conditions).

Object Database Conceptual Design ODB: relationships are handled by OID references to the related objects. RDB: relationships among tuples are specified by attributes with matching values (value references).

Object-Relational and Extended- Relational Systems ORDBMS: enhancing the capabilities of RDBMS with some of the features in ODBMS. Object-oriented features in SQL-99

Any Queries? Hint: use OQL.