.ig >>
<STYLE TYPE="text/css">
<!--
        A:link{text-decoration:none}
        A:visited{text-decoration:none}
        A:active{text-decoration:none}
        OL,UL,P,BODY,TD,TR,TH,FORM { font-family: arial,helvetica,sans-serif;; font-size:small; color: #333333; }

        H1 { font-size: x-large; font-family: arial,helvetica,sans-serif; }
        H2 { font-size: large; font-family: arial,helvetica,sans-serif; }
        H3 { font-size: medium; font-family: arial,helvetica,sans-serif; }
        H4 { font-size: small; font-family: arial,helvetica,sans-serif; }
-->
</STYLE>
<title>shsql: faq</title>
<body bgcolor=99cc99 vlink=0000FF>
<br>
<br>
<center>
<table cellpadding=2 bgcolor=FFFFFF width=550 ><tr>
<td align=right><a href="shsql_home.html">
<img src="img/shsql.gif" border=0><br><small>SQL database system</a> &nbsp; </td></tr>
<td>
.>>

.TH FAQ TDH "28-APR-2004   TDH scg@jax.org" 

.SH FAQ

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

.ig >>
<br><br>
.>>
.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
.ig >>
<a href="specs.html">
.>>
\0specs and limitations table.
.ig >>
</a>
.>>

.ig >>
<br><br>
.>>
.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,
.ig >>
<a href="Copyright.html">
.>>
\0there are no guarantees.
.ig >>
</a>
.>>
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.


.ig >>
<br><br>
.>>
.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 
.ig >>
<a href="tables.html#structure">
.>>
\0(more info)
.ig >>
</a>
.>>
you can do this.  Your data files can be located in the data directory or be located anywhere in the unix file system
.ig >>
<a href="ordfiles.html">
.>>
\0(ordinary files).
.ig >>
</a>
.>>
You'll still need to 
.ig >>
<a href="project_setup.html">
.>>
\0set up a basic project directory structure
.ig >>
</a>
.>>
first.

.ig >>
<br><br>
.>>
.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.

.ig >>
<br><br>
.>>
.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
.ig >>
<a href="dataedit.1.html">
.>>
\0dataedit -c
.ig >>
</a>
.>>
so that locking will be done properly, and indexes rebuilt automatically when your program finishes.


.ig >>
<br><br>
.>>
.LP
\fBHow can I determine my shsql version?\fR
.IP \0
\fCshsql -ver\fR

.ig >>
<br><br>
.>>
.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.

.ig >>
<br><br>
.>>
.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.

.ig >>
<br><br>
.>>
.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
.ig >>
<a href="config.html#dbreadonly">
.>>
\0dbreadonly in your config file.
.ig >>
</a>
.>>

.ig >>
<br><br>
.>>
.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
.ig >>
<a href="ordfiles.html">
.>>
\0ordinary file
.ig >>
</a>
.>>

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


.ig >>
<br>
<br>
</td></tr>
<td align=right>
<a href="shsql_home.html">
<img src="img/shsql.gif" border=0></a><br>
<a href="Copyright.html">Copyright Steve Grubb</a> &nbsp;
</td></tr>
</table>
.>>
