Database Format

WebCatalog can open any number of databases, each of which can have its own field structure -- the number of records is only limited by the amount of RAM given to WebCatalog (when used as a plugin, you must give more RAM to the web server software itself). WebCatalog recognizes Tab-Delimited text files, Microsoft Access and FileMaker Pro's "Merge" Quote-Comma-Delimited format, and any ODBC-compliant SQL database.

Note: To convert an existing Catalog.txt file from the old WebCatalog 1.6.1 format, you must put the 27 field names (separated by tabs) on the very first line of the file (basically the first record is the names of the fields). Alternately, you may simply export to "Merge" format from FileMaker Pro, but realize that Merge is less efficient -- it puts extra quotes and commas in the file.

New for 2.1! WebCatalog 2.1 adds a new feature to make it easier to import databases from other sources. Now you can use a ".hdr" file to define the fieldnames in a database that doesn't have fieldnames in its first row. See below.

New for 3.0! WebCatalog 3.0 adds support for SQL databases accessable through the ODBC protocol. There is no need to discuss the file format of SQL databses here, because it is irrelevant (and it's different for every SQL vendor). ODBC handles all the details for you.

Tab-Delimited Format: following is an example of a database with a custom field schema. It was created in FileMaker Pro and exported using the "Tab-Delimited" format -- because FileMaker does not automatically put field names across the top of tab-delimited export files, we had to manually paste the field names into the text file after FileMaker created it:

Contents of Tab-Delimited format AddressList.db file (the .db file extension is a convention only: it is not required):

----------------------------------------------------------------
name   address                     city       state  zip
Grant  1180 Central Ave            San Marcos CA     92079
PCS    11770 Bernardo Plaza Court  San Diego  CA     92128
----------------------------------------------------------------

Notice that the fields are separate by tabs, as usual, even though it may be hard to tell by just looking at the lines above.

Merge Format: following is an example of a database that has been exported to Merge format from a FileMaker Pro or Access database. Notice that FileMaker automatically puts the field names across the top of the file, so you don't have to make any changes after exporting.

Contents of Merge format AddressList.db file (the .db file extension is a convention only: it is not required):

----------------------------------------------------------------
name,address,city,state,zip
"Grant","1180 Central Ave","San Marcos","CA","92079"
"PCS","11770 Bernardo Plaza Court","San Diego","CA","92128"
----------------------------------------------------------------
Note: WebCatalog always saves databases in tab-delimited format, regardless of what they originally were. Any Delete, Append, or Replace action will cause a database to be written to disk in tab-delimited format (except when using SQL, which has its own format).
 
WebCatalog 1.6.x Note: Because WebCatalog 2.x deals with more than one database, you must now tell it which database it is supposed to use when sending it commands, like so:
 
xx.tpl?command=(command)&db=DatabaseName

New ".hdr" file specification: if the database you wish to import does not already contain a list of fieldnames in the first row, then you can create a second file called "xxx.hdr" that contains just the fieldnames, and WebCatalog will automatically use those fieldnames. If the database is in Merge format, then the .hdr file must also be in Merge format.

Example Tab-delimited database that uses a header file:

----- Products.tab ---------------------------------------------
Grant  1180 Central Ave            San Marcos CA     92079
PCS    11770 Bernardo Plaza Court  San Diego  CA     92128
----------------------------------------------------------------

----- Products.hdr ---------------------------------------------
name   address                     city       state  zip
----------------------------------------------------------------

Example Merge-format database that uses a header file:

----- Products.merge -------------------------------------------
"Grant","1180 Central Ave","San Marcos","CA","92079"
"PCS","11770 Bernardo Plaza Court","San Diego","CA","92128"
----------------------------------------------------------------
----- Products.hdr ---------------------------------------------
name,address,city,state,zip
----------------------------------------------------------------