core28Example.sdl
Schema for the core28Example_main.c example. Compile this schema using rdm-compile as follows:
rdm-compile --c-structs --lc-struct-members --catalog core28Example.sdl
and include the generated header file(s) as follows:
#include "core28Example_structs.h" #include "core28Example_cat.h"
and compile the following generated source file(s):
core28Example_cat.c
Here follows the actual schema:
create table branches (
bid integer not null,
bbalance double not null,
filler char(92),
constraint branches_pk primary key (bid)
);
create table tellers (
tid integer not null,
bid integer not null,
tbalance double not null,
filler char(84),
constraint tellers_pk primary key (tid),
constraint tellers_fk foreign key (bid) references branches (bid)
);
create table accounts (
aid integer not null,
bid integer not null,
abalance double not null,
filler char(88),
constraint accounts_pk primary key (aid),
constraint accounts_fk foreign key (bid) references branches (bid)
);
create table history (
tid integer not null,
bid integer not null,
aid integer not null,
delta double not null,
tim timestamp not null,
filler char(10)
);