Perf08
Perf08
Author:
Jeffrey R. Parsons, Raima Sr. Engineer
Date:
2012

Description

EXAMPLE - Perf08

The Perf08 example creates and reads a Bill-of-Materials using relational index definitions.

Each time you run this example

Database

The DDL (Database Definition Language) specification for the database used in this example is located in the file perf08_db.ddl. The example utilizes the RDM Core DDL syntax and specifies a database suitable for storing a Bill-of-Materials.

/*
* Raima Database Manager
*
* Copyright (c) 2012 Raima Inc., All rights reserved.
*
* EXAMPLE - perf08
*
* This is the DDL (Database Definition Language) for a simple Bill of
* Materials database. This version uses relation style idexes for
* relationships instead of sets.
*/
database perf08_db {
data file "perf08_db.d01" contains ritem;
data file "perf08_db.d02" contains rbill;
key file "perf08_db.k01" contains rid_code;
key file "perf08_db.k02" contains rbom;
record ritem {
unique key char rid_code[16];
char rdescription[58];
double rcost;
int32_t rcomponent_count;
}
record rbill {
char rparent[16];
char rcomponent[16];
int32_t rsequence;
double rquantity;
int32_t rlevel;
compound key rbom {
rparent;
rsequence;
}
}
}

The schema was compiled using the RDM ddlp utility with the -c option to generate an embedded database dictionary (used by the RDM d_open_ptr API).

ddlp -c -d perf08_db_db.ddl

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:

They are fully documented in http://docs.raima.com/rdm/.