0% found this document useful (0 votes)
44 views18 pages

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) combines relational and object-oriented concepts. It supports objects, classes and inheritance directly in the database schema and query language. This bridges the gap between relational databases and object-oriented programming. The ORD extends the functionality of traditional DBMS products significantly by allowing developers to embed new classes of data objects into the relational data model. ORDMSs are implemented as a central server rather than a distributed architecture and support an extended version of SQL.

Uploaded by

mallaiah.v
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
44 views18 pages

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) combines relational and object-oriented concepts. It supports objects, classes and inheritance directly in the database schema and query language. This bridges the gap between relational databases and object-oriented programming. The ORD extends the functionality of traditional DBMS products significantly by allowing developers to embed new classes of data objects into the relational data model. ORDMSs are implemented as a central server rather than a distributed architecture and support an extended version of SQL.

Uploaded by

mallaiah.v
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 18

ORDBMS

A new technology has develop in which relational and


object-oriented concepts have been combined or
merged. These systems are called object-relational
database systems.

The basic goal for the Object-relational database is to bridge the


gap between relational databases and the object-oriented
modeling techniques used in programming languages such as
Java, C++, Visual Basic .NET or C#.
ORDBMS

•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.

 CREATE TABLE Employees (


 Name PersonName NOT NULL,
 DOB DATE NOT NULL,
 Salary Currency NOT NULL,
 Address StreetAddress NOT NULL PRIMARY KEY ( Name, DOB )

 );

 Listing 1–3. OBJECT-RELATIONAL Version of Employees TABLE


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.”

INSERT INTO SendPage


( Pager_Number, Pass_Code, Message )
SELECT E.Pager_Number,E.Pass_Code,Print(E.Name) ||': Call 1-800-
TEMPS-R-US for immediate INFORMIX DBA
job'
FROM Temporary_Employees E
WHERE Contains (GeoCircle('(-122.514, 37.221)',
'60 miles')),
E.LivesAt )
AND DocContains ( E.Resume,'INFORMIX and Database Administrator')
AND NOT IsBooked ( Period(TODAY, TODAY + 7),
E.Booked );
 Listing 1–6. OBJECT-RELATIONAL Query ILLUSTRATING EXTERNAL Systems INTEGRATION
In A SQL-92 DBMS, SENDPAGE could be only A TABLE. The effect of this query would then be to insert some rows into
the SENDPAGE TABLE. However, in AN ORDBMS, SENDPAGE might ACTUALLY be AN ACTIVE TABLE, which is AN interFACE to
the COMMUNICATIONS system used to send elec- tronic MESSAGES. The effect of this query would then be to
communiCATE with the MATCHING TEMPORARy workers!

 relational database have the four characteristies:


• Base datatype extension
• Complex objects
• Inheritance
• A rule system
Base datatype extension
• The ability to create a new base type is necessary in many situations,
• Both simple and complex ADT is very useful.
• In this way the design of the application will be smarter and easier.
 The base type extension facility must have the following characteristics:
• Dynamic linking: It must be possible to adhere new user defined base types on the fly. Stopping the database for
installing new types, is not acceptable.
• Client or server activation: A user defined function for a new base type must have the ability for being executed on either
the server or the client.
• Security: A user defined function for a new base type must not be able to corrupt the database.
Callback: User defined functions must be able to use other functions/stored procedures/queries in the same way as other
applications.
User defined access methods: Adding new access methods must be allowed for the designer of a new base type. It must be
possible to add function that Is used by the database engine. Not all data types is well suited for B-trees.
Arbitrary length data types: It must be possible to have user defined data types without length restrictions.

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.

An ORDBMS Database Design

• An ORDBMS supports a much better solution.

• 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.

By implementing A DATABASE THAT constitutes A better model of the APPLICATION’s problem


DOMAIN the inforMATION system CAN be MADE to provide more flexibility AND FUNCTIONALITY AT
lower development cost.

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

ARRAY: ordered 1D array with maximum number of elements without duplicates.

LIST: ordered collection that allows duplicates.

SET: unordered collection without duplicates.

MULTISET: unordered collection that allows duplicates.

Storage and access methods

• 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).

User-Defined Aggregation Functions


Aggregation: the formation of a number of things into a cluster.

• 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.

Indexing New Types

• 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

You might also like