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

Similar documents
Concepts for Object-Oriented Databases

3. Object-Oriented Databases

Ch. 21: Object Oriented Databases

Chapter 12 Object and Object Relational Databases

ODBMS: PROTOTYPES & PRODUCTS. The ODBMS Manifesto [M.Atkinson & al 89]

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

Chapter 11 Object and Object- Relational Databases

Copyright 2016 Ramez Elmasri and Shamkant B. Navathe

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

2.1. Concepts for Object Databases

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

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

Object Oriented Issues in VDM++

DATABASE CONCEPTS. Dr. Awad Khalil Computer Science & Engineering Department AUC

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

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

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

Chapter3: Introduction to Classes and Objects

Databases and Database Management Systems

COURSE 11. Object-Oriented Databases Object Relational Databases

DATABASE TECHNOLOGY - 1DL124

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

SE352b: Roadmap. SE352b Software Engineering Design Tools. W5: Database Technology. Database Technology

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

Inheritance and object compatibility

Graphical Interface and Application (I3305) Semester: 1 Academic Year: 2017/2018 Dr Antoun Yaacoub

Database System Concepts and Architecture. Copyright 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley

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

PROGRAMMING LANGUAGE 2

Polymorphism and Inheritance

CSE 307: Principles of Programming Languages

Database System Concepts and Architecture

Object Model. Object Orientated Analysis and Design. Benjamin Kenwright

Introduction to Databases Object and Object-Relational Databases

CHAPTER 2 LITERATURE REVIEW

Subtyping (Dynamic Polymorphism)

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

DATABASE MANAGEMENT SYSTEM COURSE CONTENT

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

Part 3: Object-Oriented Database Management Systems

OOPS Viva Questions. Object is termed as an instance of a class, and it has its own state, behavior and identity.

CPS 506 Comparative Programming Languages. Programming Language

Programming II (CS300)

Objects, Subclassing, Subtyping, and Inheritance

Introduction: OO principles. Introduction: OO principles. 3 Object Oriented Database Systems. 3.1 Introduction: Why OO Databases

Object-Relational Database Systems (ORDBS) Contains slides made by Naci Akkøk, Pål Halvorsen, Arthur M. Keller and Vera Goebel.

Inheritance, Polymorphism, and Interfaces

Chapter 13 Object Oriented Programming. Copyright 2006 The McGraw-Hill Companies, Inc.

8. Polymorphism and Inheritance

C++ Programming: Introduction to C++ and OOP (Object Oriented Programming)

Object Oriented Database

Java Object Oriented Design. CSC207 Fall 2014

Software Paradigms (Lesson 3) Object-Oriented Paradigm (2)

M301: Software Systems & their Development. Unit 4: Inheritance, Composition and Polymorphism

Outline. CUGS Core - Databases. Requirements. Work method. Databanks/Databases. Databank

CS511 Design of Database Management Systems

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

IT101. Inheritance, Encapsulation, Polymorphism and Constructors

UNIT 1 INTRODUCTION TO OBJECT ORIENTED DATABASE MANAGEMENT SYSTEM

Lecture 16: Object Programming Languages

Object-Oriented Design

DATA TYPES. CS 403: Types and Classes DATA TYPES (CONT D)

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

Inheritance and Polymorphism

Notes on. Advanced Database management system (504) Mrinal Paul Department of Computer Science Assam University, Silcher

User-Defined Algebraic Data Types

Information System Design (IT60105)

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

Data Structures (list, dictionary, tuples, sets, strings)

ACRONYMS AND GLOSSARY

What are the characteristics of Object Oriented programming language?

Programming II (CS300)

Object Oriented Paradigm

CSE 452: Programming Languages. Previous Lecture. From ADTs to OOP. Data Abstraction and Object-Orientation

Object Oriented Programming. C++ 6 th Sem, A Div Ms. Mouna M. Naravani

VISUAL INTEGREATED SYSTEM FOR OBJECT-ORIENTED DEVELOPMENT AND EXPLOITATION OF A SPECIAL CLASS INFORMATIONAL SYSTEMS

C++ Important Questions with Answers

Object Oriented Software Development CIS Today: Object Oriented Analysis

Object-Oriented Design (OOD) and C++

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

Chapter 21 9/4/2012. Object Database Standards, Languages, and Design. Chapter 21Outline. Chapter Objectives. ODMG Objects and Literals

New Programming Paradigms

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

CS200: Advanced OO in Java

PROGRAMMING IN C++ COURSE CONTENT

OBJECT ORİENTATİON ENCAPSULATİON

COURSE 2 DESIGN PATTERNS

Object oriented programming Concepts

Concepts of Programming Languages

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

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

AP COMPUTER SCIENCE JAVA CONCEPTS IV: RESERVED WORDS

Credit where Credit is Due. Lecture 4: Fundamentals of Object Technology. Goals for this Lecture. Real-World Objects

Object Database Standards, Languages, and Design

What is Data? ANSI definition: Volatile vs. persistent data. Data. Our concern is primarily with persistent data

What is Data? Volatile vs. persistent data Our concern is primarily with persistent data

Lecture Notes on Programming Languages

W5.L2. Week 5, Lecture 2

Lecture 2 and 3: Fundamental Object-Oriented Concepts Kenneth M. Anderson

Transcription:

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

Introduction Traditional Data Models : Hierarchical, Network (since mid- 60 s), Relational (since 1970 and commercially since 1982) Object Oriented (OO) Data Models since mid-90 s Reasons for creation of Object Oriented Databases Need for more complex applications Need for additional data modeling features Increased use of object-oriented programming languages Unsuitability of RDBMSs for advanced database applications. Commercial OO Database products several in the 1990 s, but did not make much impact on mainstream data management Basics of object-oriented database analysis and design. 2

History of OO Models and Systems Languages: Simula (1960 s), Smalltalk (1970 s), C++ (late 1980 s), Java (1990 s) Experimental Systems: Orion at MCC, IRIS at H-P labs, Open-OODB at T.I., ODE at ATT Bell labs, Postgres - Montage - Illustra at UC/B, Encore/Observer at Brown Commercial OO Database products: Ontos, Gemstone, O2 ( -> Ardent), Objectivity, Objectstore ( -> Excelon), Versant, Poet, Jasmine (Fujitsu GM) 3

OODBMS Khoshafian and Abnous: OODBMS = OO + Database capabilities. Parsaye: High-level query language with query optimization. Support for persistence, atomic transactions: concurrency and recovery control Support for complex object storage, indexes, and access methods. OODBMS = OO system + (1), (2), and (3) 4

Complex objects must be supported. Object identity must be supported. Encapsulation must be supported. Types or Classes must be supported. Types or Classes must be able to inherit from their ancestors. Dynamic binding must be supported. The DML must be computationally complete (general purpose programming language) 5

Overview of Object-Oriented Concepts(1) MAIN CLAIM: OO databases try to 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: Two components: state (value) and behavior (operations). Similar to program variable in programming language, except that it will typically have a complex data structure as well as specific operations defined by the programmer 6

Overview of Object-Oriented Concepts (2) In OO databases, objects may have an object structure of arbitrary complexity in order to contain all of the necessary information that describes the object. In contrast, in traditional database systems, information about a complex object is often scattered over many relations or records, leading to loss of direct correspondence between a real-world object and its database representation. 7

Abstraction Process of identifying essential aspects of an entity and ignoring unimportant properties. Concentrate on what an object is and what it does, before deciding how to implement it Encapsulation: Object contains both data structure and set of operations used to manipulate it. Information Hiding: Separate external aspects of an object from its internal details, which are hidden from outside 8

Object Uniquely identifiable entity that contains both the attributes that describe the state of a real-world object and the actions associated with it Definition very similar to that of an entity, however, object encapsulates both state and behavior; an entity only models state. 9

Attributes Contain current state of an object Attributes can be classified as simple or complex. Simple attribute can be a primitive type such as integer, string, etc., which takes on literal values. Complex attribute can contain collections and/or references. Reference attribute represents relationship. An object that contains one or more complex attributes is called a complex object 10

Object Identifier Object identifier (OID) assigned to object when it is created that is: System-generated. Unique to that object. Invariant Independent of the values of its attributes (that is, its state). Invisible to the user (ideally). 11

In RDBMS, object identity is value-based: primary key is used to provide uniqueness. Primary keys do not provide type of object identity required in OO systems: key only unique within a relation, not across entire system; key generally chosen from attributes of relation, making it dependent on object state. 12

Methods and Massage Method Defines behavior of an object, as a set of encapsulated functions. Message Request from one object to another asking second object to execute one of its methods. 13

Class Blueprint for defining a set of similar objects. Objects in a class are called instances. Class is also an object with own class attributes and class methods. Class different from type 14

Inheritance Inheritance allows one class of objects to be defined as a special case of a more general class. Special cases are subclasses and more general cases are superclasses. Process of forming a superclass is generalization; forming a subclass is specialization. Subclass inherits all properties of its superclass andcan define its own unique properties. Subclass can redefine inherited methods. 15

All instances of subclass are also instances of superclass. Principle of substitutability states that instance of subclass can be used whenever method/construct expects instance of superclass. Relationship between subclass and superclass known as A KIND OF (AKO) relationship. Four types of inheritance: single, multiple, repeated, and selective. 16

Polymorphism Overriding Process of redefining a property within a subclass. Overloading Allows name of a method to be reused with a class or across classes. Polymorphism Means many forms. Three types: operation, inclusion, and parametric. 17

Object Identity, Object Structure, and Type Constructors (3) Example 1, one possible relational database state corresponding to COMPANY schema 18

Example 1 (cont.): 19

Example 1 (cont.) 20

Object Identity, Object Structure, and Type Constructors Example 1 (cont.) DEPARTMENT We use i 1, i 2, i 3,... to stand for unique systemgenerated object identifiers. Consider the following objects: o 1 = (i 1, atom, Houston ) o 2 = (i 2, atom, Bellaire ) o 3 = (i 3, atom, Sugarland ) o 4 = (i 4, atom, 5) o 5 = (i 5, atom, Research ) o 6 = (i 6, atom, 1988-05-22 ) o 7 = (i 7, set, {i 1, i 2, i 3 }) 21

Example 1(cont.) o 8 = (i 8, tuple, <dname:i 5, dnumber:i 4, mgr:i 9, locations:i 7, employees:i 10, projects:i 11 >) o 9 = (i 9, tuple, <manager:i 12, manager_start_date:i 6 >) o 10 = (i 10, set, {i 12, i 13, i 14 }) o 11 = (i 11, set {i 15, i 16, i 17 }) o 12 = (i 12, tuple, <fname:i 18, minit:i 19, lname:i 20, ssn:i 21,..., salary:i 26, supervi sor:i 27, dept:i 8 >)... 22

Example 1 (cont.) The first six objects listed in this example represent atomic values. Object seven is a set-valued object that represents the set of locations for department 5; the set refers to the atomic objects with values { Houston, Bellaire, Sugarland }. Object 8 is a tuple-valued object that represents department 5 itself, and has the attributes DNAME, DNUMBER, MGR, LOCATIONS, and so on. 23

Example 2: This example illustrates the difference between the two definitions for comparing object states for equality. o 1 = (i 1, tuple, <a 1 :i 4, a 2 :i 6 >) o 2 = (i 2, tuple, <a 1 :i 5, a 2 :i 6 >) o 3 = (i 3, tuple, <a 1 :i 4, a 2 :i 6 >) o 4 = (i 4, atom, 10) o 5 = (i 5, atom, 10) o 6 = (i 6, atom, 20) 24

Example 2 (cont.): In this example, The objects o 1 and o 2 have equal states, since their states at the atomic level are the same but the values are reached through distinct objects o 4 and o 5. However, the states of objects o 1 and o 3 are identical, even though the objects themselves are not because they have distinct OIDs. Similarly, although the states of o 4 and o 5 are identical, the actual objects o 4 and o 5 are equal but not identical, because they have distinct OIDs. 25

26

27

Summary (1) Object identity: Objects have unique identities that are independent of their attribute values. Type constructors: Complex object structures can be constructed by recursively applying a set of basic constructors, such as tuple, set, list, and bag. Encapsulation of operations: Both the object structure and the operations that can be applied to objects are included in the object class definitions. 28

Summary (2) Programming language compatibility: Both persistent and transient objects are handled uniformly. Objects are made persistent by being attached to a persistent collection. Type hierarchies and inheritance: Object types can be specified by using a type hierarchy, which allows the inheritance of both attributes and methods of previously defined types. 29

Summary (3) Extents: All persistent objects of a particular type can be stored in an extent. Extents corresponding to a type hierarchy have set/subset constraints enforced on them. Support for complex objects: Both structured and unstructured complex objects can be stored and manipulated. Polymorphism and operator overloading: Operations and method names can be overloaded to apply to different object types with different implementations. 30

Summary (4) Versioning: Some OO systems provide support for maintaining several versions of the same object. 31