Chapter 18 Object Database Management Systems. Outline Motivation for object database management Object-oriented principles Architectures for object database.

Slides:



Advertisements
Similar presentations
Chapter 10: Designing Databases
Advertisements

Management Information Systems, Sixth Edition
1 Software Testing and Quality Assurance Lecture 12 - The Testing Perspective (Chapter 2, A Practical Guide to Testing Object-Oriented Software)
 2006 Pearson Education, Inc. All rights reserved Introduction to Classes and Objects.
Chapter Object-Oriented Practices. Agenda Object-Oriented Concepts Terminology Object-Oriented Modeling Tips Object-Oriented Data Models and DBMSs.
Inheritance and Class Hierarchies Chapter 3. Chapter 3: Inheritance and Class Hierarchies2 Chapter Objectives To understand inheritance and how it facilitates.
1 SWE Introduction to Software Engineering Lecture 23 – Architectural Design (Chapter 13)
Object-Oriented Databases
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.
ASP.NET Programming with C# and SQL Server First Edition
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 11 Object and Object- Relational Databases.
McGraw-Hill/Irwin Copyright © 2007 by The McGraw-Hill Companies, Inc. All rights reserved. Chapter 18 Object Database Management Systems.
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.
Client/Server Software Architectures Yonglei Tao.
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.
Programming Languages and Paradigms Object-Oriented Programming.
Chapter 24 Introduction to Object DBMSs Prepared by Kai Huang CS157B Prof Sin-Min Lee.
ASP.NET Programming with C# and SQL Server First Edition
MT311 Java Application Development and Programming Languages Li Tak Sing( 李德成 )
CISC6795: Spring Object-Oriented Programming: Polymorphism.
Simple Database.
ABC Insurance Co. Paul Barry Steve Randolph Jing Zhou CSC8490 Database Systems & File Management Dr. Goelman Villanova University August 2, 2004.
An Introduction to Java Chapter 11 Object-Oriented Application Development: Part I.
JavaScript, Fourth Edition
Discovering Computers Fundamentals Fifth Edition Chapter 9 Database Management.
Professor Michael J. Losacco CIS 1110 – Using Computers Database Management Chapter 9.
Inheritance in the Java programming language J. W. Rider.
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.
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.
Data Structures Using C++ 2E1 Inheritance An “is-a” relationship –Example: “every employee is a person” Allows new class creation from existing classes.
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.
Summing Up Object Oriented Design. Four Major Components: Abstraction modeling real-life entities by essential information only Encapsulation clustering.
Chapter 2 Object-Relational DBMSs Chapter 28 in Textbook.
Object-Oriented Programming Chapter Chapter
(1) ICS 313: Programming Language Theory Chapter 12: Object Oriented Programming.
UMass Lowell Computer Science Java and Distributed Computing Prof. Karen Daniels Fall, 2000 Lecture 9 Java Fundamentals Objects/ClassesMethods Mon.
ISBN Object-Oriented Programming Chapter Chapter
1 Unified Modeling Language, Version 2.0 Chapter 2.
Inheritance and Class Hierarchies Chapter 3. Chapter 3: Inheritance and Class Hierarchies2 Chapter Objectives To understand inheritance and how it facilitates.
Inheritance and Class Hierarchies Chapter 3. Chapter Objectives  To understand inheritance and how it facilitates code reuse  To understand how Java.
The Object-Oriented Database System Manifesto Malcolm Atkinson, François Bancilhon, David deWitt, Klaus Dittrich, David Maier, Stanley Zdonik DOOD'89,
Text TCS INTERNAL Oracle PL/SQL – Introduction. TCS INTERNAL PL SQL Introduction PLSQL means Procedural Language extension of SQL. PLSQL is a database.
Question 1 Which of the following requires object database technology? A. Storing employee picture on disk B. Retrieving an employee picture C. Retrieving.
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.
Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design Second Edition by Tony Gaddis.
 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
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.
Object Oriented Analysis and Design
MANAGING DATA RESOURCES
Data Model.
Chapter 8 Advanced SQL.
Presentation transcript:

Chapter 18 Object Database Management Systems

Outline Motivation for object database management Object-oriented principles Architectures for object database management Object database definition and manipulation in SQL:1999 Object database definition and manipulation in Oracle 9i

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. The need to integrate complex data with simple data drives the demand for object database technology.

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.

Application Examples Dental Office Support Real Estate Listing Service Auto Insurance Claims

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.

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.

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

Inheritance Sharing of data and code among similar classes (classes and subclasses). Inherit variables and methods from parent classes When using the subclasses, the methods in the parent classes can be used. Inheritance provides an improved organization of software and incremental reusability.

Inheritance Examples

Multiple Inheritance Example

Polymorphism Ability of a computing system to choose among multiple implementations Benefits –Fewer, more reusable methods –incremental modification of code Requesting a method execution involves sending a message to an object Client-server processing and object- oriented computing are closely related.

Processing a Message

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

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

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. Encapsulation usually is relaxed so that an object’s data can be referenced in a query. Inheritance mechanisms usually are simpler in DBMSs

Architectures for Object Database Management 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

Large Objects and External Software Storage of large objects in a database along with external software to manipulate large objects. Complex data are stored in a field using the BLOB (binary large object) data type. The large object approach is simple to implement and universal. The large object approach suffers from serious performance drawbacks.

Large Object Architecture

Specialized Media Servers The use of a dedicated server to manage complex data outside of a database. Programmers use an application programming interface (API) to access complex data. Provide good performance for specific kinds of complex data. The range of operations may be limited. May perform poorly when combining simple and complex data.

Specialized Media Server Architecture

Object database middleware The use of middleware to manage complex data stored outside of a database along with traditional data stored in a database. Provides a way to integrate complex data stored on PCs and remote servers with relational databases. Object middleware can suffer performance problems because of a lack of integration with a DBMS.

Object Middleware Approach

Object Relational DBMS for User-Defined Types A relational DBMS extended with an object query processor for user-defined data types. Complex data is added as a user-defined type. User-defined functions can be defined and then used in SQL statements. SQL:1999 provides the standard for object relational DBMSs. Provide good integration of complex data but reliability may be a concern.

Component Architecture for Object Relational DBMSs

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.

Component Architecture for Object-Oriented DBMSs

Summary of Architectures

Object Database Features in SQL:1999 Very large standard Core language part Packages Details about basic and enhanced object support Two levels of conformance

SQL:1999 Packages

User-Defined Types Bundles data and procedures Support definition of structured types, not just extensions of standard types User-defined types can be used 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.

User-Defined Type Example

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

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

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

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

Example of table definition with a row type

Table Definition with a User- Defined Type

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

Subtable Example

Side effects when manipulating rows in subtable families On insert into a subtable, a corresponding row is inserted into each parent table. On update in a parent table, the column is also updated in all direct and indirect subtables that inherit the column. On update of an inherited column, the column is changed in the corresponding rows of direct and indirect parent tables. On delete, every corresponding row in both parent and subtables is also deleted.

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.

Using the ROW Keyword

Obtaining Object Identifiers

Example of path expression versus traditional expression

Oracle 9i Object Features Supports most parts of the SQL:1999 object packages User-defined types Typed tables Other object features

User-Defined Type Example

Inheritance

Typed Tables

Inheritance for Typed Tables

Inserting into Typed Tables

Path Expressions

Other Object Features Type substitutability for subtables Hierarchical views Nested tables

Summary Three principles of object-oriented computing guide the development of object DBMSs. A number of object DBMS architectures are commercially available. SQL:1999 supports definition and manipulation of object relational databases. Oracle 9i is a significant implementation of the SQL:1999 object packages