Objectrieve Documentation

Here is a tool that would help you develop applications handling non-conventional, unstructured and large data in addition to conventional and structured data that fits a record-and-file metaphor.

What is ISAM?
So, What is ObjecTrieve?
ObjecTrieve function calls
What has ObjecTrieve to offer you?
Another exciting feature of ObjecTrieve : The BLOB Manager
Applications for BLOB `s
Capabilities of the BLOB Manager

With ObjecTrieve, you can build very powerful data management applications with C and C++ programming languages. ObjecTrieve complies and extends the X/OPEN standard; apart from supporting standard data types, ObjecTrieve allows the user to extend the data types allowing User definable Data Types (UDTís). This immensely powerful feature makes ObjecTrieve suitable for building a wide variety of customised applications.


ObjecTrieve is available under UNIX (Intel & RISC platforms) and Win95.
ObjecTrieve used and trusted by
Telco C-DAC
National Peroxide Kirloskar Computer Services
State Bank Of Hyderabad State Bank Of Mysore
The Aeronautical Development Agency The Aeronautical Development Agency


Ö and many more


ObjecTrieve Version 4.0 is an ISAM file manager developed and supported by COSOFT India Ltd.(Formerly Coromandel Software Ltd.). COSOFT is Indiaís premier software company specializing in the field of database management and related tools.

ObjecTrieve is available as a DLL in Windows 95 and as a library or server in UNIX. ObjecTrieve conforms to the X/Open standard and has some additional calls to handle binary large objects.

This tool is aimed at programmers who need to develop applications which create, maintain or update database files. Developers are expected to be experienced C programmers and have some knowledge about shared memory, semaphores and file system.

What is ISAM?

ISAM stands for Index Sequential Access Method for Data Management. Accessing data from a flat system file is a time consuming task especially when there exists huge amounts of data. These records can be accessed only sequentially, so if one wants to access a record which is almost in the middle of a file of size 100 MB, then accessing this file sequentially will take minutes. When deleting records one also faces the problem of managing the free slots made available by the deleted record so that the slots can be reused for the subsequent writing of new records. An ISAM package solves all these problems for a user.

Index Retrieval

Since a sequential search is time consuming, a random access is the preferred method of search. Keys are introduced for this purpose. A small section of the record or a collection of such sections can be treated as a key for the record. For example if a telephone directoryís entries are considered as records, then the name and initials can be treated as one key and telephone number as another key. Extracting keys from all records in the file, an index is formed for the ISAM file. This index is maintained in the form of a B+ tree so that any random access, and from that a sequence access, is possible.

So, What is ObjecTrieve?

ObjecTrieve is an advanced ISAM file manager, in the form of a library of C functions that efficiently manage your ISAM files. ObjecTrieve allows a developer to build powerful database management applications that allow direct and fast access to records.

It allows a developer to build these powerful data management application with C , C++ or Visual C++. It is available under SCO UNIX, other flavours of UNIX and Windows 95. This enables a developer to build applications that can easily be ported across these environments.

ObjecTrieve files are maintained in a partition allocated by Ďobadminí, which is an administrative utility which comes along with the ObjecTrieve distribution. ObjecTrieve provides a set of functions which manage ObjecTrieve files. These functions isolate a developer from the internal structures of the file. A program views data stored in an ObjecTrieve file as a set of records. Each record contains similar data, a set of logically related data elements. If one wants, he or she can arrange these sequence as a group of fields. Each field contains data of one of the data types supported by ObjecTrieve.

ObjecTrieve function calls

ObjecTrieve calls are divided into the following categories

Connection management File management
Index management Data management
BLOB management Transaction management
Concurrency management Miscellaneous

A brief description of the function in each category is given below. Some calls are included in more than one category as they provide features relevant to multiple categories.

Connection Management

obconnect Start an ObjecTrieve session

obdisconnect End an ObjecTrieve session

File Management

Obbuild Build an ObjecTrieve file without field information

Obxbuild Build an ObjecTrieve file with field information

Oberase Erase an ObjecTrieve file

Obrename Rename an ObjecTrieve file

obopen Open an ObjecTrieve file any number of times if system allows

obclose Close an ObjecTrieve file

obfldinfo Get information about record structure of an ObjecTrieve file

Index Management

obaddindex Add an index

obdelindex Delete an index

obindexinfo Obtain information about indexes

obstart Switch to an index for further access

Data Management

obread Read a record

obwrite Write a record

obwrcurr Write the current record

obrewrite Rewrite a record using the primary index

obrewrec Rewrite a record using record number

obrewcur Rewrite the current record

obdelete Delete a record using the primary index

obdelrec Delete a record using record number

obdelcur Delete the current record

obstart Locate a record based on a key value

Transaction Management

obbgntran Start a main transaction or a nested transaction

obcommit Commit a main or nested transaction

obrollback Rollback the main or nested transaction

Concurrency Management

oblock Lock the file against writes by other processes

obunlock Unlock the file

obopen Specify a lock mode as a parameter in open

obread Read a record with lock

obrelease release all the locks held currently in a file

BLOB Management

Obaddobj Inserts a BLOB fragment at a specified position in a BLOB field of a record

obdelobj Deletes a BLOB fragment from a specified position in a BLOB field of a record

obgetobj Reads the data fragment from a specified BLOB identifier

obgetobjsize Get the size of the BLOB data associated with an Object Identifier

obreadobj Reads a BLOB fragment from a specified position in a BLOB field of a record

obreadobjsize Reads a BLOB fragment from a specified position in a BLOB field of a record.

obsetobjid Sets an Object Identifier into the record buffer


obsetuniqid Initialises the sequence number to a new value

obuniqueid Returns the next sequence number for an ObjecTrieve file

What has ObjecTrieve to offer you?

ObjecTrieve offers a number of features which translate directly to benefits;

Another exciting feature of ObjecTrieve : The BLOB Manager

The BLOB Manager, an optional add on to ObjecTrieve, enhances ObjecTrieve with a capability to manage very large data objects in a simple and elegant way.

The advent of GUI and Multi-media has left most users with an unmanageable number of large image, video and audio files. Most data managers allow users to define records with large text data, for example, dBase supports Memo fields. Often, the size of these fields is limited to 64 Kilo Bytes. Only expensive Data Base Management Systems provide features to store large text and binary data.

The term BLOB, Binary Large OBject, is commonly used to refer to very large text or binary data. BLOBís are sometimes called objects. Often data with large text and/or image components are called compound documents or simply electronic documents.

Applications for BLOB `s

BLOBís have a variety of interesting applications. A BLOB manager can be used to store documents of various types. These documents may be simple ASCII text or they may contain word processed documents, fax images, bit maps, digitised sound, video data, and other elements.

Possible BLOB applications include:

Document Management Systems require a way to store the documents of an organisation in a central repository. These systems automatically date and organise documents for easy retrieval. They also allow you to search the documents by content and attributes. In this case BLOBís can be used to store the documents, and ObjecTrieve fields can be used to store other attributes.

Office Automation Systems require the ability to store unstructured data (documents, fax images, spreadsheets, memos, mail) and associate these with attributes (customer name, author, project, last access date, etc.). The BLOB Manager can be used to manage these electronic documents.

CASE Tools are used for many aspects of software development, particularly analysis and design. They need to keep track of various objects such as diagrams, text, and documents. The BLOB Manager can be used to build and manipulate these objects.

Computer Aided Publishing requires tools to handle complex documents. Facilities are needed for storing and retrieving multiple versions of complex documents that include text and pictures. Facilities are also required for searching these using a set of external attributes. Each document can be stored as a BLOB and a set of attributes can be attached to these objects. By building indexes on these attributes, they can be searched and retrieved efficiently.

Integrated Development Environments require a way to store the complex inter-relationships of various pieces of a project. These include make files, source documents, compiled objects, test scripts, test logs (for regression testing and cross reference information about program modules), and external specifications. You can use BLOBs to store the various objects and keys to interrelate them.

Dynamic HyperText applications perform auto-indexing and linking of multiple documents on the fly. These are typically compound documents for multi-media applications. The BLOB Manager can be used as a repository to manage these compound documents. Indexed fields in ObjecTrieve can be used as links.

Dynamic Resource Managers are a set of functions that let a user store and retrieve menus, resource strings, icons and bit maps in a common file and use them dynamically at run time. These resources can be stored as BLOBs and retrieved by resource name. Moving these out of programs, not only reduces the size of executables, but also allows them to be shared between multiple applications.

Persistent Object Stores for Object Oriented Programming Languages. Many Object Oriented Programming Languages like C++, Smalltalk, and Actor can use the BLOB Manager for supporting persistent Objects.

Capabilities of the BLOB Manager

The BLOB Manager provides a set of simple functions to be used with other ObjecTrieve functions. It allows applications to:
Often, a BLOB might be too large to fit into memory. The BLOB Manager function allow you to access data in fragments. Applications can selectively process small BLOB fragments and minimise memory requirements. Complete flexibility is provided by allowing arbitrary fragment sizes to a maximum of 32000 bytes.