billmax documentation   BillMax Billing Solutions
  877.245.5629
  sales@billmax.com
 

Name

dbschema — BillMax Database Definition

DESCRIPTION

The files /usr/local/billmax/cfg/dbschema and /usr/local/billmax/cfg/rptschema file is used by alterdb to create or modify tables and indices in the BillMax database and the BillMax reports database. The dbschema file consists of a series of database table and database table index definitions. A dbschema file must be formatted in the following manner:

  • Each line must begin with one of the following characters:

    1. # - comment line

    2. F - database field definition line

    3. K - database index definition line

  • A field definition line consists of 8 fields separated by "|". Each field must be present. Consecutive "|"s are not allowed. They must be separated by at least a space. The fields are:

    1. F - specifying a field definition line.

    2. Table name.

    3. Field name.

    4. Field type - the nomenclature is database manufacturer specific.

    5. YES if the field is allowed to be NULL.

    6. Ignored, but field must be present.

    7. Default value for the field when the database record is created.

    8. Additional information about the field. Currently auto_increment is the only non-blank value recognized. If not auto_increment, then a blank after the last "|" must be present.

  • An index definition consists on one or more index definition lines. An index definition line consists of 5 fields separated by "|". Each field must be present. The fields are:

    1. K - specifying an index definition line.

    2. Table name - the table for which the index will be created.

    3. Index name.

    4. Name of field of included in the index.

    5. Field ordering (beginning with position 1) for the fields in the index. The numbering must be sequential without any gaps.

Example 4.4. note table dbschema entry

F|note|number|int(11)| |PRI|'0'|auto_increment
F|note|entdate|date| | |'0000-00-00'| (1)
F|note|enttime|time| | |'00:00:00'| 
F|note|empl|mediumint(8)| | |'0'| 
F|note|text|text| | |NULL| 
F|note|fromtable|varchar(20)| |MUL|''| 
F|note|reference|int(11)| | |'0'| 
F|note|priority|tinyint(4)| | |'0'| 
K|note|PRIMARY|number|1
K|note|note_idx|fromtable|1
K|note|note_idx|reference|2
					


(1)

Note the blanks in between "|"s and after the last "|".

[Warning] Warning

Field definitions should not be modified by the BillMax customer. If they are modified, BillMax will generate unpredictable results.

Fields may be added, but they will not recognized by BillMax processes.

The most common reason a BillMax customer may want to edit the dbschema file is to add additional database indices. This may be accomplished by adding a new index definition and running alterdb.


Document Revision A for BillMax 2.2.0   -   Copyright © 1997-2006 The iSpark Group, Inc.

All rights reserved. No part of this documentation may be reproduced or transmitted in any fashion without written permission by The iSpark Group, Inc. This documentation is for the sole use of licensees of the BillMax billing software created by The iSpark Group, Inc. Making the documentation available to a non-licensee of BillMax without written permission of The iSpark Group, Inc. is a violation of the use of this documentation.

While precautions have been taken in the preparation of this documentation, The iSpark Group, Inc. assumes neither liability nor responsibility for errors or omissions, or for damages resulting from the use of the information contained herein.

All terms mentioned that are known to be trademarks have been appropriately capitalized. Use of the a trademark does not affect the validity of any trademark or service mark.

Links to third-party Web sites are provided for convenience. The iSpark Group, Inc. is not responsible for any content contained in the third-party Web sites.

Comments about this documentation may be sent to doc@billmax.com