Examples & Tutorials

The examples have been organized in to separate sections based on the API or access method you are interested in. The examples highlight some basic methods for creating, updating and navigating a RaimaDB database. It is, by no means, an exhaustive list of the capabilities of the RaimaDB database engine or the possible configurations available.

All of the examples listed below are available on the "Enterprise" edition of the RaimaDB product. Some examples (like SQL, etc.) are not available in the "Core" edition of RaimaDB.

c-core

core01Example Hello World. Pre-initialized database. Create one record, read all records & print string.
core02Example Hello World. If database doesn’t exist (first time), it will be created. If it does exist, new records will be added. Same create and read algorithm as in core01Example.
core03Example Set instance. Create database containing two record types and a set between them. Create one owner, several members, then scan owner(s) and their members.
core04Example Hierarchy. Create two levels with three record types.
core05Example Indexing. Add 5 new records with random index values. Scan through index & print records in order. Each run adds 5 more records in the database.
core06Example Mixed model. Combine set scanning and index look up for navigation of a hierarchy.
core07Example Many-to-many. Three record types, two sets constructing a many-to-many relationship. Populate with a few records. Scan from one side, then scan from the other side.
core08Example Multiple databases. Create and initialize two databases. Populate them. Incrementally open them in the same task. Use "database number" to demonstrate usage of both databases from same task.
core09Example Multiple databases opened in a union. Demonstrate key scan through the union.
core10Example 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.
core11Example Transaction. Create records in a transaction. Commit. Navigate through created records.
core12Example Transaction abort. Commit one transaction, then begin another transaction and abort it. Navigate through created records to see only committed records.
core13Example 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.
core15Example Simple example on how to create and work with a circular limited table.
core16Example Simple example which creates/inserts and reads a single record type with two fields which are referenced in a non-unique compound key.
core17Example Simple example which creates/inserts and reads a single record type with a single field which is designated as a key. This shows inserting duplicate keys in a field that is not defined as a unique key.
core18Example Simple example that shows how to encrypt and decrypt a database.
core19Example Basic tutorial in C where a pure in-memory database is created, a row is inserted and then a row is retrieved and displayed.
core20Example Simple record type, integer field, in-memory. Time creation of 50,000 records. Time scanning and summing of all records' integer field. Time deletion of all records.
core21Example Same as previous but on-disk.
core22Example In-memory. Simple record type, integer field, one key. Time creation of 50,000 records. Scan through the key, verify ascending order. Time. Time deletion of all records.
core23Example On-disk. Same as previous.
core24Example In-memory. Same as first but with transactions of increasing batch size.
core25Example On-disk. Same as previous.
core28Example Inmemory TPC-B Industry Standard Performance Test
core29Example TPC-B Industry Standard Performance Test
core30Example TPC-B Industry Standard Performance Test comparing transaction safety settings.
core31Example Basic tutorial in C where a simple one to many relationship between two tables is made and used.
core32Example Basic tutorial in C where a simple database is used to store data using transactions.
core33Example Basic tutorial in C where a database with a unique key is created, a row is inserted and then a row is retrieved and displayed.
core34Example Basic tutorial in C where a connection to a database using different Uniform Resource Identifiers (URI) are used.
core35Example R-Tree example
core36Example Helloworld example using encryption
core37Example Clob example
core38Example Client/server example demonstrating snapshot reads (See Application Demonstrating Snapshot (MVCC) Reads)
core39Example Remote client example using SSL encryption to connect to TFS
core40Example Example TFS accepting only connections using SSL encryption

c-odbc

odbc01Example Basic tutorial in C and ODBC SQL where a database is created, a row is inserted and then a row is retrieved and displayed.

cpp

cpp01Example Basic tutorial in C++ where a database is created, a row is inserted and then a row is retrieved and displayed.
cpp35Example R-Tree example (see R-Tree C/C++ Example)
cpp50Example Performance Example
cpp55Example Multiple insert/read thread performance example
cpp70Example Time Series Example

JAVA

java01Example Hello World. Create & initialize database if not present. Create one record, read and print all records.
java02Example Primary and Foreign-key reference. Two table types, second referencing the first.
java03Example Hierarchy. Same as 02_java but with three tables.
java04Example Indexing. Create 10 rows with random values in indexed column. Select all in order and print.
java05Example Many-to-many. Three tables, two foreign key references constructing a many-to-many relationship. Populate with a few rows. Select and print from one side, then from the other.
java06Example Read data across two tables
java08Example Transaction. Insert rows in a transaction. Commit then select and print them.
java09Example Transaction abort. Insert and commit some rows. Insert more rows, but abort the transaction. Select all rows and see only the first set of rows.

SQL

sql_bookshop

Example database: Antiquarian Bookshop Database

sql_nsfawards Example database: National Science Foundation Awards Database

REST

REST example RESTful API Demo Set Up

Hot Backup

Example A Hot Backup Example