180 likes | 373 Views
Object-Oriented Databases. OO systems associated with graphical user interface (GUI) powerful modeling techniques advanced data management capabilities What effect will OO concepts have on DB design? What about the Extended Relational System?. OBJECT-ORIENTATION.
E N D
Object-Oriented Databases • OO systems associated with • graphical user interface (GUI) • powerful modeling techniques • advanced data management capabilities • What effect will OO concepts have on DB design? • What about the Extended Relational System?
OBJECT-ORIENTATION A set of design and development principles based on the idea of conceptually autonomous structures Each autonomous structure represents areal-world entity with the ability to interact with itself and with other objects
Object Orientation • Conceptually autonomous structures • Modularity • Inconsistent OO concept definitions • Originates in OO programming • Tradition: separate procedures from data • OO: objects perform operations on themselves
OO view of the world endows data with manipulative ability • Data no longer passive • Data + procedures = OBJECT • Object can act on itself • Object contains data and code • Concept natural to those with little programming experience but confusing to many with traditional programming expertise
OO Concepts • Object is essentially a new name for entity • Difference: its ability to interact with other objects and itself • Object has a unique identifier (OID) and attributes called instance variables • Object attributes may reference other objects allowing the implementation of relationships • Messages and methods
Depiction of an Object Object X Method 1 Method 2 Data Method 5 Method 3 Method 4
OO Concepts • Every operation to be performed on an object must be implemented by a method • Every method is identified by its name and has a body • Body is composed of computer instructions in some programming language • To invoke a method a message is sent to an object containing that method • Message contains object identification, method name and any required parameters • Encapsulation: hiding internal details on attributes and methods • Objects with common characteristics are grouped into classes
Private Aspect Public Aspect Protocol Class defines collection of Instance variables Methods Messages are the names of the that trigger defines a set of values for its belongs to a implemented by a set of Object has State OID (unique) Behavior OO Summary
Superclasses, Subclasses, Inheritance • Classes are organized in a class hierarchy or class lattice • Object inherits attributes and methods of its class and all classes above it • Inheritance enables reusability • Single and multiple inheritance • Method overriding and polymorphism • Abstract data types, implemented as classes, provide support for complex objects
Hierarchical CODASYL (network) Relational Entity-Relationship Semantic Object-Oriented Extended Relational The Evolution of Data Models Physical data dependency Difficult to represent M:N relationships No ad hoc queries Access path predefined (navigational access) Provide ad hoc queries Set-oriented access Weak semantic contents Easy to understand Incorporates more semantics More semantics in data model Support for complex objects Inheritance
Characteristics of OODM • Supports complex objects • Enables the definition of abstract data types • Supports encapsulation • Exhibits inheritance • Supports the notion of object identity (OID)
Comparing OODM and ERDM OO Data Model E-R Model Object Class Instance Variable N/A OID Method Class hierarchy Entity Entity set Attribute Primary key N/A N/A E-R diagram
Object Diagrams SO Model from page 177