1 /* BEGIN mdbm_rm_db_info.incl.pl1 -- jaw, 11/7/78 */ 2 3 4 5 /****^ HISTORY COMMENTS: 6 1) change(86-08-13,Hergert),, approve(88-06-28,MCR7903), 7 audit(88-06-28,Dupuis), install(88-08-01,MR12.2-1073): 8 Removed change of 84-11-02. i.e. replaced even_word_pad. 9 END HISTORY COMMENTS */ 10 11 12 /* WARNING 13 If the rm_db_info structure is changed then the mrds_data_ 14 item saved_res_version MUST be incremented to invalidate all 15 existing saved resultants 16 */ 17 18 /* DESCRIPTION: This structure is based on a segment 19 {unique_name}.mrds.rdbi that represents the secure portion of the 20 resultant model that is created partially at database open time, 21 (the rm_file_array, and rm_rel_array) and partially at ready_file 22 time, (the rm_file_info, rm_rel_info, rm_attr_info, 23 rm_domain_info, rm_plink_info and rm_clink_info). it's purpose is 24 to provide an efficient means of accessing database model 25 information, as seen from the possibly submodel view of the user, 26 and his current state of "files readied". it is the secure part 27 because it contains the model information which needs to be 28 protected from general knowledge, and this segment will 29 eventually be capable of being in a lower ring. the structure 30 itself points to four arrays that are allocated in it's area, 31 that in turn point to the other structures mentions above, also 32 allocated in the rm_db_info.static_area. the arrays are the 33 rm_file_array, and rm_rel_array. their are a pair for temporary 34 relations, initially empty, and a pair for normal model 35 files/relations. the normal rm_file_array is initialized to a 36 list of all known file names, the rm_rel_array only gets relation 37 names as files are readied. the rm_file_array points to 38 rm_file_infos for each file (see mdbm_rm_file_info.incl.pl1) and 39 the rm_rel_array points to rm_rel_info for each relation 40 "readied". (see mdbm_rm_rel_info.incl.pl1). (the arrays are in 41 mdbm_rm_file_array.incl.pl1 and mdbm_rm_rel_array.incl.pl1). the 42 file infos point to contained rel infos, the rel infos point to 43 contained attr infos, and those in turn to domain infos. (see 44 mdbm_rm_attr_info.incl.pl1 and mdbm_rm_domain_info.incl.pl1) 45 foreign keys are represented by the structures 46 mdbm_rm_plink_info.incl.pl1, and mdbm_rm_clink_info.incl.pl1. the 47 pathnames of the model and submodel, if any, are also maintained 48 in rm_db_info. the pointer to this rm_db_info segment is obtained 49 from the dbcb segment tructure(see mrds_dbcb.incl.pl1) see the 50 individual include files for further organization information, 51 and particular data structures. 52 53 HISTORY: 54 55 80-02-01 Jim Gray : Modified to put area on even word boundary, 56 so that define_area_ could be used to make it an extensible area 57 58 81-1-9 Jim Gray : added like reference to make the phony 59 resultant in mu_database_index easier to keep, since no reference 60 to the area is needed. 61 62 81-1-12 Jim Gray : added version of submodel used in opening to 63 resultant. 64 65 81-05-13 Rickie E. Brinegar: added the administrator bit to the 66 structure. 67 68 81-05-28 Jim Gray : removed pointers to file_arrays, since they 69 are now combined into the rel_array. Removed the control file 70 info which was unused. Added pointer to head of domain list, 71 which is to be used to insure only one copy of each domain info. 72 73 83-05-19 Davids: Added the saved_res_version element. 74 75 84-11-02 Thanh Nguyen: Replaced the even_word_pad by the 76 ref_name_proc_ptr to point to list of reference name of the 77 check, encode, or decode proc. 78 79 CAUTION: The structure entries from db_version to sm_path should 80 not be moved or have their declarations changed because they are 81 used in the handling of old version database openings. 82 83 84 */ 85 86 dcl 1 rm_db_info aligned based (rdbi_ptr), /* data base info, located at base of res. dm. seg. */ 87 2 data like rm_db_info_data, 88 2 static_area area (sys_info$max_seg_size - fixed (rel (addr (rm_db_info.static_area)))); 89 90 dcl rdbi_ptr ptr; 91 92 declare 1 rm_db_info_data based, /* separate declaration of info, so others can use 93 like reference to it without getting the area as well */ 94 2 db_version fixed bin, /* version no. of db */ 95 2 sm_version fixed bin unal, /* version of submodel used unal, 0 if model opening */ 96 2 val_level fixed bin unal, /* validation level for this db. */ 97 2 db_path char (168), /* abs. path of db. */ 98 2 sm_path char (168), /* path of submodel or model */ 99 2 mdbm_secured bit (1) unal, /* ON => database is secured */ 100 2 administrator bit (1) unal, /* ON => user is an administrator */ 101 2 pad bit (34) unal, /* for future use */ 102 2 saved_res_version char (8), /* version of the saved resultant in the 103 dbcb and rdbi segments in the db dir */ 104 2 domain_list_ptr ptr, /* pointer to head of list of domain_info's */ 105 2 ra_ptr ptr, /* pointer to rel. array */ 106 2 tra_ptr ptr, /* to rel array for temp rels */ 107 2 even_word_pad fixed bin (71) aligned; /* padding to put area on even word boundary */ 108 109 /* END mdbm_rm_db_info.incl.pl1 */ 110 111