Products
Support
Documentation
Download
core06_db.h
1
#ifndef CORE06_DB_H
2
#define CORE06_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 - Core06 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
* The artist name and album title will be index so they can be retrieved in
30
* sorted order. The index will also allow an application to preform an
31
* efficient search on those fields.
32
*
33
* This schema file should be processed using the ddlp utility using the
34
* -c and -d options to create an embedded dbd file. The -c option will
35
* generate a c header file (core06_db_dbd.h) and a c source file
36
* (core06_db_dbd.c) which can be compiled into the application and used with
37
* the d_open_ptr API to create the database if it does not already exist.
38
*/
39
40
41
/* database core06_db record/key structure declarations */
42
43
struct
artist
{
44
char
name[100];
45
};
46
47
struct
album
{
48
char
title[100];
49
};
50
51
struct
track
{
52
char
name[100];
53
};
54
55
/* record, field and set table entry definitions */
56
57
/* File Id Constants */
58
59
/* Record Name Constants */
60
#define ARTIST 10000
61
#define ALBUM 10001
62
#define TRACK 10002
63
64
/* Field Name Constants */
65
#define ARTIST_NAME 0L
66
#define ALBUM_TITLE 1000L
67
#define TRACK_NAME 2000L
68
69
/* Set Name Constants */
70
#define ARTIST_ALBUM 20000
71
#define ALBUM_TRACK 20001
72
73
/* Field Sizes */
74
#define SIZEOF_ARTIST_NAME 100
75
#define SIZEOF_ALBUM_TITLE 100
76
#define SIZEOF_TRACK_NAME 100
77
78
/*lint --flb */
79
#endif
/* CORE06_DB_H */
track
Definition:
core06_db.h:51
artist
Definition:
core06_db.h:43
album
Definition:
core06_db.h:47
Copyright © 2018 Raima, Inc. All rights reserved.