#set TITLE = "FAQ"
#include top

.SH FAQ

#include space2
.LP
\fBWhat real-life applications use SHSQL?\fR
.IP \0
#set FILE = "http://quisp.sourceforge.net/cgi-bin/quisp?rtn=index#mpd"
#set TAG = "Here are some links"
#include link
to the scientific resource web site that I maintain, which uses SHSQL and
#set FILE = "http://quisp.sourceforge.net"
#set TAG = "QUISP"
#include link
exclusively to do all kinds of data displays.
Keep me informed of other success stories.

#include space2
.LP
\fBIs SHSQL's SQL dialect standards-compliant?\fR
.IP \0
No, it strongly resembles SQL but differs in a number of respects.  
It is an SQL subset that is full-featured enough to be useful while keeping overall code size small.
Differences are explained more on the
#set FILE = "specs.html"
#set TAG = "specs and limitations table."
#include link

#include space2
.LP
\fBHow reliable is SHSQL?  I don't want to lose any data.\fR
.IP \0
SHSQL is believed to be very reliable for light to medium duty applications, 
however as usual for software you get for free,
#set FILE = "Copyright.html"
#set TAG = "there are no guarantees."
#include link
I have had it in a production situation for several years now with no problems, other than a few incremental
bug fixes.
As with any data-modifying application, developers should test thoroughly, monitor closely during the
early going, run spot consistency checks regularly, and backup data regularly.


#include space2
.LP
\fBI have downloaded some large data files.  Can I use shsql to index them and
do fast retrievals?\fR
.IP \0
Yes, this is an example of the flexibility of shsql.  
If the data files are ascii whitespace-delimited with a field name header 
#set FILE = "tables.html#structure"
#set TAG = "(more info)"
#include link
you can do this.  Your data files can be located in the data directory or be located anywhere in the unix file system
#set FILE = "ordfiles.html"
#set TAG = "(ordinary files)."
#include link
You'll still need to 
#set FILE = "project_setup.html"
#set TAG = "set up a basic project directory structure"
#include link
first.

#include space2
.LP
\fBI have software which produces some large data files.  Can I use shsql to index them and
do fast retrievals?\fR
.IP \0
Same answer as above.

#include space2
.LP
\fBI want my program to update a SHSQL table file, without going thru the SHSQL api or anything.
Is this possible?\fR
.IP \0
Yes.  You can invoke your program via
#set FILE = "dataedit.1.html"
#set TAG = "dataedit -c"
#include link
so that locking will be done properly, and indexes rebuilt automatically when your program finishes.


#include space2
.LP
\fBHow can I determine my shsql version?\fR
.IP \0
\fCshsql -ver\fR

#include space2
.LP
\fBHow does shsql handle dates?\fR
.IP \0
\fBshsql\fR has no data types; all fields are considered alphanumeric.
Dates (etc.) may be stored directly if using notation that sorts naturally (such as YYYY/MM/DD)
, otherwise dates must be converted to a numeric equivalent (such as Julian) before
reaching \fBshsql\fR.

#include space2
.LP
\fBSuppose I rebuild all my indexes weekly using a cron batch process.  
How will that affect users?\fR
.IP \0
Users can read tables while indexes are being rebuilt.
However, users cannot update a table while its index is being rebuilt;
they will receive an "\fCupdate refused.. try again in a few minutes\fR" message.

#include space2
.LP
\fBIs there a way to set up a demo database for users to try, but prohibit them
from changing the database in any way?\fR
.IP \0
Yes, set
#set FILE = "config.html#dbreadonly"
#set TAG = "dbreadonly in your config file."
#include link

#include space2
.LP
\fBCan I join two tables that reside in two different SHSQL databases?\fR
.IP \0
The \fItablename\fC.\fIfieldname\fR construct is not supported in SELECT statements.
But you might be able to accomplish this by addressing one of the tables as an
#set FILE = "ordfiles.html"
#set TAG = "ordinary file"
#include link

#include space2
.LP
\fBWhat other SQL options are out there?\fR
.IP \0
Another embedded SQL project that seems quite popular is 
#set FILE = "http://www.sqlite.org/"
#set TAG = "sqlite."
#include link
Word has it that it's very fast, and stores data in binary form.
Other well-known systems include mySQL, postgreSQL, mSQL, Oracle, Sybase.


#include bottom
