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

Description

EXAMPLE - Perf07

The Perf07 example creates and reads a Bill-of-Materials using network model sets.

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 perf07_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 - perf07
*
* This is the DDL (SQL Database Definition Language) for a simple Bill of
* Materials database. This version uses set relationships instead of
* indexing.
*/
database perf07_db {
data file "perf07.d01" contains item;
data file "perf07.d02" contains bill;
key file "perf07.k01" contains id_code;
record item {
unique key char id_code[16];
char description[58];
double cost;
}
record bill {
double quantity;
int32_t level;
}
set bom {
order last;
owner item;
member bill;
}
set where_used {
order last;
owner item;
member bill;
}
}

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 perf07_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/.