NOTE: In the following descriptions, we will use the following terms somewhat interchangeably:
It is required that the key be the first column of an ASCII source file for GDBM, Berkeley DB, or in-memory built-in database formats. It is also strongly suggested that you keep that practice for SQL databases, since MiniVend's import, export, and search facilities will work much better with that practice.
If necessary, MiniVend reads the data to place in tables from standard ASCII-delimited files. All of these ASCII source files are kept in the products directory, normally products in the catalog directory (where catalog.cfg is).
The ASCII files can have ^M (carriage return) characters if desired, but must have a newline character at the end of the line to work -- Mac users uploading files must use ASCII mode, not binary mode!
MiniVend's default ASCII delimiter is TAB.
IMPORTANT NOTE: The items must be separated by a single delimiter. The items are lined up for your reading convenience.
code description price image SH543 Men's fine cotton shirt 14.95 shirts.jpg
|
characters. No whitespace should be at the beginning of the line.
code|description|price|image SH543|Men's fine cotton shirt|14.95|shirts.jpg
"code","description","price","image" "SH543","Men's fine cotton shirt","14.95","shirts.jpg"
NOTE: Using the default TAB delimiter is highly recommended if you are planning on searching the ASCII source file of the database. PIPE works fairly well, but CSV delimiter schemes cause problems with searching.
IMPORTANT NOTE: Field names are usually case-sensitive. Unless you are consistent in the names, you will have problems. All lower or all upper case names are recommended.
MiniVend uses one mandatory database, which is referred to as the products
database. In the supplied demo catalogs, it is called products and the
ASCII source is kept in the file products.txt
in the products directory. This file is also the default file for searching
with the
THE SEARCH ENGINE.
MiniVend also has a two of standard but optional databases, which are in fixed special formats: