- Author:
- Jeffrey R. Parsons, Raima Sr. Engineer
- Date:
- 2012
Description
EXAMPLE - Perf03
The Perf03 example performs a number of atomic database operations on a very simple database schema using the RDM Core C APIs.
Each time you run this example
- The database is initialized (removing all existing data)
- 50,000 new records are created
- Each record is read in key order
- Each record is updated
- Each record is read again
- Each record is deleted
- Database is cleaned up
Database
The DDL (Database Definition Language) specification for the database used in this example is located in the file perf03_db.sdl. The example utilizes the SQL DDL syntax and specifies a database with a single table (simple). The table has a single indexed column (int_col).
--
--
-- Raima Database Manager
--
-- Copyright (c) 2012 Raima Inc., All rights reserved.
--
-- EXAMPLE - perf03
--
-- This is the SDL (SQL Database Definition Language) for a single column,
-- single table-type database. The one table is called simple,
-- and it's one field, int_col, is indexed and can store a 32-bit integer.
CREATE DATABASE perf03_db INMEMORY;
CREATE TABLE simple (
int_col INT key
);
The schema was compiled using the RDM rdmsql utility with the -c option to generate an embedded database dictionary (used by the RDM d_open_ptr API).
The database dictionary information is embedded inside the application so an external DBD file stored on the file system is not required.
Functions Used
The following RDM functions are illustrated:
- d_tfsinitEx/d_tfsterm
- d_opentask/d_closetask
- d_open/d_close
- d_fillnew
- d_keyfrst/d_keynext
- d_recread
- d_recfrst/d_recnext
- d_recwrite
- d_reclast/d_recprev
- d_delete
- d_errorname
- d_errorstr
They are fully documented in http://docs.raima.com/rdm/.