High Availability Data Replication of shared objects for User Defined Functions.
Original Publication Date: 2005-Oct-06
Included in the Prior Art Database: 2005-Oct-06
In Object relational databases, it is common to have user defined functions written in C, C++ languages. The shared objects created for these will be loaded by the database system at runtime. Typically, these shared objects are stored in file systems. When the function is created with the database server, the path on the file system is specified; at runtime shared object will be loaded from that location. However, this doesn't work when the database system is configured in high-availability data replication scenario. The system will simply replicate the catalog entries and shared object is left on the file system. This article proposes a mechanism to load the shared objects into binary large objects so the function -- definition and runtime objects -- is completely managed and replicated by the database system.
High Availability Data Replication of shared objects for User Defined Functions .
User Defined Functions: In object-relational database systems like IBM Informix, IBM DB2, Oracle 9i application developers can write user defined functions(UDF) in programming languages like C, C++ apart from SQL user defined functions (sometimes called stored procedures.). The UDFs thus written can be used in SQL practically anywhere a table's column can be referenced.
Here is an example: using IBM Informix SQL Syntax:
-- Given a date, this routine returns a name of the day in string. create function dt2day(x datetime) returns varchar(20) external name '/myapps/dt.so(date2dayoftheweek)' languag c;
> execute function dt2day('Oct-02-2003');
> select dt2day(saledt) dayofthewk , store, location
where saledt is between 'Oct-01-2003' and 'Oct-05-2003'
group by saledt;
The UDF can be used in projection list, where clause and special types of UDFs known as table functions or integrators can be used in from clause of select statement.
The UDFs can also be executed discretely (separately).
High Availability Data Replication (HDR): Currently implemented in IBM Informix Database Engine.
High Availability Data Replication is a unique feature of IBM Informix Database Server that provides high availability of data using a standby instance of the server. In HDR there are two servers - Primary and Secondary (standby). Primary server provides full functionality of a database server. Secondary server, which is replica of Primary server, is read only server and supports read only queries from clients. When two servers are up and running and HDR is operational, primary server sends logs to secondary server to keep it up to date.
Large-Object allow the database server to store extremely large column values, such as images and documents, independently of the column. Smart-Large-Object are category of large object with maximum size of 2^62 bytes that support transactions, random access to the data and are also recoverable. Smart-Large-Object are defined as BLOB and CLOB data type in IBM Informix Database Server.
A space is a logical entity where server data are stored. For different types of data, IBM
IDS server supports different type of space. Smart-Large-Objects are stored in the special space called Smart-Blob space (or sbspace).
Following documents provides detailed information on HDR and Smart-Large-Object
· Administrator's Guide for Informix Dynamic Server, Version 9.3, Chapter 19 & 20)
· Informix Guide to Database Design and Implementation, Version 8.3/9.3
· IBM Informix guide to SQL: Tutorial, Version 8.3/9.3
· Informix Guide to SQL: Syntax, Version 8.3/9.3
Currently, HDR does not replicate data stored in operating system files or persistent external files associated with user -defined routines. User-defined types, user-defined routines, and DataBlade modules have special installation and registration...