Home page | http://shsql.sourceforge.net
Overview
Download |
License terms | GPL |
Year of initial release | 2003 |
OS | Solaris, Linux, other unix. |
External dependencies | None.
Distributed as C source code; a C compiler such as gcc is required.
|
Required environment variable |
SHSQL_DB |
Test suite |
A compact test suite is included with the source code; see ./sqlexampledb/testruns.
A test suite involving larger tables may be downloaded separately.
|
SQL | Basic core is supported, with some syntax exceptions and extensions,
most of which are noted in this table or here. |
Data types | SHSQL is basically "typeless".
All fields are stored in character form.
ORDER BY and CREATE INDEX have numeric options.
|
SELECT |
Standard basic syntax supported.
DISTINCT, INTO, GROUP BY, ORDER BY, LIMIT are all supported.
Limitations: no arithmetic or functions (except aggregation functions
mentioned below) in the select item list;
certain where clause limitations;
compound constructs such as sub-selects not supported.
Aggregation functions: count(), sum(), avg(), min(), max().
|
JOIN |
Described here.
Two- or three-table joins are supported, with
these join types available: INNER, LEFT, RIGHT, OUTER.
Must use ..JOIN..ON.. syntax.
Extensions for explicitly handling multiple rows having the same key.
|
INSERT & DELETE | Standard basic syntax supported. |
UPDATE | Standard basic syntax supported, plus a convenience
extension ORINSERT, which causes UPDATE to add a new record if one doesn't
already exist. |
WHERE clause | Described here.
Supports list operators such as IN and INLIKE
numeric range operators INRANGE and OUTRANGE,
and multiword text operator CONTAINS.
Non-standard syntax for some comparisons.
Arithmetic expressions, functions, full regexp not supported.
Fixed presidence (OR over AND) for compound conditionals, and
parentheses cannot be used to alter this.
Default wild card character is * (configurable).
|
CREATE, DROP, ALTER |
CREATE,
DROP, and
ALTER are supported ; some non-standard syntax. |
NULL handling |
Described here.
The symbol used to represent NULL in data files is configurable.
|
Temporary tables | Temp tables may be created using SELECT
INTO and are generally private to one unix process. Temporary table names always
begin with a dollar sign ($) in shsql queries. |
Queries involving large row sets |
Default maximum on the number of rows retrieved/updated is 2000 rows, but
this figure can be changed via the
config file
or within a query using the MAXROWS keyword.
|
Sequences | shsql includes a facility for automatic allocation of
sequences or serial numbers for use as keys. |
Indexing | ISAM, alphanumeric or numeric ordering.
Not updated on-the-fly; indexes are rebuilt from time to time.
Index tags are truncated at 15 chars (configurable).
Several index types available, including DIRECT and
WORD indexes with "very common words" omitted.
|
Locking / concurrency control | Table locking
and record locking.
|
Offline maintenance | Database writes are blocked to a table during
routine maintenance (essentially a procedure for cleaning
up dead entries and rebuilding indexes).
Maintenance is typically done at off-peak times via a cron job.
|
Data representation |
Data are stored as tabular ASCII files.
Fields are delimited by a certain ASCII
character (space by default but this is configurable).
|
Logs | Automatic transaction and error logging |
Maximum field length | 255 characters |
Maximum number of fields in a table | 80 fields |
Maximum number of fields in a retrieval result, including join results | 80 fields |
Maximum length of any single data row (record) | 3000 characters. |
Maximum length of a field name |
48 characters. This limit includes any table prefix for join result fields, eg people.lastname |
Code size | Executable size of shsql(1) is ~180 kB on solaris |
Memory footprint of an executing shsql(1) process | Approximately 1 MB |