Object-Oriented Databases: Database Systems: Design, Implementation, and Management, Fifth Edition, Rob and Coronel
Object-Oriented Databases: Database Systems: Design, Implementation, and Management, Fifth Edition, Rob and Coronel
Object-Oriented Databases: Database Systems: Design, Implementation, and Management, Fifth Edition, Rob and Coronel
Chapter 11
Object-Oriented Databases
Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 2
11
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
Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 3
11
Evolution of OO Concepts
• 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
Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 4
11
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
Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 5
11
Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 6
11
Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 7
11
Object Characteristics
Figure 11.7
Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 8
11
Class Hierarchy
• Superclass
• Subclass
• Class lattice
Figure 11.8
Database Systems: Design, Implementation, & Management, 5 Edition, Rob & Coronel
th 9
11
Inheritance
• Ability of object to inherit the data structure and
behavior of classes above it
• Single inheritance
– Class has one immediate superclass
Figure 11.9
Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 10
11
Inheritance (con’t.)
• Multiple
– Class has more than one immediate superclass
Figure 11.10
Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 11
11
Method Overriding
• Method redefined at subclass level
Figure 11.12
Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 12
11
Polymorphism
Allows different objects to respond to same
message in different ways
Figure 11.13
Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 13
11
Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 14
11
Object Classification
• Simple
– Only single-valued attributes
– No attributes refer to other object
• Composite
– At least one multivalued attribute
– No attributes refer to other object
• Compound
– At least one attribute that references other object
• Hybrid
– Repeating group of attributes
– At least one refers to other object
Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 15
11
Characteristics of OODM
• Supports complex objects
• Must be extensible
• Supports encapsulation
• Exhibit inheritance
• Supports object identity
Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 16
11
Table 11.3
Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 17
11
Shared Representation
for all Objects of the Class Person
Figure 11.14
Figure 11.15
Database Systems: Design, Implementation, & Management, 5 Edition, Rob & Coronel
th 18
11
Figure 11.19
Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 19
11
Class-Subclass Relationship
Figure 11.21
Figure 11.20
Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 20
11
Interobject Relationships
• 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
Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 21
11
Figure 11.24
Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 22
11
Employee-Dependent Relationship
Figure 11.25
Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 23
11
Figure 11.26
Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 24
11
Figure 11.27
Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 25
11
Figure 11.28
Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 26
11
Figure 11.29
Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 27
11
Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 28
11
Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 29
11
Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 30
11
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
Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 31
11
Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 32
11
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
Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 33
11
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
Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 34
11
Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 35
11
Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 36