A New Technology Has in Which Relational and Object-Oriented Concepts Have Been Combined or Merged. These Systems Are Called
A New Technology Has in Which Relational and Object-Oriented Concepts Have Been Combined or Merged. These Systems Are Called
•An object-relational database (ORD), or object-relational database management system (ORDBMS), is a database
management System (DBMS) similar to a relational database, but with an object oriented database model: objects, classes
and inheritance are directly supported in database schema and in the query language.
• ORDBMSs reuse the RELATIONAL model AS SQL construct it, the OR DATA model is opened up in
novel WAYS.
• New DATA types AND functions CAN be implemented using GENERAL-PURPOSE LANGUAGES such AS C AND
JAVA. In other words,
• ORDBMSs ALLOW developers to embed new CLASSES of DATA objects into the RELATIONAL DATA model
ABSTRACTION
• An ORDBMS supports an extended form of SQL called SQL3 that is still in the development stages. The extensions are
needed because ORDBMSs have to support ADT's.
• The ORDBMS has the relational model in it because the data is stored in the form of tables having rows and columns and SQL
is used as the query language and the result of a query is also table or tuples (rows).
ORDBMSs ARE implemented AS A CENTRAL server PROGRAM RATHER THAN AS A distributed DATA ARCHITECtures TYPICAL in OODBMS products. However,
ORDBMSs extend the FUNCTIONALITY of DBMS products SIGNIFICANTLY, AND AN inforMATION system using AN ORDBMS.
To see WHAT this looks such AS, consider AGIAN the Employees EXAM- ple. Using AN ORDBMS, you
would represent this DATA AS SHOWN in Listing 1–3.
);
In the OBJECT-RELATIONAL TABLE, READERS FAMILIAR with RDBMSs should recognize the DATE type,
but the other column types ARE completely new. From AN object-oriented point of view, these types correspond to
CLASS NAMES, which ARE SOFTWARE modules THAT ENCAPSULATE STATE AND BEHAVIOR.
As ANOTHER EXAMPLE of the ORDBMS DATA model’s new FUNCTIONALITY, consider “Send A PAGE to ALL TEMPORARy_
Employees living within 60 miles of the coordi- NATES (-122.514, 37.221), whose resumes includes references to both
INFORMIX AND ‘DATABASE ADMINISTRATOR,’ AND who ARE not booked for the period between TODAY AND seven DAYS
AHEAD.”
Complex objects
There have to be support of a rich collection of complex types. At least there must be the following complex types:
Type constructors
Set of
Record of
Reference
A user defined functions must have support for use of complex types. Like user defined types, complex data types must
have arbitrary length.
Inheritance
Data and function inheritance: A major characteristic of ORDBMS is according to support for inheritance. Both data and
functions inheritance is necessary. Inheritance of data only apply to datatypes. The most powerful inheritance comes
from inheritance of functions.
Overloading: it should be possible to specialize the definition of a function to subtypes. Overloading must be supported.
Multiple inheritance: Multiple inheritances must be supported. It is needed In many application. Using a virtual attribute, a
user can reference the placement of a function, where there is multiple inheritance.
A rule system
Rules and triggers must exist in the ORDBMS and should have the following characteristics according to:
Events and actions: rules and triggers are very useful in most application systems, they are often used to ensure the
consistency of the database.
The general form is : on event do action. Rule system must include the capability of executing the action just before or just
after the event is processed. On event do action is a generalized trigger.
Triggers normally only supports update/insert/delete if necessary.
Integration of rules with inheritance and type extension. The rules system should be totally integrated with the other
object relational concepts.
Rich execution semantics for rules. The rule system must have ability to support different kinds of actions i.e immediate
and same transactions.
• First, we can store the video as an ADT object and write methods that capture any special manipulation we wish to perform.
• Second we are allowed to store structured types such as lists, we can store the location sequence for a probe in a single
tuple, along with the video information.
• This layout eliminates the need for joins in queries that involve both the sequence and video information.
Object identity
• Now we discuss some of the consequences of using reference types or object identitys.
• The use of object identity is especially significant when the size of the object is large, either because it is a structured data
type or because it is big object such as an image.
• Although reference types and structured types seems similar, they are actually quite different.
OBJECT-RELATIONAL DBMS APPLICATIONS
Extensible DATABASES provide A SIGNIFICANT boost for developers build- ing TRADITIONAL business
DATA processing APPLICATIONS.
The IMPORTANT effect of the technology is THAT it MAKES it possible to build inforMATION
systems to ADDRESS DATA MANAGEMENT problems USUALLY considered to be too difficult.
One WAY to CHARACTERIZE APPLICATIONS in which AN OBJECT-RELATIONAL DBMS is the best
PLATFORm is to focus on the kind of DATA involved. For thirty YEARS, SOFTWARE engineers HAVE used
the term “DATA entry” to describe the process by which inforMATION enters the system. HUMAN
users enter DATA using A KEYBOARD.
TODAY MANY inforMATION systems employ electronics to CAPTURE inforMATION. Video
CAMERAS,
environMENTAL sensors,
AND SPECIALIZED monitoring equipment record DATA in rich MEDIA SYSTEMS, INDUSTRIAL
routing APPLICATIONS, AND MEDICAL IMAGING systems. OBJECT-RELATIONAL DBMS technology
excels AT this kind of APPLICATION.
Collection Types
• Since object relational databases store new types of data, ORDBMS implementers need to revisit some of the storage and
indexing issues.
• In particular, the system must efficiently store ADT objects and structured objects and provide efficient indexed access to
both.
Query processing
• ADTs and structured types call for new functionality in processing queries in ORDBMSs. They also change a number of
assumptions that affect the efficiency of queries.
• In this section we look at two functionality issues (user defined aggregates and security) and two efficiency issues (method
caching and pointer swizzling).
• Most ORDBMSs allow users to register new aggregation functions with the system.
• To register an aggregation function, a user must implement three methods which we call initiaIize, iterate, and terminate.
• The initialize method initializes the internal state for the aggregation.
• The iterate method updates that state for every tuple .
• As an example, consider an aggregation function to compute the second-highest value in a field.
• the initialize call would allocate storage for the top two values, the iterate call would compare the current tuple's
value with the top two and update the top two as necessary, and
• the terminate call would delete the storage for the top two values returning a copy of the second- highest value.
Method security
• A buggy or malicious ADT method can bring down the database server or even corrupt the database.
• The DBMS must have mechanisms to prevent buggy or malicious user code from causing problems.
Method caching
• User-defined ADT methods can be very expensive to execute and can account for the bulk of the time spent in processing a
query.
• During query processing, it may make sense to cache the results of methods, in case they are invoked multiple times with the
same argument.
• An alternative is to maintain a cache of method inputs and matching outputs as a table in the database.
• Then, to find the value of a method on particular inputs, we essentially join the input tuples with the cache table.
• These two approaches can also be combined.
Pointer swizzling
• In some applications, objects are retrieved into memory and accessed frequently through their object identity;
• dereferencing must be implemented very efficiently.
• Some systems maintain a table of object identity of objects that are (currently) in memory.
when an object O is brought into memory, they check each object identity contained in 0 and replace object identity of in-
memory objects by in-memory pointers to those objects. This technique, called pointer swizzling, makes references to in-
memory objects very fast.
• One important reason for users to place their data in a database is to allow for efficient index via indexes.
• Unfortunatly, the standard RDBMS index structures support only equality conditions.
• An important issue for ORDBMSs is to provide efficient indexes for ADT methods and operators on structured objects.
Query Optimization
Challenge: New indexes and query processing techniques increase the options for query optimization.
But, the challenge is that the optimizer must know to handle and use the query processing functionality properly.
Solution: While constructing a query plan, an optimizer must be familiar to the newly added index structures.
Advantages of ORDBMSs
• Reuse and Sharing: The main advantages of extending the Relational data model come from reuse and sharing.
• Reuse comes from the ability to extend the DBMS server to perform standard functionality centrally, rather than have it coded
in each application.
• Increased Productivity: ORDBMS provides increased productivity both for the developer and for the, end user.
• Support powerful query language: An ORDBMS support an extended form of SQL referred nested objects, set valued
attributed, inclusions of methods/functions and query involving abstract data types. For example: SQL 3, SQL/CLI etc.
• Support object views: Object views can be used to build virtual objects from a relational data thereby enabling
programmers to evolve existing
schemas to support objects. This allows relational and object applications to co-exist on the same database.
• Reduce application development time: In ORDBMS object type declarations can be reused via inheritance makes schema
definition more natural.
Disadvantages of ORDBMSs
• Complexity: ORDBMS design is more complicated because we have to consider not only the underlying design
consideration of application semanties and dependencies in the relational data model but also the object oriented nature.
• Immature: since ORDBMS concepts is new and it still needs to be defined so it is not yet accepted globally. Also it is relative
unproven.
• Increased cost: Because of the variety in data types in ORDBMS and associated operators, efficient storage and access of
the data is important which increases the cost.
Comparison
Thank you