Main Features and Advantages Object-Relational Database systems ( ORDBMS )
An object-relational database is a database management system similar to a relational database, but with an object-oriented database model: objects, classes and inheritance are directly supported in database schemas as well as within the query language. The popular RDBMS on the market today is Oracle. For the main features of Object-relational database systems are listed below:
User Data Types & Complex Objects
Complex data creation in most SQL ORDBMSs is based on preliminary schema definition via the user-defined type (UDT). Object-Relational Database Managerment Systems (ORDBMSs) allow users to define datatypes, functions and operators. As a result, the functionality of the ORDBMSs increases along with their performance.
create or replace type point as object( x number, y number ) create or replace type side as object( a point, b point, member function get_length return integer );
Inheritance
In all ORDBMS, inheritance of user defined types is supported to derive new sub-types or sub-classes which would therefore inherit all attributes and methods from the parent type.
create or replace type eshape_tp under shape_tp( OVERRIDING MEMBER FUNCTION get_area return integer )
Method Encapsulation
Methods are procedures or functions can be encapsulated within the defined object so that applications can use to perform operations on the attributes of the object type. Methods are optional. They define the behavior of objects of that type.
create or replace type side as object( a point, b point, member function get_length return integer ); create or replace type body side as member function get_length return integer is begin return sqrt( ((self.a.x-self.b.x)*(self.a.x-self.b.x)) + ((self.a.y-self.b.y)*(self.a.y-self.b.y)) ); end; end;