shsql: using ordinary files

SQL database system
| Manual page for using(ordinary)

## Using ordinary files

An "ordinary file" is a file located anywhere in the unix file system that conforms to the shsql table structure.`` The shsql table types chart describes how ordinary files differ in their usage from standard database tables.``

Ordinary files may reside anywhere in the file system.`` Ordinary files may be accessed by the `SELECT` command, in a straight select or a join.`` They can be created using `SELECT INTO`, or by other programs.`` Indexes may be built/rebuilt for ordinary files using the SQL CREATE INDEX command (`SELECT` can then use the index).``

SQL data-modification operations, including `INSERT`, `UPDATE`, `DELETE`, `MAINTAIN`, and `ALTER`, can not be applied to ordinary files.``

## Note

Shsql can be used to access ordinary tabular data files exclusively without using any database tables.`` However, a config file and (at least a skeleton) database structure must still exist, and the SHSQL_DB environment variable must be set to point to that structure. See the project setup page.``

## Security concerns

Because this feature allows SHSQL to access any readable file on your file system, avoid situations where table names are built using user-supplied values (such as CGI user variables).. this might allow a hacker to see arbitrary files.``

## Naming

When referencing an ordinary file in a `SELECT` or `CREATE` command the file's full pathname should be used.`` The first character in the path name must be slash (/) or dot (.).``

## Usage examples

Here are some examples:

      select * from ./trial3/55x25 where intensity > 0.7

      select ... into ./lists/problemcases where ...

      create index on /home/steve/pubmed/masterlist journal_name

  Copyright Steve Grubb

Markup created by unroff 1.0, `` `` June 02, 2005.