Download presentation
Presentation is loading. Please wait.
1
Fundamentals, Design, and Implementation, 9/e Chapter 16 Object-Oriented Database Processing
2
Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeChapter 16/2 Copyright © 2004 Introduction Relational databases are not well-suited to store object-oriented programming objects because tables cannot store complex object structures including methods Object-Oriented DBMS (ODBMS or OODBMS) is a special-purpose DBMS developed in the early 1990s to provide persistent object storage –These products have not been commercially successful because existing data must be converted into ODBMS format DBMS products begin to support object-relational databases, hybrids of object and relational storage
3
Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeChapter 16/3 Copyright © 2004 Object-Oriented Programming Object-oriented programming (OOP) is a way of designing and coding programs Traditional programming –Views programs as sequences of instructions to be processed –Is organized around logic first and data second Object-oriented programming –Views programs as sets of data structures that have both data elements and program instructions –Is organized around data first and logic second
4
Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeChapter 16/4 Copyright © 2004 OOP Terminology An OOP object is an encapsulated structure having both attributes and methods –Encapsulated means that it is complete in itself Programs external to an object know nothing of its structure and need to know nothing of its structure –Methods are sequences of instructions that the object executes OOP objects interact by calling each other’s methods An interface is the external appearance of an object An implementation is the encapsulated interior of an object
5
Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeChapter 16/5 Copyright © 2004 OOP Terminology (cont.) A subclass object inherits the attributes and methods of its superclass Polymorphism allows several versions of the same method to exist –The compiler creates code to call the proper version, depending on the object class An object class is the logical structure of an object –An object class library is a group of object classes –Objects or object instances are instances of an object class
6
Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeChapter 16/6 Copyright © 2004 OOP Terminology (cont.) Object constructors are methods that obtain memory and create object structures Object destructors unbind objects and free memory Transient objects exist only during the execution of a program Persistent objects are saved to storage and survive the execution of a program
7
Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeChapter 16/7 Copyright © 2004 Example: CUSTOMER Object
8
Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeChapter 16/8 Copyright © 2004 Example: Object Data Structures
9
Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeChapter 16/9 Copyright © 2004 Object Persistence Object Persistence Requirements –Save object instance data values –Convert in-memory object pointers to permanent, unique IDs (swizzling) –Save object class methods Objects can be made persistent by using –Traditional file storage –Relational DBMS –ODBMS
10
Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeChapter 16/10 Copyright © 2004 Object Persistence Alternatives
11
Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeChapter 16/11 Copyright © 2004 Object Persistence Using Oracle Oracle supports object persistence using object- relational database facilities Object types can be defined and used with table structures as –Column objects –Variable length arrays –Nested tables –Row objects Pure objects can also be defined to include –Variable length arrays and nested tables –Object pointers as REF attributes –Methods, which can use Oracle-supplied class libraries for processing
12
Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeChapter 16/12 Copyright © 2004 ODBMS Standards SQL3 –ANSI and ISO proposed SQL3 as an extension to SQL-92 –SQL3 begins with a database perspective and moves toward object thinking ODMG-93 –First published in 1993 by the Object Data Management Group –ODMG is supported by a consortium of object database vendors and other interested industry experts –ODMG begins with an object perspective and moves toward data management thinking
13
Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeChapter 16/13 Copyright © 2004 SQL3 Key Developments Abstract Data Types (ADT): a user-defined structure equivalent to an OOP object –Object ADTs have identifiers called OIDs SQL3 table definition extensions –SQL3 tables have a row identifier and can have subtable A subtable is a subset of supertable and it inherits all of the columns of its supertable and may also have columns of its own –Three types of table: SET, MULTISET, LIST SQL language extensions supporting ADT methods coding
14
Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeChapter 16/14 Copyright © 2004 ODMG-93 Key Elements Objects are the fundamental data structure Every object has a lifelong persistent, unique identifier Objects can be arranged into types and subtypes State is defined by data values and relationships Behavior is defined by object operations
15
Fundamentals, Design, and Implementation, 9/e Chapter 16 Object-Oriented Database Processing
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.