what is object oriented database ? ODBMS An object-oriented database management system (OODBMS), sometimes shortened to ODBMS for object database management system, is a database management system (DBMS) that supports the modelling and creation of data as objects.
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
what is object oriented database ?
ODBMS
An object-oriented database management system (OODBMS), sometimes shortened to ODBMS for object database management system, is a database management system (DBMS) that supports the modelling and creation of data as objects.
ODBMS
ODBMS includes some kind of support for classes of objects and the inheritance of class properties and methods by subclasses and their objects.
There is currently no widely agreed-upon standard for an OODBMS, and OODBMS products are considered to be still in their imature stage.
In the meantime, the object-relational database management system (ORDBMS), the idea that object-oriented database concepts can be superimposed on relational databases, is more commonly available products.
An object-oriented database interface standard is being developed by an industry group, the Object Data Management Group (ODMG).
ODBMS
ODBMS
Object Data Management Group has set a standard for Object Databases (version 3.0).
ODL - Object Definition Language
OML - Object Manipulation Language
Typical Applications for ODBMS:- Computer-aided design (CAD)- Computer-aided software engineering
(CASE)- Multimedia databases
--- Images, video, games, etc.
- Office automation systems (OIS)- Expert database systems
ODBMS
OBJECT STRUCTURE
Objects basically consist of the following:
Attributes - Attributes are data which defines the characteristics of an object. This data may be simple such as integers, strings, and real numbers or it may be a reference to a complex object.
Methods - Methods define the behavior of an object and are what was formally called procedures or functions.
ODBMS
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.
ODBMS
Object Identity
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).
ODBMS
Object Identity - Implementation 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.
ODBMS
Methods and Messages
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.
ODBMS
ODBMS
Object Showing Attributes and Methods
Class Instance Share Attributes and Methods
Subclasses, Superclasses, and Inheritance
• 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.
ODBMS
Single Inheritance
ODBMS
Multiple Inheritance
ODBMS
Repeated Inheritance
ODBMS
Class Hierarchy
class person{
string name;string address:};
class customer isa person {int credit-rating;};
class employee isa person {date start-date;int salary;};
class officer isa employee {int office-number,int expense-account-
number,};
ODBMS
OODBMS vs RDBMS RDBMS have been around for more than 20 years, OODBMS are relatively new.
RDBMS can handle >1010 records, OODBMS up to 107.
OODBM good for storing complex descriptions (e.g., a plant schematic), RDBMS appropriate for simple, “flat” data.
RDBMS control the DB market (>90%), OODBMS own <5% of the market.
Most commercial RDBMS come with an “Object-Relational” extension which implements an object database on top of a RDBMS.
OODBMS vs RDBMS
ODBMS
InheritanceType hierarchy
- System permits the definition of new types based on other existing types– A subtype inherits all properties of its supertype
– A sub-class C’ of a class C is a collection of objects such that each object in C’ is also an object in C.– An object in C’ inherits all properties of C
Class hierarchy
- Multiple inheritance (inherits from more than just one superclass)- Selective inheritance (inherits only some of the properties of a superclass)
ODBMS
Persistent Programming languages allow objects to be created and stored in a database, and used directly from a programming language
Allow data to be manipulated directly from the programming language
- No need to go through SQL.
Persistent Programming LanguagesPersistent Programming Languages
No need for explicit format (type) changes
- Format changes are carried out transparently by system
- Without a persistent programming language, format changes becomes a burden on the programmer
– More code to be written
– More chance of bugs
Persistent Programming LanguagesPersistent Programming Languages
Allow objects to be manipulated in-memory
- no need to explicitly load from or store to the database
- Saved code, and saved overhead of loading/storing large amounts of data
Persistent Programming LanguagesPersistent Programming Languages
Drawbacks of persistent programming languages
Due to power of most programming languages, it is easy to make programming errors that damage the database.
Complexity of languages makes automatic high-level optimization more difficult.
Do not support declarative querying as well as relational databases
Persistent Programming LanguagesPersistent Programming Languages