Products Support Documentation Download
core04_db.h
1 #ifndef CORE04_DB_H
2 #define CORE04_DB_H
3 /*lint ++flb */
4 
5 /* Raima Database Manager 11.0.0.1000 */
6 
7 /* ----------------------------------------------------------------------------
8  *
9  * Raima Database Manager
10  *
11  * Copyright (c) 2012 Raima Inc., All rights reserved.
12  *
13  * Use of this software, whether in source code format, or in executable,
14  * binary object code form, is governed by the Raima LICENSE which
15  * is fully described in the LICENSE.TXT file, included within this
16  * distribution of files.
17  *
18  * ----------------------------------------------------------------------------
19  */
20 
21 /* EXAMPLE - Core04 C */
22 /* This is the DDL (Database Definition Language) for a database implementing
23  * two one-to-many relationship using network model sets. The database will
24  * implement the beginnings of an mp3 collection. The one (owner) side
25  * of the relationship is an artist records. The many (member) side of the
26  * relationship is the album record. There will be a second set where the one
27  * side is the album record and the many side is a track record.
28  *
29  * This schema file should be processed using the ddlp utility using the
30  * -c and -d options to create an embedded dbd file. The -c option will
31  * generate a c header file (core04_db_dbd.h) and a c source file
32  * (core04_db_dbd.c) which can be compiled into the application and used with
33  * the d_open_ptr API to create the database if it does not already exist.
34  */
35 
36 
37 /* database core04_db record/key structure declarations */
38 
39 struct artist {
40  char name[100];
41 };
42 
43 struct album {
44  char title[100];
45 };
46 
47 struct track {
48  char name[100];
49 };
50 
51 /* record, field and set table entry definitions */
52 
53 /* File Id Constants */
54 
55 /* Record Name Constants */
56 #define ARTIST 10000
57 #define ALBUM 10001
58 #define TRACK 10002
59 
60 /* Field Name Constants */
61 #define ARTIST_NAME 0L
62 #define ALBUM_TITLE 1000L
63 #define TRACK_NAME 2000L
64 
65 /* Set Name Constants */
66 #define ARTIST_ALBUM 20000
67 #define ALBUM_TRACK 20001
68 
69 /* Field Sizes */
70 #define SIZEOF_ARTIST_NAME 100
71 #define SIZEOF_ALBUM_TITLE 100
72 #define SIZEOF_TRACK_NAME 100
73 
74 /*lint --flb */
75 #endif /* CORE04_DB_H */
track
Definition: core04_db.h:47
artist
Definition: core04_db.h:39
album
Definition: core04_db.h:43