Skip to content

Object Oriented API for C++ Database Samples

What is a Database Sample? It’s a taste of the real thing. These are fully contained, downloadable database functionality samples of our Raima Database Manager (RDM) , and each download highlights a certain feature within RDM. Click on the Database Samples links to view the complete series for each API. Duration = 5 minutes or less.

Note: Windows samples require Visual Studio 2013 or later and Linux samples require a standard Linux development environment.

Database examples

Downloadable Database Samples

C/C++ For Windows..... C/C++ For Linux...... Description
Hello World Hello World Hello World. Pre-initialized database. Create one record, read all records & print string.
OBJ02 OBJ02 Hello World. If database doesn’t exist (first time), it will be created and initialized. If it does exist, new records will be added. Same create/read algorithm as in HelloWorld.
OBJ03 OBJ03 Set instance. Create/initialize a new database containing two record types and a set between them. Create one owner, several members, then scan owner(s) obtaining record scan cursors from the Db class and the Cursor class navigation methods.
OBJ04 OBJ04 Hierarchy. Create/initialize database if it doesn’t exist. Build on previous sample but make it two levels with three record types.
OBJ05 OBJ05 Indexing. Create/initialize database if it doesn’t exist. Create 10 records with random index. Scan through index & print records in order using the Cursor class key scan cursors.
OBJ06 OBJ06 Mixed model. Rather than the Cursor classes Table scan methods like the two previous samples, use the Cursor classes Keyscan methods to scan through top of hierarchy, then scan members as sample 4 does.
OBJ07 OBJ07 Many-to-many. Three record types, two sets constructing a many-to-many relationship. Populate with a few records. Using the Cursor classes Set Member navigation methods scan from one side, then scan from the other side.
OBJ08 OBJ08 Multiple databases. Create/initialize two databases. Populate them. Incrementally open them in the same task. Use dbn to demonstrate usage of both databases from same task.
OBJ09 OBJ09 Multiple databases opened in a union. Demonstrate key scan through the union.
OBJ10 OBJ10 Currency. Using hierarchical database, find a leaf record through an index, make it the current member of its set, navigate up. Show other members of owner records.
OBJ11 OBJ11 Transaction. Create records in a transaction. Commit. Navigate through created records.
OBJ12 OBJ12 Transaction abort. Commit ont transaction, then begin another transaction and abort it. Navigate through created records to see only committed records.
OBJ13 OBJ13 Shared mode. All previous databases were using 'x' mode. This one creates two tasks. In the first one, a database is created and populated. In the second one, the database is opened and read is attempted but times out.
OBJ14 OBJ14 Multi-user. Begin multiple writer threads that will use transactions. Begin multiple reader threads that will use read locks.
OBJ15 OBJ15 TFServer. Spawn tfserver. Begin multiple writer and reader threads that use tfserver.
OBJ16 OBJ16 Multi-process. Spawn tfserver. Begin multiple writer and reader processes that use tfserver in client/server mode.
OBJ17 OBJ17 Read-Only-Transactions. Spawn tfserver. Begin multiple writer and reader processes, but readers use MVCC read-only-transactions.