1 05/15/80  mrds.cmdb_source
 2 
 3 Function:  This describes the format of the data model definition source text
 4 that is input to the create_mrds_db command for creating unpopulated mrds
 5 database. The source segment must have a .cmdb suffix.
 6 
 7 
 8 Syntax:  The basic syntax of the source text is as follows:
 9 
10 domain:   domain_name1  declaration1 {options1}  {,
11            . . . . . . . . . ,
12           domain_nameN  declarationN {optionsN} } ;
13 
14 {attribute:  attr_name1  domain_name1  {,
15             . . . . . . . . . ,
16             attr_nameN  domain_nameN  }  ;}
17 
18 relation: relation_name1 ( attr_name1* attr_name2* ... attr_nameN )  {,
19           . . . . . . . . . ,
20           relation_nameN ( attr_name1* attr_name2* ... attr_nameN )  }  ;
21 
22 {index:   relation_name1 ( attr_name1 attr_name2 ... attr_nameN ) {,
23           . . . . . . . . . ,
24           relation_nameN ( attr_name1 attr_name2 ... attr_nameN ) } ;}
25 
26 
27 Semantics:
28 The relation statement defines that relationI is to be made up of the
29 attributes whose names are given, and that those attribute names followed by an
30 asterisk, are to be part of the key field for searching that relation.
31 
32 The domain statement specifies the data type that a domain, and by default an
33 identically named attribute, will assume.
34 
35 The atttribute statement defines additional attributes to have the data type of
36 the corresponding domain whose name is given.
37 
38 The index statement specifies which attributes for relationI are to be
39 secondarily indexed, to provide for faster searching.
40 
41 In the domain statement, declarationI is a pl1 data type declaration for any
42 signed binary or decimal numeric data type, or bit or character string type.
43 
44 All names, for domains, or attributes may be up to 32 characters long, relation
45 names 30 characters long, starting with a letter, and composed of letters,
46 digits, underscores, and hyphens.
47 
48 
49 Domain options:  The options on the domain statement may be chosen from the
50 following.
51 
52 -check_procedure path
53    specifies data verification procedure for the domain.
54    procedure accepts data value of domain data type and
55    returns 1 for OK, 0 for not, in a fixed bin(35) indicator.
56 
57 -decode_procedure path
58    specifies procedure to convert databases into users data type when retrieving.
59    parameters are (db_value, user_value, code), code = fixed bin(35) status code,
60    db_value is input, user_value is output, both of domain data type.
61 
62 -encode_procedrue path
63    specifies procedure to convert users to data base data type when storing.
64    parameters are (user_value, db_value, code), code = fixed bin(35) status code,
65    user_value is input, db_value is output, both of domains data type.
66 
67 -decode_declaration declaration
68    specifies the declaration of the data type for user_value if it
69    is to be different than the domain data type for encoding/decoding.