Advanced Database Applications. Object Oriented Database Management Chapter 13 10/29/2016. Object DBMSs

Similar documents
Several major software companies including IBM, Informix, Microsoft, Oracle, and Sybase have all released object-relational versions of their

ORDBMS - Introduction

Ch. 21: Object Oriented Databases

3. Object-Oriented Databases

Chapter 13. Object-Oriented Databases (from E&N and my editing)

Appendix A - Glossary(of OO software term s)

Object-Relational and Nested-Relational Databases Dr. Akhtar Ali

Chapter 12 Object and Object Relational Databases

DATABASE TECHNOLOGY - 1DL124

OBJECT ORIENTED PROGRAMMING USING C++ CSCI Object Oriented Analysis and Design By Manali Torpe

Chapter 11 Object and Object- Relational Databases

Lecture 13: Object orientation. Object oriented programming. Introduction. Object oriented programming. OO and ADT:s. Introduction

Database Fundamentals Chapter 1

Copyright 2016 Ramez Elmasri and Shamkant B. Navathe

Chapter 11: Data Management Layer Design

CHAPTER 5 GENERAL OOP CONCEPTS

CHAPTER 2 LITERATURE REVIEW

Course Content. Object-Oriented Databases. Objectives of Lecture 6. CMPUT 391: Object Oriented Databases. Dr. Osmar R. Zaïane. University of Alberta 4

Chapter 5 Object-Oriented Programming

Chapter 11. Categories of languages that support OOP: 1. OOP support is added to an existing language

Subtyping (Dynamic Polymorphism)

Lecture 09. Ada to Software Engineering. Mr. Mubashir Ali Lecturer (Dept. of Computer Science)

Programming Languages Third Edition. Chapter 7 Basic Semantics

ITCS Jing Yang 2010 Fall. Class 16: Object and Object- Relational Databases (ch.11) References

Concepts for Object-Oriented Databases

Overview of Data Management

Object-Oriented Technology. Rick Mercer

CPS 506 Comparative Programming Languages. Programming Language

What are the characteristics of Object Oriented programming language?

Rekayasa Perangkat Lunak 2 (IN043): Pertemuan 8. Data Management Layer Design

TOPLink for WebLogic. Whitepaper. The Challenge: The Solution:

The functions performed by a typical DBMS are the following:

Transparent Java access to mediated database objects

Introduction to Java and OOP. Hendrik Speleers

ACRONYMS AND GLOSSARY

System Analysis and Design/ Object-Oriented System Modeling

Volume 5 Issue 3 (2017) ISSN International Journal of Advance Research and Innovation IJARI

Object Oriented Programming

Part 7 - Object Oriented Concepts Classes, Objects, Properties and Methods

Introduction to Databases CS348

STUDY NOTES UNIT 1 - INTRODUCTION TO OBJECT ORIENTED PROGRAMMING

R/3 System Object-Oriented Concepts of ABAP

Inheritance -- Introduction

C++ Important Questions with Answers

Object Oriented Programming in Java. Jaanus Pöial, PhD Tallinn, Estonia

COURSE 11. Object-Oriented Databases Object Relational Databases

Chapter 13. Object Oriented Programming

CS630. Object-Oriented DBMS Fundamentals. Les Waguespack, Ph.D. LJW 2014 : OODBMS::

Object Oriented Programming with c++ Question Bank

Data Abstraction. Hwansoo Han

Object-Oriented Software Engineering Practical Software Development using UML and Java. Chapter 2: Review of Object Orientation

Chapter 10 :: Data Abstraction and Object Orientation

Chapter 9 :: Data Abstraction and Object Orientation

DATABASE SYSTEMS CHAPTER 2 DATA MODELS 1 DESIGN IMPLEMENTATION AND MANAGEMENT INTERNATIONAL EDITION ROB CORONEL CROCKETT

Zhifu Pei CSCI5448 Spring 2011 Prof. Kenneth M. Anderson

B.H.GARDI COLLEGE OF MASTER OF COMPUTER APPLICATION. Ch. 1 :- Introduction Database Management System - 1

Programming Language Concepts Object-Oriented Programming. Janyl Jumadinova 28 February, 2017

Systems Analysis and Design in a Changing World, Fourth Edition. Chapter 12: Designing Databases

Week 7. Statically-typed OO languages: C++ Closer look at subtyping

Introduction: Databases and. Database Users

Programmazione. Prof. Marco Bertini

Information System Design (IT60105)

Object-Oriented Software Engineering. Chapter 2: Review of Object Orientation

Copyright 2007 Ramez Elmasri and Shamkant B. Navathe. Slide 1-1

Objects, Encapsulation, Inheritance (2)

Lecturer: William W.Y. Hsu. Programming Languages

Inheritance and Polymorphism

1 ODBMS vs RDBMS 1. 3 Resources 16

Compaq Interview Questions And Answers

Object-Oriented Programming and Design

HIBERNATE MOCK TEST HIBERNATE MOCK TEST IV

Lecture Notes on Programming Languages

Supports 1-1, 1-many, and many to many relationships between objects

Fundamentals of Design, Implementation, and Management Tenth Edition

Concepts of Programming Languages

New Programming Paradigms

Introduction: Databases and Database Users. Copyright 2007 Ramez Elmasri and Shamkant B. Navathe Slide 1

Object Oriented Programming. Solved MCQs - Part 2

Object-Oriented Programming

Elena Baralis and Tania Cerquitelli 2013 Politecnico di Torino 1

DATABASE MANAGEMENT SYSTEM COURSE CONTENT

Database Management System. Fundamental Database Concepts

Introduction. Course Overview Evolution and History of Database Management Systems Requirements of Object-Oriented Database Management Systems

Design issues for objectoriented. languages. Objects-only "pure" language vs mixed. Are subclasses subtypes of the superclass?

Sri Vidya College of Engineering & Technology

Part 3: Object-Oriented Database Management Systems

CSE 307: Principles of Programming Languages

Object Persistence Techniques - A Study of Approaches, Benefits, Limits and Challenges

C++ Yanyan SHEN. slide 1

PROGRAMMING IN C++ COURSE CONTENT

CMSC 132: Object-Oriented Programming II

Overview of Data Management

CS511 Design of Database Management Systems

Inheritance. Benefits of Java s Inheritance. 1. Reusability of code 2. Code Sharing 3. Consistency in using an interface. Classes

Data Structures and Algorithms Design Goals Implementation Goals Design Principles Design Techniques. Version 03.s 2-1

Introduction to Object Oriented Analysis and Design

Object-Oriented Languages and Object-Oriented Design. Ghezzi&Jazayeri: OO Languages 1

Comparing the performance of object and object relational database systems on objects of varying complexity

Object Oriented Programming is a programming method that combines: Advantage of Object Oriented Programming

Strategic Information Systems Systems Development Life Cycle. From Turban et al. (2004), Information Technology for Management.

Transcription:

Object Oriented Database Chapter 13 1 Object DBMSs Underlying concepts: Freely sharing data across processing routines creates unacceptable data dependencies All software should be constructed out of standard, reusable components whenever possible Beginnings in the 1970s, but no significant commercial use until the 1990s 2 Advanced Database Applications Relational DBMSs have proven inadequate for applications that store complex data structures: Computer aided design (CAD) Computer aided manufacturing (CAM) Computer aided software engineering (CASE) Office information systems and multimedia systems Digital publishing Geographic information systems (GIS) 3 1

Anatomy of an Object Object: a logical grouping of related data and programming logic that represents a real world thing Like a relational entity except programming logic is stored as an integral part 4 Object Properties Abstraction: process of identifying essential aspects of an entity and ignoring unimportant properties (e.g. implementation details) Encapsulation: object contains both the data structure and the operations (methods) that can be used to manipulate it Information Hiding: separate the external aspects of an object from its internal details; provides data independence Modularization: object can be constructed and modified independent of the system, provided the public interface is not changed 5 Objects and Attributes Object: A uniquely identifiable entity that contains both the attributes that describe the state of the real world object and the actions (methods) associated with it Attributes or Instance Variables record the current state of the object Complex Attribute can contain collections or references, representing a relationship between objects 6 2

Object Identity Object Identifier (OID): System generated Unique to one object Unique across entire system; primary key is unique only within a relation Invariant; cannot be altered during its lifetime Independent of the values of its attributes Invisible to the user (ideally) 7 Advantages of OIDs Efficient: smaller than textual names or foreign keys Fast: points to an actual address Cannot be modified by the user Independent of content 8 Methods and Messages Methods Define the behavior of an object Can be used to change the object s state by modifying attribute values Consists of a name and a body Messages Means by which objects communicate A request from one object (sender) to another object (receiver) to execute a method 9 3

Attributes and Methods 10 Classes Class: a grouping of objects that have the same attributes and respond to the same messages Attributes and methods defined once for class Objects in a class called instances 11 Class Definition and Instances 12 4

Inheritance, Subclasses and Superclasses Inheritance: allows one class to be defined as a special case of a more general case Subclass: special cases of a general class Superclass: general class Generalization vs Specialization Subclass inherits all properties of Superclass and may define its own 13 Inheritance Options Multiple Inheritance: subclass inherits from more than one superclass Can lead to errors if method or variable names are ambiguous Selective Inheritance: limited properties inherited Overriding: Subclass redefines a property by using the same name as the inherited one 14 Single Inheritance 15 5

Multiple Inheritance 16 Overloading and Polymorphism Overloading allows the name of a method to be reused within a class definition or across class definitions Single message performs different functions depending on which object receives it Permits polymorphism (having many forms) 17 Complex Objects Objects can be combined into Complex Objects Each object can appear independently Complex object can encapsulate the component objects Complex objects can be included in other complex objects 18 6

DBMS Generations Hierarchical and Network were first generation DBMSs Relational are second generation DBMSs Third generation are Object Oriented (OODBMS) and Object Relational (ORDBMS) Note: Objects are really not that new, OO began in the 1970 s (Smalltalk at Xerox) 19 Two level Storage Model (Relational DBMS) 20 Single level Storage Model (OODBMS) 21 7

Accessing an Object To access object, OODBMS must: Determine secondary storage page that contains the object Read page and copy into page cache Convert object (swizzle references, etc.) Application directly references object in memory OODBMS must convert object back before storing it 22 Steps in Accessing an Object, Conventional DBMS 23 Steps in Accessing an Object, OODBMS 24 8

Advantages of OODMSs Enriched modeling capabilities Extensibility No impedance mismatch with OO languages More expressive query language Support for schema evolution Support for long duration transactions Applicability to advanced database applications 25 Disadvantages of OODBMSs Lack of universal data model Lack of universally accepted standards Query optimization compromises encapsulation Locking at object level may impact performance Complexity Lack of support for views Lack of support for security 26 OO Design: Relationships 1:1 Relationships: Reference attribute added to each object 1:M Relationships: Reference attribute added to object on many side, attribute containing a set of references added on the one side M:N Relationships: Attribute containing set of references added to each object 27 9

OO Design: Referential Integrity Referential integrity requires that any referenced object must exist Techniques to handle referential integrity: Do not allow user to explicitly delete objects Allow user to delete objects when they are no longer required (referenced) Allow user to modify or delete relationships when they are no longer required 28 OO Design: Behavioral Design Constructor Methods: generate new instances Destructor Methods: delete instances when no longer required Access Methods: return value of an attribute or set of attributes Transform Methods: change instance state Identifying Methods: Determine methods required to provide required functions 29 Object Oriented Applications Object Oriented (OO) applications are written in OO programming languages OO languages usually come with pre defined class structures and methods, which are user extensible Some OO languages come with complete development environments OO programming can be done with or without an OO database 30 10

Object Oriented Programming Messages are used as the vehicle for object interaction Message composed of : Identifier of object to receive the message Name of method to be invoked Optional parameter(s) Methods are program code that define the behavior of the object 31 Object Oriented Languages Smalltalk Developed in 1972 by Software Concepts Group (lead by Alan Kay) at Xerox PARC Alan Kay coined phrase object oriented Includes: Language Programming Environment Image File System (sort of an OO database) Extensive Object Library 32 Object Oriented Languages Smalltalk (cont.) Innovations included: Bitmap display Windowing system Use of a mouse Xerox never figured out how to market these innovations Smalltalk is still around: www.smalltalk.org 33 11

Object Oriented Languages C++ Based on C Language (++ increments a variable by 1 in C) Superset of C Primarily developed by Bjarne Stroustrup at AT&T Bell Laboratories in 1986 Classes are implemented as user defined types (called a struct in C) Methods are implemented as member functions of a struct 34 Object Oriented Languages C++ (cont.) Object purists criticize C++ because programmer can totally ignore the object paradigm C++ aficionados see that flexibility as a huge benefit 35 Object Oriented Languages Java A simple, portable, general purpose OO language Developed by Sun Microsystems in 1995 Took market by storm, largely because of support for Internet programming (applets) An interpretive language (unlike Smalltalk and C++), with just in time compilers added to resolve performance issues 36 12

Object Persistence Persistence: the OO property that preserves the state of the object between executions of an application or server shutdown/startup Database often used to permanently store objects (OO, Relational, or O R) Objects must be loaded into memory before use Loading is an indirect process 37 Object Relational (O R) Databases Evolved in response to mapping objects to relational databases Relational DBMS vendors such as Informix and Oracle added object capability to prevent loss of market share to OO DBMS vendors Pure OO databases lack ad hoc query support 38 O R Databases Advantages Complex data types directly supported Methods can be stored as functions or stored procedures, facilitating reuse and sharing Ad hoc query capability is fully supported 39 13

O R Databases Disadvantages More complex than either OO or relational Objects are table centric Relational purists dislike loss of simplicity Object purists not impressed with O R Lack of class structure and inheritance Object applications are not as data centric as relational applications, so OO DBMS may be a better fit 40 ORDBMS Advantages Reuse comes from ability to extend DBMS to perform common functions centrally Sharing comes from embedding object functions in the server, making them available to all applications 41 ORDBMS Disadvantages Complexity and associated increased costs Relational purists believe that essential simplicity and purity are lost on these types of extensions Object purists are not attracted to these extensions, arguing that ORDBMS is little more than userdefined data types Object applications are not as data centric as relational ones 42 14

Early ORDBMSs Postgres ( Post Ingress ) Provides predefined atomic types and allows users to add new atomic and structured types Conversion procedures implemented in a high level language such as C using a define procedure command INHERITS clause defines table inheritance Multiple inheritance supported Relation automatically inherits all attributes from parents Each relation has implicitly defined OID 43 Early ORDBMSs INGRES Object Extension Allows additional data types and SQL functions to be created. User defined data types can be used anywhere system defined data types can be used New SQL functions can be used in queries and to manipulate system and user defined data types Functions can be written in a language that conforms to C conventions 44 Which One to Use? 45 15