Examples & Tutorials

The examples have been organized in to separate sections based on the API or access method you are interested in.

c-core

01_helloworld_c Hello World. Pre-initialized database. Create one record, read all records & print string.
02_core 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 01_helloworld_c.
03_core 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.
04_core Hierarchy. Create two levels with three record types.
05_core 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.
06_core Mixed model. Combine set scanning and index look up for navigation of a hierarchy.
07_core 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.
08_core 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.
09_core Multiple databases opened in a union. Demonstrate key scan through the union.
10_core 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.
11_core Transaction. Create records in a transaction. Commit. Navigate through created records.
12_core Transaction abort. Commit one transaction, then begin another transaction and abort it. Navigate through created records to see only committed records.
13_core 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.
14_core Simple example on how to insert a large amount of data at once using RDM’s simple API.
15_core Simple example on how to create and work with a circular limited table.
16_core Simple example which creates/inserts and reads a single record type with two fields which are referenced in a non-unique compound key.
17_core 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.
18_core Simple example that shows how to encrypt and decrypt a database.
19_core Basic tutorial in C where a pure in-memory database is created, a row is inserted and then a row is retrieved and displayed.
20_core 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.
21_core Same as previous but on-disk.
22_core 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.
23_core On-disk. Same as previous.
24_core In-memory. Same as first but with transactions of increasing batch size.
25_core On-disk. Same as previous.
28_core TPC-B Inmemory
29_core TPC-B 
30_core TPC-B comparing transaction safety settings.
31_core Basic tutorial in C where a simple one to many relationship between two tables is made and used.
32_core Basic tutorial in C where a simple database is used to store data using transactions.
33_core 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.
34_core Basic tutorial in C where a connection to a database using different Uniform Resource Identifiers (URI) are used.
35_core R-Tree example

c-odbc

01_helloworld_odbc 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

01_helloworld_cpp Basic tutorial in C++ where a database is created, a row is inserted and then a row is retrieved and displayed.
35_cpp R-Tree example (see R-Tree CPP Example)
50_perf_cpp Performance Example
55_perf_cpp Performance Example
70_time_series_cpp Time Series Example

cs

01_helloworld_cs Hello World. Create & initialize database if not present. Create one record, read and print all records.
02_cs Primary and Foreign-key reference. Two table types, second referencing the first.
03_cs Hierarchy. Same as 02_cs but with three tables.
04_cs Indexing. Create 10 rows with random values in indexed column. Select all in order and print.
05_cs 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.
06_cs Multiple databases. Create, initialize and populate two databases. Open one, then the other. Demonstrate usage of both at once.
08_cs Transaction. Insert rows in a transaction. Commit then select and print them.
09_cs 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.
20_cs This is a simple performance example creates 50,000 rows in a simple table in an in-memory database.
21_cs This is a simple performance example creates 50,000 rows in a simple table in an on-disk database
27_cs This is a simple performance example creates 50,000 rows in a simple table in an on-disk database, using different transaction sizes (i.e. different number of rows inserted as part of each transaction) to demonstrate the performance difference when using small vs. large transactions.

java

01_helloworld_java Hello World. Create & initialize database if not present. Create one record, read and print all records.
02_java Primary and Foreign-key reference. Two table types, second referencing the first.
03_java Hierarchy. Same as 02_java but with three tables.
04_java Indexing. Create 10 rows with random values in indexed column. Select all in order and print.
05_java 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.
06_java  
08_java Transaction. Insert rows in a transaction. Commit then select and print them.
09_java 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_bicycle Example database: Simple bicycle shop database
sql_bookshop

Example database: Antiquarian Bookshop Database

sql_nsfawards Example database: National Science Foundation Awards Database

rest

RESTful API Demo Set Up