What are different concepts and features of object-oriented databases? What is object relational model?

 OBJECT-ORIENTED DATABASE CONCEPTS

  • Object-oriented databases (OODB) are databases that represent data in the form of objects and classes. In object-oriented terminology, an object is a real-world entity, and a class is a collection of objects.
  •  Object-oriented databases follow the fundamental principles of object-oriented programming (OOP). The combination of relational model features (concurrency, transaction, and recovery) with object-oriented principles results in an object-oriented database model.
  •  Object-oriented databases add the database functionality to object programming languages, creating more manageable code bases.
  • The main goal of object-oriented databases is to combine the advantages of object-oriented technologies and traditional (relational) databases. 

  • Object-Oriented Databases - Examples
    • There is a wide range of object-oriented databases. Some of the most well know are:
      • Itasca
      • 02
      • Versant

      FUNDAMENTAL FEATURES OF OBJECT-ORIENTED DATABASE

      There is a certain set of basic concepts, supported by each object-oriented database system. These basic concepts are objects and identity, encapsulation, classes and instantiation, inheritance and overloading, overriding and late binding.


      Objects and Identity

      • In an object-oriented database, each real-world entity is represented by an object. This object has a state and behavior. The combination of the current values of an object's attributes defines the object's state. A set of methods, acting on an object's state, define the object's behavior. 
      • For example, let us consider a real-world entity called 'Student'. A student has states or properties such as a name, USN, date of birth, address, etc. Similarly, the student has behaviors or methods including attending classes, writing exams, paying fees, etc.
      • When it comes to identity, each object in the database is defined by a unique object identifier. 



      Encapsulation

      • Encapsulation is an important object-oriented feature. This hides the implementation details from the end-users and displays only the needed descriptions. For example, imagine that you are buying soap from a commercial store. You know its ingredients such as color and fragrance by looking at the box, but you aren't shown the actual method used to manufacture the soap.
      •  Encapsulation is a basic concept for all object-oriented technologies. It was created for making a clear distinction between the specification and the implementation of an operation and in this way for enabling modularity. Software that exceeds a certain size needs some sort of modular architecture for enabling design, implementation, and maintenance to be executed by a larger group of programmers.


      Classes and Instantiation

      • A class is a set of objects that have the exact same internal structure. In that way, a class defines the implementation of an object and a type describes the way the object can be used.
      • The term instantiation aims at the fact that a class definition can be used to generate a set of objects that share the same structure and behavior. A class specifies a structure (a set of attributes), a set of operations, and a set of methods, which implement the operations.
      • A feature, which is very important to the evolution of objects, is that an object can change its class. This means that an object can change its attributes and operations while keeping the same identity. Enabling class changes comes with the need for a mechanism for handling semantic integrity problems that may arise. Applications must deal with exceptions that may arise when an object is referred to as an instance of a class, different from the one expected.


      Inheritance

      • Inheritance makes it possible to define a class as a subclass of an already existing one (superclass). The subclass inherits all attributes and methods from the superclass and can additionally define its own attributes and methods.
      • This concept is an important mechanism for supporting reusability. Identical parts of the structure of two different classes may be defined only once in a common superclass. In this way, less code has to be written. There are some systems that allow a class to be a subclass of more than one superclass. This feature is called multiple inheritances (in contrast to single inheritance).


      Overloading, Overriding and Late binding.

      • Method Overloading is a Compile time polymorphism. In method overloading, more than one method shares the same method name with a different signature in the class. In method overloading, the return type can or can not be the same, but we have to change the parameter because, in java, we can not achieve the method overloading by changing only the return type of the method. OR,
      • Having methods of the same name and different signatures in scope, or we can say in a class, is known as method overloading. The unique signature of a method indicates that either it has a different number of parameters or different data types of parameters.
      • Its purpose is to increase the readability of the code, as different methods performing the same action can have the same name but a different number of arguments or different types of arguments, and to achieve compile-time polymorphism. 
      • Method Overriding is a Run time polymorphism. In method overriding, the derived class provides the specific implementation of the method that is already provided by the base class or parent class. In method overriding, the return type must be the same or co-variant (return type may vary in the same direction as the derived class).  OR,
      • Having two or more methods with the same name and signature as the method in the parent class is known as method overriding. Method overriding allows us to invoke functions from base class to derived class. So, we can also say that a technique that includes creating a method in the derived class that has the same name and signature as the method in the base class is known as method overriding. 
      • Its purpose is to achieve run-time polymorphism and to change the existing functionalities.
      • The feature that provides disables the system to bind names of operations to the corresponding methods at compile time. The delayed binding of operation names to the corresponding methods at run-time is called 'late binding'.

       Object-relational model

      •  Object-relational model is a combination of a Object-oriented database model and a Relational database model. So, it supports objects, classes, inheritance etc. just like Object Oriented models and has support for data types, tabular structures etc. like Relational data model.

      • One of the major goals of Object relational data model is to close the gap between relational databases and the object oriented practises frequently used in many programming languages such as C++, C#, Java, etc.

      Comments

      Popular posts from this blog

      Suppose that a data warehouse for Big-University consists of the following four dimensions: student, course, semester, and instructor, and two measures count and avg_grade. When at the lowest conceptual level (e.g., for a given student, course, semester, and instructor combination), the avg_grade measure stores the actual course grade of the student. At higher conceptual levels, avg_grade stores the average grade for the given combination. a) Draw a snowflake schema diagram for the data warehouse. b) Starting with the base cuboid [student, course, semester, instructor], what specific OLAP operations (e.g., roll-up from semester to year) should one perform in order to list the average grade of CS courses for each BigUniversity student. c) If each dimension has five levels (including all), such as “student < major < status < university < all”, how many cuboids will this cube contain (including the base and apex cuboids)?

      Suppose that a data warehouse consists of the four dimensions; date, spectator, location, and game, and the two measures, count and charge, where charge is the fee that a spectator pays when watching a game on a given date. Spectators may be students, adults, or seniors, with each category having its own charge rate. a) Draw a star schema diagram for the data b) Starting with the base cuboid [date; spectator; location; game], what specific OLAP operations should perform in order to list the total charge paid by student spectators at GM Place in 2004?

      Discuss classification or taxonomy of virtualization at different levels.