23
Object-Oriented Databases

Object Oriented Databases.ppt

Embed Size (px)

Citation preview

Page 1: Object Oriented Databases.ppt

Object-Oriented Databases

Page 2: Object Oriented Databases.ppt

2

Object Orientation

• Object Orientation – Set of design and development principles

– Based on autonomous computer structures

known as objects

• OO Contribution areas– Programming Languages

– Graphical User Interfaces

– Databases

– Design

– Operating Systems

Page 3: Object Oriented Databases.ppt

3

• Concepts stem from object-oriented programming languages (OOPLs)– Ada, ALGOL, LISP, SIMULA

• OOPLs goals– Easy-to-use development environment– Powerful modeling tools for development– Decrease in development time– Make reusable code

• OO Attributes– Data set not passive– Data and procedures bound together– Objects can act on self

Evolution of OO Concepts

Page 4: Object Oriented Databases.ppt

4

OO Concepts: Objects• Abstract representation of a real-world entity

– Unique identity– Embedded properties– Ability to interact with other objects and self

• OID – Unique to object– Not a primary key

• Attributes– Called instance variables– Domain

• Object state – Object values at any given time

Page 5: Object Oriented Databases.ppt

5

OO Concepts: Objects (con’t.)• Methods

– Code that performs operation on object’s data– Has name and body

• Messages– Invokes method– Sent to object

• Classes– Collection of similar objects – Shares attributes and structure

• Protocol– Represents object’s public aspect

Page 6: Object Oriented Databases.ppt

6

OO Concepts: Objects (con’t.)

• Class hierarchy – Code that performs operation on object’s data

– Has name and body

Page 7: Object Oriented Databases.ppt

7

Characteristics of OODM

• Supports complex objects• Must be extensible• Supports encapsulation• Exhibit inheritance• Supports object identity

Page 8: Object Oriented Databases.ppt

8

OO vs. E-R Model Components

Table 11.3

Page 9: Object Oriented Databases.ppt

9

Referential Sharing of Objects

Page 10: Object Oriented Databases.ppt

10

Class-Subclass Relationship

Page 11: Object Oriented Databases.ppt

11

• Attribute-Class Link• Object’s attribute references another object• Relationship Representation

– Related classes enclosed in boxes

– Double line on right side indicates mandatory

– Connectivity indicated by labeling each box• 1:M • M:N • M:N with an Intersection Class

Interobject Relationships

Page 12: Object Oriented Databases.ppt

12

1:1 and 1:M Relationships

Page 13: Object Oriented Databases.ppt

13

Employee-Dependent Relationship

Page 14: Object Oriented Databases.ppt

14

Representing the M:N Relationship

Page 15: Object Oriented Databases.ppt

15

• Late binding– Data type of attribute not known until runtime

– Allows different instances of same class to contain different data types for same attribute

• Early binding– Allows database to check data type at compilation

or definition time

Late and Early Binding

Page 16: Object Oriented Databases.ppt

16

• Object, Entity, and Tuple– OODM object has behavior, inheritance, and

encapsulation – OO modeling more natural

• Class, Entity Set, and Table– Class allows description of data and behavior– Class allows abstract data types

• Encapsulation and Inheritance– Object inherits properties of superclasses– Encapsulation hides data representation and method

OODM vs. E-R Data Models

Page 17: Object Oriented Databases.ppt

17

• Object ID– Not supported in

relational models

• Relationships– OODM

• Interclass references

• Class hierarchy inheritance

– Relational models

• Value-based approach

OODM vs. E-R Data Models (con’t.)

• Access– Relational models

• SQL

– OODM• Navigational • Set-oriented access

Page 18: Object Oriented Databases.ppt

18

OODBMS

• Database management system integrates benefits of typical database systems with OODM characteristics

• Handles a mix of data types• Follows OO rules• Follows DBMS rules

Page 19: Object Oriented Databases.ppt

19

• Provides data identification and the procedures for data manipulation

• Data and procedures self-contained entity• Iterative and incremental • DBA does more programming• Lack of standards

OO and Database Design

Page 20: Object Oriented Databases.ppt

20

OODBMS Advantages

• More semantic information• Support for complex objects• Extensibility of data types• May improve performance with efficient caching• Versioning• Reusability• Inheritance speeds development and application• Potential to integrate DBMSs into single

environment

Page 21: Object Oriented Databases.ppt

21

OODBMS Disadvantages

• Strong opposition from the established RDBMSs• Lack of theoretical foundation• Throwback to old pointer systems• Lack of standard ad hoc query language• Lack of business data design and management

tools• Steep learning curve• Low market presence• Lack of compatibility between different OODBMSs

Page 22: Object Oriented Databases.ppt

22

OO Influences on Relational Model

• Extensibility of new user-defined (abstract) data types

• Complex objects• Inheritance• Procedure calls (rules or triggers)• System-generated identifiers (OID surrogates)

Page 23: Object Oriented Databases.ppt

23

The Next Generation of DBMS

• Object-oriented database systems• Artificial intelligence systems• Expert systems• Distributed database• The Internet