Chapter 24 Introduction to Object DBMSs Prepared by Ajay pashankar
Object Oriented DBMS History <ul><li>Object-oriented model popularized in programming languages Simula 67, Smalltalk, C++,...
The weakness of RDBMSs <ul><li>Poor representation of  ‘ real world ’  entities.  The process of normalization generally l...
The weakness of RDBMSs (cont) <ul><li>Homogeneous data structure. The fixed structure is too restrictive for many  ‘ real ...
New database applications <ul><li>Traditional applications had these properties: </li></ul><ul><ul><li>Uniformity </li></u...
New database applications (cont) <ul><li>New applications requiring more complex info: </li></ul><ul><ul><li>Computer-aide...
Why consider these new applications? <ul><li>The following have made them feasible(they were out of reach in the 70s): </l...
Object Oriented data Model <ul><li>Object is similar to an entity in ER model. If we are to implement Object Oriented DBMS...
What is encapsulation? <ul><li>Encapsulation means that an object contains both the data structure and the set of operatio...
Other OOP concepts <ul><li>Abstraction: Abstraction is the process of identifying the essential aspects of an entity and i...
Object Oriented data Model(cont) <ul><li>Object: A uniquely identifiable entity that contains both the attribute that desc...
Objects <ul><li>Variables can be </li></ul><ul><ul><li>Atomic values (like character, integer number, boolean value) </li>...
Objects (cont) <ul><li>Object classes. Objects that have the same attributes and respond to the same messages can be group...
class timeSeries { /* variables */ List* entryList; /* list of elements */ time beginning; time ending; elementDescriptor ...
Inheritance <ul><li>Inheritance allows one class to be defined as a special case of  a more general class. </li></ul><ul><...
Polymorphism <ul><li>Objects of different types can respond to same message, e.g.  “ print(), ”  in different ways. </li><...
Object Identity <ul><li>An object in an Object Oriented Database remains the same object even if some or all of its attrib...
Object containment <ul><li>Same as aggregation concept in ER model </li></ul><ul><li>Part-of hierarchy </li></ul>
Other Object Oriented techniques <ul><li>Overloading: allows the name of a method to be reused within a class definition o...
Persistent Programming Languages <ul><li>Standard programming languages only allow storing persistent (permanent) informat...
Persistent Programming Languages (cont) <ul><li>Problem known as impedance mismatch </li></ul><ul><li>Idea: allow programm...
Persistent Programming Languages (cont) <ul><li>Allows simpler creation and manipulation of persistent objects </li></ul><...
Making Objects Persistent <ul><li>Typically, persistence or non-persistence is specified at object creation time. </li></u...
Some OODBs Have Limited Query Capability <ul><li>E.g. (similar to ObjectStore query) </li></ul><ul><li>class emp {int eno,...
Some OODBs Have Limited Query Capability (cont) <ul><li>collection<emp> * result; </li></ul><ul><li>result = {: x in empco...
Complex Objects <ul><li>Sometimes we need object that consists of subobjects or components. A complex object is an item th...
Summary <ul><li>Object Oriented DBs designed to support new application areas  –  multi-media, CAD, CASE, GIS etc. </li></...
Upcoming SlideShare
Loading in...5
×

Introduction to odbms

1,013

Published on

Introduction to odbms

Published in: Education, Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,013
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
64
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Introduction to odbms

  1. 1. Chapter 24 Introduction to Object DBMSs Prepared by Ajay pashankar
  2. 2. Object Oriented DBMS History <ul><li>Object-oriented model popularized in programming languages Simula 67, Smalltalk, C++, Java </li></ul><ul><li>Earlier database models(hierarchical, network, relational) focused on record-oriented information </li></ul><ul><li>New database applications need more & better support for complex data. </li></ul>
  3. 3. The weakness of RDBMSs <ul><li>Poor representation of ‘ real world ’ entities. The process of normalization generally leads to the creation of relations that do not corresponds to entities in the ‘ real world ’ . </li></ul><ul><li>Semantic overloading, namely there is no mechanism to distinguish between entities and relationships, or to distinguish between different kinds of relationship that exist between entities. </li></ul><ul><li>Poor support for integrity and enterprise constraints. </li></ul>
  4. 4. The weakness of RDBMSs (cont) <ul><li>Homogeneous data structure. The fixed structure is too restrictive for many ‘ real world ’ objects that have a complex structure, and it leads to unnatural joins, which are inefficient. </li></ul><ul><li>Limited Operations. It only has a fixed set of operations such as set and tuple – oriented operations, operations that are provided in the SQL specification. </li></ul><ul><li>Difficulty handling recursive queries </li></ul><ul><li>Impedance mismatch </li></ul>
  5. 5. New database applications <ul><li>Traditional applications had these properties: </li></ul><ul><ul><li>Uniformity </li></ul></ul><ul><ul><li>Record orientation </li></ul></ul><ul><ul><li>Small data items </li></ul></ul><ul><ul><li>Atomic fields </li></ul></ul>
  6. 6. New database applications (cont) <ul><li>New applications requiring more complex info: </li></ul><ul><ul><li>Computer-aided design(CAD). A CAD database stores data relating to mechanical and electrical design covering objects like buildings, IC circuits. </li></ul></ul><ul><ul><li>Computer-aided software engineering(CASE). A CASE database stores data relating to the stages of the software development lifecycle planning. </li></ul></ul><ul><ul><li>Office information systems (OIS). An OIS database stores data relating to the computer control of information in a business including emails, invoices, etc. </li></ul></ul>
  7. 7. Why consider these new applications? <ul><li>The following have made them feasible(they were out of reach in the 70s): </li></ul><ul><ul><li>Faster CPUs </li></ul></ul><ul><ul><li>Larger main memories </li></ul></ul><ul><ul><li>Larger disks </li></ul></ul><ul><ul><li>Better, faster networks </li></ul></ul><ul><ul><li>Lower cost for all of the above! </li></ul></ul>
  8. 8. Object Oriented data Model <ul><li>Object is similar to an entity in ER model. If we are to implement Object Oriented DBMSs in Java, for each entity, we will create a class for it. </li></ul><ul><li>Object Oriented concept centers around encapsulating both data and procedures for operation on data as a single unit. </li></ul>
  9. 9. What is encapsulation? <ul><li>Encapsulation means that an object contains both the data structure and the set of operations that can be used to manipulate it. Often cases, adopting encapsulation hides the implementation from the users do not necessarily have to know the detail of it. </li></ul>
  10. 10. Other OOP concepts <ul><li>Abstraction: Abstraction is the process of identifying the essential aspects of an entity and ignoring the unimportant properties. </li></ul><ul><li>Information Hiding: We separate the external aspects of an object from its internal details, which are hidden from the outside world. </li></ul>
  11. 11. Object Oriented data Model(cont) <ul><li>Object: A uniquely identifiable entity that contains both the attribute that describe the state of a ‘ real world ’ object and the actions that are associated with it. </li></ul><ul><ul><li>Set of variables </li></ul></ul><ul><ul><li>Set of methods (code to execute in response to messages). This is the main difference from the ER model. </li></ul></ul>
  12. 12. Objects <ul><li>Variables can be </li></ul><ul><ul><li>Atomic values (like character, integer number, boolean value) </li></ul></ul><ul><ul><li>Objects (other user defined objects). </li></ul></ul><ul><ul><li>Reference to other objects </li></ul></ul>
  13. 13. Objects (cont) <ul><li>Object classes. Objects that have the same attributes and respond to the same messages can be grouped together to form a class </li></ul><ul><ul><li>Define object type (structure and behavior) </li></ul></ul><ul><ul><li>An object is an instance of a class </li></ul></ul><ul><ul><li>Sometimes associated with a collection of all instances in class </li></ul></ul>
  14. 14. class timeSeries { /* variables */ List* entryList; /* list of elements */ time beginning; time ending; elementDescriptor elemDesc; /* element type descriptor */ /* messages */ elementDescriptor getElementType(); Tuple getFirstElement(); Tuple getLastElement(); Tuple getFirstElementAfter(time t); } Example Object class
  15. 15. Inheritance <ul><li>Inheritance allows one class to be defined as a special case of a more general class. </li></ul><ul><li>The types of inheritance are </li></ul><ul><ul><li>IS-A hierarchy idea </li></ul></ul><ul><ul><li>Single inheritance </li></ul></ul><ul><ul><li>Multiple inheritance </li></ul></ul><ul><ul><li>Repeated inheritance. A special case of multiple inheritance in which the super class inherit from a common super class. </li></ul></ul><ul><ul><li>Selective inheritance. </li></ul></ul>
  16. 16. Polymorphism <ul><li>Objects of different types can respond to same message, e.g. “ print(), ” in different ways. </li></ul><ul><li>Makes it possible to develop general, extensible software systems. </li></ul><ul><li>It has three types: operation, inclusion and parametric. </li></ul><ul><li>More important than inheritance </li></ul>
  17. 17. Object Identity <ul><li>An object in an Object Oriented Database remains the same object even if some or all of its attribute values change. It is a key part of the definition of an object. </li></ul><ul><li>Not the same as relational DBMS, where a data vale is used for identity. </li></ul><ul><li>Object-oriented databases use an internally-generated object identifier to uniquely identify an object. </li></ul>
  18. 18. Object containment <ul><li>Same as aggregation concept in ER model </li></ul><ul><li>Part-of hierarchy </li></ul>
  19. 19. Other Object Oriented techniques <ul><li>Overloading: allows the name of a method to be reused within a class definition or across definitions. This is a special case of the more general concept of polymorphism. </li></ul><ul><li>Overriding: a special case of overloading which allows the names of a property to be redefined in a subclass </li></ul><ul><li>Dynamic binding: Allows the determination of an object ’ s type and methods to be deferred until runtime. </li></ul>
  20. 20. Persistent Programming Languages <ul><li>Standard programming languages only allow storing persistent (permanent) information which could be in files or in a database via a database API. </li></ul><ul><li>In either case, format of objects in persistent storage is different than format in memory </li></ul>
  21. 21. Persistent Programming Languages (cont) <ul><li>Problem known as impedance mismatch </li></ul><ul><li>Idea: allow programming language objects to be persistent. </li></ul><ul><li>Persistent versions of Pascal, Smalltalk, C++ have been developed </li></ul>
  22. 22. Persistent Programming Languages (cont) <ul><li>Allows simpler creation and manipulation of persistent objects </li></ul><ul><li>Drawbacks: </li></ul><ul><ul><li>Since language is powerful, it is easy to make errors that damage Database </li></ul></ul><ul><ul><li>Hard to optimize I/O access made by database application </li></ul></ul>
  23. 23. Making Objects Persistent <ul><li>Typically, persistence or non-persistence is specified at object creation time. </li></ul><ul><li>E.g. </li></ul><ul><li>class foo {int a; float y;} </li></ul><ul><li>persistent collection foo_coll<foo>; </li></ul><ul><li>foo *x, *y; </li></ul><ul><li>x = new foo(); //non-persistent </li></ul><ul><li>y = new (foo_coll) foo(); //persistent </li></ul>
  24. 24. Some OODBs Have Limited Query Capability <ul><li>E.g. (similar to ObjectStore query) </li></ul><ul><li>class emp {int eno, char [20] name, dept </li></ul><ul><li>*d}; </li></ul><ul><li>class dept {int dno, char[20]name}; </li></ul><ul><li>persistent collection<emp>empcoll </li></ul>
  25. 25. Some OODBs Have Limited Query Capability (cont) <ul><li>collection<emp> * result; </li></ul><ul><li>result = {: x in empcoll || x -> d.dnp = 10:] </li></ul><ul><li>Less opportunity for optimization than in a relational DBMS with SQL </li></ul>
  26. 26. Complex Objects <ul><li>Sometimes we need object that consists of subobjects or components. A complex object is an item that is viewed as a single object in the ‘ real world ’ but combines with other objects in a set of complex A-PART-OF relationships. The objects contained may themselves be complex objects, resulting in an A-PART-OF hierarchy. </li></ul>
  27. 27. Summary <ul><li>Object Oriented DBs designed to support new application areas – multi-media, CAD, CASE, GIS etc. </li></ul><ul><li>Object = data + methods </li></ul><ul><li>Inheritance, object containment </li></ul><ul><li>Persistent programming languages </li></ul><ul><li>OODBs have limited query capability </li></ul><ul><li>Advantages and disadvantages of OODBs. </li></ul><ul><li>Next Generation DBMSs: Object-Oriented Data Model and Object-Relational Data Model </li></ul>
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×