McGraw-Hill/Irwin Copyright © 2007 by The McGraw-Hill Companies, Inc. All rights reserved. Chapter 18 Object Database Management Systems.

Slides:



Advertisements
Similar presentations
Chapter 10: Designing Databases
Advertisements

Database System Concepts and Architecture
Lecture-7/ T. Nouf Almujally
Management Information Systems, Sixth Edition
 2006 Pearson Education, Inc. All rights reserved Introduction to Classes and Objects.
Databases Chapter Distinguish between the physical and logical view of data Describe how data is organized: characters, fields, records, tables,
McGraw-Hill/Irwin Copyright © 2007 by The McGraw-Hill Companies, Inc. All rights reserved. Chapter 1 Introduction to Database Management.
Object-Oriented Databases
Chapter 11 Data Management Layer Design
Chapter 4: Database Management. Databases Before the Use of Computers Data kept in books, ledgers, card files, folders, and file cabinets Long response.
 2006 Pearson Education, Inc. All rights reserved Introduction to Classes and Objects.
Fundamentals, Design, and Implementation, 9/e Chapter 16 Object-Oriented Database Processing.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 2 Overview of Database Languages and Architectures.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 11 Object and Object- Relational Databases.
C++ fundamentals.
RIZWAN REHMAN, CCS, DU. Advantages of ORDBMSs  The main advantages of extending the relational data model come from reuse and sharing.  Reuse comes.
Advanced Database CS-426 Week 13 – Object Relational Databases.
Chapter 1 Introduction to Database Management. McGraw-Hill/Irwin © 2004 The McGraw-Hill Companies, Inc. All rights reserved. Welcome! Database technology:
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.
Chapter 5 Lecture 2. Principles of Information Systems2 Objectives Understand Data definition language (DDL) and data dictionary Learn about popular DBMSs.
DBMS Lecture 9  Object Database Management Group –12 Rules for an OODBMS –Components of the ODMG standard  OODBMS Object Model Schema  OO Data Model.
ASP.NET Programming with C# and SQL Server First Edition
Database System Concepts and Architecture Lecture # 2 21 June 2012 National University of Computer and Emerging Sciences.
CHAPTER ONE Problem Solving and the Object- Oriented Paradigm.
Introduction to Database Management. 1-2 Outline  Database characteristics  DBMS features  Architectures  Organizational roles.
ABC Insurance Co. Paul Barry Steve Randolph Jing Zhou CSC8490 Database Systems & File Management Dr. Goelman Villanova University August 2, 2004.
1 CS 430 Database Theory Winter 2005 Lecture 17: Objects, XML, and DBMSs.
Discovering Computers Fundamentals Fifth Edition Chapter 9 Database Management.
Copyright 2003 Scott/Jones Publishing Standard Version of Starting Out with C++, 4th Edition Chapter 13 Introduction to Classes.
Chapter 12: Designing Databases
Chapter 18 Object Database Management Systems. McGraw-Hill/Irwin © 2004 The McGraw-Hill Companies, Inc. All rights reserved. Outline Motivation for object.
Lecture2: Database Environment Prepared by L. Nouf Almujally 1 Ref. Chapter2 Lecture2.
© 2002 by Prentice Hall 1 David M. Kroenke Database Processing Eighth Edition Chapter 18 Object- Oriented Database Processing.
Lecture # 3 & 4 Chapter # 2 Database System Concepts and Architecture Muhammad Emran Database Systems 1.
5 - 1 Copyright © 2006, The McGraw-Hill Companies, Inc. All rights reserved.
1 CS 430 Database Theory Winter 2005 Lecture 2: General Concepts.
BIS Database Systems School of Management, Business Information Systems, Assumption University A.Thanop Somprasong Chapter # 8 Advanced SQL.
Database Systems Design, Implementation, and Management Coronel | Morris 11e ©2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or.
C++ Programming Basic Learning Prepared By The Smartpath Information systems
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 2 Database System Concepts and Architecture.
Introduction to c++ programming - object oriented programming concepts - Structured Vs OOP. Classes and objects - class definition - Objects - class scope.
Learners Support Publications Object Oriented Programming.
Object Oriented Database By Ashish Kaul References from Professor Lee’s presentations and the Web.
Chapter 2 Object-Relational DBMSs Chapter 28 in Textbook.
Programming with Java © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 1 McGraw-Hill/Irwin Chapter 5 Creating Classes.
Object-Oriented Programming Chapter Chapter
Testing OO software. State Based Testing State machine: implementation-independent specification (model) of the dynamic behaviour of the system State:
ISBN Object-Oriented Programming Chapter Chapter
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,
Next Back MAP MAP F-1 Management Information Systems for the Information Age Second Canadian Edition Copyright 2004 The McGraw-Hill Companies, Inc. All.
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.
 Description of Inheritance  Base Class Object  Subclass, Subtype, and Substitutability  Forms of Inheritance  Modifiers and Inheritance  The Benefits.
OODBMS and ORDBMS. Background Object-oriented software, based on the principles of user-defined datatypes, along with inheritance and polymorphism, is.
Data Resource Management Lecture 8. Traditional File Processing Data are organized, stored, and processed in independent files of data records In traditional.
ISC321 Database Systems I Chapter 2: Overview of Database Languages and Architectures Fall 2015 Dr. Abdullah Almutairi.
Introduction to Database Programming with Python Gary Stewart
Data Resource Management Data Concepts Database Management Types of Databases Chapter 5 McGraw-Hill/Irwin Copyright © 2007 by The McGraw-Hill Companies,
Roberta Roth, Alan Dennis, and Barbara Haley Wixom
The Object-Oriented Database System Manifesto
Object-Oriented Database Management System (ODBMS)
Object-Relational DBMSs
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 2 Database System Concepts and Architecture.
Data Model.
Introduction of Week 11 Return assignment 9-1 Collect assignment 10-1
Chapter 8 Advanced SQL.
Presentation transcript:

McGraw-Hill/Irwin Copyright © 2007 by The McGraw-Hill Companies, Inc. All rights reserved. Chapter 18 Object Database Management Systems

18-2 Outline  Motivation for object database management  Object-oriented principles  Architectures for object database management  Object database definition and manipulation in SQL:2003  Object database definition and manipulation in Oracle 10g

18-3 Motivation: Complex Data  Most relational DBMSs support only a few data types.  Many business applications require large amounts of complex data such as images, audio, and video.  Integration of complex data with simple data drives the demand for object database technology

18-4 Motivation: Type System Mismatch  Increasing use of database access in procedural code  Different data types used in programming languages versus DBMSs  Data type mismatch makes software more difficult to develop.  A relational DBMS cannot perform elementary operations on complex data.

18-5 Application Examples  Dental Office Support  Real Estate Listing Service  Auto Insurance Claims

18-6 Object-Oriented Principles  An object is a combination of data and procedures.  A class is a prototype that defines the variables and methods common to all objects of the class.  Three underlying principles: encapsulation, inheritance and polymorphism.

18-7 Encapsulation  Objects can be accessed only through their interfaces.  Classes can be reused rather than just individual procedures.  More complex classes can be defined using simpler classes.  Provides a form of data independence.

18-8 Bond Class Example CLASS Bond { // VARIABLES: ATTRIBUTE Float IntRate; ATTRIBUTE Date Maturity; // METHODS: Float Yield(); // Computes the Bond’s Yield };

18-9 Inheritance  Sharing of data and code among similar classes (classes and subclasses).  Inherit variables and methods from parent classes  Use methods and variables of ancestor classes  Provides an improved organization of software and incremental reusability.

18-10 Inheritance Examples

18-11 Multiple Inheritance Example

18-12 Polymorphism  Ability to choose among multiple implementations  Benefits  Incremental modification of code  Smaller vocabulary of method names  Requesting a method execution involves sending a message to an object  Client-server processing and object- oriented computing are closely related.

18-13 Processing a Message

18-14 Binding  Associating an implementation with a message  Static binding  Performed at compile-time  More efficient but less flexible  Dynamic binding  Performed at run-time (late binding)  More flexible but less efficient

18-15 Strong Type Checking  Complex expressions can involve many methods and objects  Incompatibility errors common in code  Ability to ensure that programming code contains no incompatibility errors  An important kind of error checking for object-oriented coding

18-16 Programming Languages versus DBMSs  Programming languages have used object-oriented principles for many years.  Programming languages emphasize software maintenance and code reusability.  Object DBMSs are more recent.  Relax encapsulation to reference an object’s data in a query.  Simpler inheritance mechanisms in DBMSs

18-17 Object Database Architectures  Adding object-oriented features to a DBMS is a good idea  Many approaches about the features to add and how features should be added.  Some approaches provide small extensions that leave object features outside the DBMS.  Other approaches involve a complete rewrite of the DBMS to accommodate objects  Marketplace will determine best approaches

18-18 Large Objects and External Software  Large object storage along with external software to manipulate large objects  BLOB and CLOB data types  The large object approach is simple to implement and universal.  The large object approach suffers from serious performance drawbacks.

18-19 Large Object Architecture

18-20 Specialized Media Servers  Dedicated server manages complex data  Application programming interface (API) to access complex data.  Good performance for specific kinds of complex data  Limited range of operations supported  Poor performance when combining simple and complex data

18-21 Specialized Media Server Architecture

18-22 Object database middleware  Middleware to manage complex data stored outside of a database along with traditional data stored in a database  Integrate complex data stored on PCs and remote servers with relational databases  Possible performance problems because of a lack of integration with a DBMS.

18-23 Object Middleware Approach

18-24 Object-Relational DBMS  A relational DBMS extended with an object query processor for user-defined data types  User-defined types for complex data  User-defined functions in SQL statements  SQL:2003 standard  Good integration of complex data with reliability of relational DBMS

18-25 Component Architecture for Object Relational DBMSs

18-26 Typical User-Defined Types  Audio  Video  Text  Image  Spatial  Time series  XML

18-27 Other Object Features  Subtable families  Reference and row data types  Nested tables

18-28 Object-Oriented DBMS  A new kind of DBMS designed especially for objects.  Object-oriented DBMSs have an object query processor and an object kernel.  The Object Data Management Group (ODMG) provides the standard for object- oriented DBMSs.

18-29 Component Architecture for Object-Oriented DBMSs

18-30 Summary of Architectures  Market niche for each architecture  Simpler architectures less popular over time  Object database middleware coexist with other approaches  Object-relational approach dominates object-oriented approach

18-31 SQL:2003 Object Features  Very large standard  Core language part  Parts and packages for non core features  Details about basic and enhanced object support  Two levels of conformance

18-32 SQL:2003 Parts  Core parts (1,2,11): framework, foundation, schemas  Non core parts  Call level interface  Persistent stored modules  Management of external data  Object level bindings  XML specifications

18-33 SQL:2003 Packages  Enhanced data-time facilities  Enhanced integrity management  Basic object support  Enhanced object support  Active databases  OLAP facilities

18-34 User-Defined Types  Bundles data and procedures  Support definition of structured types, not just extensions of standard types  Use as data types for columns in tables, passed as parameters, and returned as values  User-defined functions can be used in expressions in the SELECT, the WHERE, and the HAVING clauses.

18-35 User-Defined Type Example

18-36 Explicit Methods  Return single values and use input parameters  Implicit first parameter: part of user- defined type  CREATE METHOD statement for method body  Mutation methods: change values  Procedures and functions not associated with types

18-37 Implicit Methods  Automatically exist for all user-defined types  Constructor method: creates an empty instance  Observer methods: retrieve values  Mutation methods: change values

18-38 User-Defined Type Using an Array Example 2: Triangle type using an ARRAY CREATE TYPE Triangle AS ( Corners Point ARRAY[3], Color INTEGER ) METHOD Area() RETURNS FLOAT, -- Computes the area METHOD Scale (Factor FLOAT) RETURNS Triangle -- Computes a new triangle scaled by factor NOT FINAL;

18-39 User-Defined Type Using a Multiset Example 3: Polygon type using an ARRAY CREATE TYPE Triangle AS ( Corners Point MULTISET, Color INTEGER ) METHOD Area() RETURNS FLOAT, -- Computes the area METHOD Scale (Factor FLOAT) RETURNS Polygon -- Computes a new polygon scaled by factor NOT FINAL;

18-40 Table Definitions  Traditional style: foreign keys to link tables  Typed tables: supports object identifiers and object references  Row type constructor: supports rows as variables and parameters

18-41 Row Type Usage

18-42 User-Defined Type Usage

18-43 Subtable Families  A table can be declared as a subtable of another table.  A subtable inherits the columns of its parent tables.  SQL:2003 limits inheritance for tables to single inheritance.  Set inclusion determines the relationship of a table to its subtables.

18-44 Subtable Example

18-45 Subtable Side Effects  Subtable insert: corresponding row is inserted into each ancestor table.  Parent update: column updated in all direct and indirect subtables  Inherited column update: column is changed in each ancestor table  Deletion: every corresponding row in both parent and subtables is also deleted.

18-46 Manipulating Complex Objects and Subtable Families  Path expressions to manipulate columns with row references.  References to methods in expressions using the dot notation  Testing membership in a specific table without being a member of any subtables.

18-47 Using the ROW Keyword

18-48 Obtaining Object Identifiers

18-49 Path Expression Example

18-50 Oracle 10g Object Features  Supports most parts of the SQL:2003 object packages  User-defined types  Typed tables  Other object features

18-51 User-Defined Type Example

18-52 Inheritance

18-53 Typed Tables

18-54 Inheritance for Typed Tables

18-55 Inserting into Typed Tables

18-56 Path Expressions

18-57 Other Object Features  Type substitutability for subtables  Hierarchical views  Nested tables  XML support

18-58 Type Substitution and Hierarchical Views  Type substitution: row or column can contain type X or subtypes of X  Hierarchical views: views with inheritance  Limitations for managing set inclusion relationships  Must manage storage model for hierarchical views  Difficult to use reference types and subtype columns

18-59 Nested Table Support  Utility of nested tables is not clear for business databases  Oracle 10g features  TABLE and NESTED TABLE constructors  Query results can include nested tables.  Comparison operators for nested tables  Set operators for nested tables  Views with nested tables

18-60 XML Document Support  Part 14 of SQL:2003  Oracle 10g features  XMLType in columns  XML schema support  XML/SQL duality  XML query operators  Optimization with query rewrite

18-61 Summary  Three principles of object-oriented computing guide the development of object DBMSs.  A number of object DBMS architectures are commercially available.  SQL:2003 supports definition and manipulation of object relational databases.  Oracle 10g is a significant implementation of the SQL:2003 object packages