You are here

Relational Databases

27 August, 2015 - 16:45

Review Question

What are the relative advantages of the relational and object-oriented database models?


The relational database model is a logical model for a database in which data are logically organized in two-dimensional tables referred to as relations. We focus on the relational database model at this point because of its dominance in contemporary systems. (An alternative, the object-oriented model, is discussed in Technology Insight 3.3.) While there is a growing push toward object-oriented databases, the prevalence of large numbers of relational database-driven legacy systems makes such a switchover rather costly for most organizations. Many of these legacy systems (i.e., old systems that were developed using an organization’s previous computer hardware and software platforms) have been functioning reliably for decades. As an alternative to making costly switchovers to object-oriented databases, relational database vendors provide modified versions of their software that support objects within the relational structure. We anticipate that relational-based systems will remain dominant for the foreseeable future.


Technology Insight 3.3

Object-Oriented Database Model

In an object-oriented database model, both simple and complex objects can be stored through use of abstract data types, inheritance, and encapsulation. Let’s explain each of these concepts. The relational model focuses on the storage of text-based data. In object-oriented data models, these simple text-based data can be supplanted by non-text objects. For instance, storage of video clips or pictures could become attribute values in an object-oriented database. The use of abstract data types allows the user to define the data that will be stored in the database rather than having limitations placed during the database development process. Inheritance allows object subclasses of an object superclass (the equivalent to an entity in a relational database) to assume the same properties or attributes (attribute means the same in object-oriented terminology as it does in relational) as the object superclass, or in other words to inherit the attributes. The following figure demonstrates such an inheritance hierarchy with the superclass EMPLOYEE providing the same set of attributes to both subclasses—MANAGER and ADMIN_STAFF. In other words, every MANAGER would have a Name, Address, and Employee_No (as would every ADMIN_STAFF). Note that an object is drawn using a rectangle with rounded corners and is divided into three parts: the object name, the attributes, and any encapsulated methods (from top to bottom, respectively).

Encapsulation is the biggest difference in object-oriented database models. Encapsulation refers to the ability to build into the database model, as part of an object’s definition, programmed procedures that change that object’s value (i.e., any of the attribute values). At the same time, no other object can change the value of a given object, as this is controlled within each object. On the other hand, part of the encapsulation may be the querying of information from another object in order to have sufficient data by which to perform encapsulated operations.

Users usually don’t see much difference. Other than encapsulation, other characteristics of object-oriented models could be integrated into relational data models and are increasingly being integrated in commercial packages. The most successful integration tends to occur within relational models where attributes can be redefined to handle more complex object data.