Unveiling Object Oriented Concepts in Database Systems
Explore the evolution and benefits of object orientation in database systems, learning about object attributes, state, methods, and more.
Unveiling Object Oriented Concepts in Database Systems
E N D
Presentation Transcript
Chapter 11 Object Oriented Databases Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel
In this chapter, you will learn: • What basic concepts govern OO systems • How OO features are related to the more traditional relational and ER models • What the basic features of an OO database management system (OODBMS) are • What effect OO concepts are likely to have on data modeling and design Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
In this chapter, you will learn: (continued) • About the advantages and disadvantages of OODBMSs • How OO concepts have influenced the relational model • How Oracle9i implements object extensions Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
Object Orientation and Its Benefits • A set of design and development principles based on conceptually autonomous computer structures known as objects • Each object represents a real-world entity with the ability to act upon itself and interact with other objects • Modularity is therefore almost inevitable Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
Object Orientation Contributions Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
The Evolution of Object Oriented Concepts • Object oriented programming • Developed as an alternative to traditional programming methods • Programmer creates or uses objects: • Self-contained, reusable modules that contain data as well as the procedures used to operate on such data Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
The Evolution of Object Oriented Concepts (continued) • Object oriented programming languageswere developed to: • Provide an easy-to-use software development environment • Provide a powerful software modeling tool for application development • Decrease development time by reducing the amount of code • Improve programmer productivity by making that code reusable Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
The Evolution of Object Oriented Concepts (continued) • Object oriented environment has several important attributes: • Data set is no longer passive • Data and procedures are bound together, creating an object • Object has an innate ability to act on itself Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
Object Oriented Concepts • Have their roots in programming languages • No knowledge of programming is necessary to understand these concepts Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
Objects: Components and Characteristics • Object: • Abstract representation of a real-world entity • Has: • Unique identity • Embedded properties • Ability to interact with other objects and act upon itself • Defining characteristic is its unique identity Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
Real-World Student Objects Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
Object Identity • Unique to that object • Assigned by system at moment of object’s creation • Cannot be changed under any circumstances • Can be deleted only if the object is deleted • Can never be reused Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
Attributes (Instance Variables) • Attributes: • Known as instance variables in OO environment • Domain: • Logically groups and describes the set of all possible values that an attribute can have Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
Object Attributes Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
Object State • Set of values that object’s attributes have at a given time • Can vary, although its OID remains the same • To change the object’s state, change the values of the object’s attributes • To change the object’s attribute values, send a message to the object • Message will invoke a method Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
Messages and Methods • Method: • Code that performs a specific operation on object’s data • Protects data from direct and unauthorized access by other objects • Used to change the object’s attribute values or to return the value of selected object attributes • Represent real-world actions Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
Depiction of an Object Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
Method Components Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
Objects Send Messages to Each Other Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
Classes • Collection of similar objects with shared structure (attributes) and behavior (methods) • Class instance or object instance • Each object in a class Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
Class Illustration Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
Protocol • An object’s public aspect • How it is known by other objects as well as end users • Other objects communicate with the student object using any of these methods Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
Public and Private Aspects of an Object Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
OO Summary: Object Characteristics Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
Musical Instruments Class Hierarchy Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
Single Inheritance Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
Multiple Inheritance Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
Motor Vehicle and Bicycle Instance Variables Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
Employee Class Hierarchy Method Override Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
Employee Class Hierarchy Polymorphism Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
Abstract Data Types • Differs from conventional data type • ADT’s operations are user-defined • ADT does not allow direct access to its internal data representation or method implementation • To create ADT, specify: • Its name • Data representation or instance variables of objects belonging to the abstract data • ADT operations and constraints, both of which are implemented through methods Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
Object Classification • Simple object • Composite object • Compound object • Hybrid object • Associative object Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
Characteristics of an Object Oriented Data Model • Support the representation of complex objects • Are extensible: • Capable of defining new data types as well as the operations to be performed on them • Support encapsulation: • Data representation and method’s implementation must be hidden from external entities Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
Characteristics of an Object Oriented Data Model (continued) • Exhibit inheritance: • Object must be able to inherit properties (data and methods) of other objects • Support the notion of object identity (OID) Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
Comparing the OO and ER Model Components Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
Shared Representation for All Objects of the Class Person Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
State of a Person Object Instance Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
Defining Three Abstract Data Types Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
Object Representation for Instances of the Class Person with ADTs Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
Object State for an Instance of the Class Person, Using ADTs Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
Referential Object Sharing Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
Class Hierarchy Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
Employee Object Representation Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
Class Hierarchy for the EDLP Retail Corporation Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
Representing a 1:M Relationship Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
Representing 1:1 and 1:M Relationships Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
Employee-Dependent Relationship Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
Representing the M:N Relationship Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
Representing the M:N Relationship with Associated Attributes Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel
Representing the M:N Relationship with Intersection Class Database Systems: Design, Implementation, & Management, 6th Edition, Rob & Coronel