Next Previous Contents

3. Using NoSQL

3.1 Operators

The NoSQL system comprises a set of programs called operators.

Each operator is a separate program module that performs a unique function on the data.

At one time NoSQL used to have extra operators, like body, see, etc. At some point I realized how useless they were, so I dropped them. After all they were just calls to ordinary UNIX utilities. There was really no point in providing special operators just for them, as their function could be done by applying those system commands directly. For instance:

body

Same as : tail +2 < table

see

Same as : cat -vte < table

Once again, this shows how powerful the UNIX operating system already is of its own, and how handy it can be for an additional package like NoSQL to be able to tap into this power without having to reinvent the wheel.

Invoking NoSQL programs and operators is straightforward :

        command [options] [arguments]
    

where command is the name of the desired NoSQL operator or utility. Make sure the directory containing the NoSQL executables, usually /usr/local/nosql/bin/, is in your PATH.

Most operators take a --help switch that will show the available command line options and arguments and provide some usage notes.

Here follows a list of NoSQL operators with a short description of the function of each:

addcolumn

Create new empty columns in the rightmost position of a table.

addrow

Append a new empty record to a table.

column

Pick columns by name and output columns in listed order.

compute

Compute an arbitrary expression using column names.

ctime

Take a column containing the number of seconds since the epoch and turn it into local time values.

depend

Test for ``functional dependency'' betwen two columns.

edittable

Use an editor to allow modifications to a table.

filter

Run standard utilities against a table.

gregorian

Translate selected date columns from Julian to calendar format.

index

Generate table index files to be used by 'search'.

islist

Check whether an input file has a valid 'list' format.

istable

Check whether an input file has a valid table format.

jointable

Natural or "Master/Detail" join of two tables on a common field.

julian

Translate selected date columns from calendar to Julian format.

justify

An alias for prtable.

keysearch

Fast search for rows that begin with a given string.

listtotable

Takes a file in 'list' format and makes it into a table.

maketable

Build a valid table header from an xref file.

number

Insert a unique record identifier into a table.

project

An alias for column.

prtable

Quick and easy table formatter for character displays.

random

Pick one or more table records at random.

rdbtotable

Convert an /rdb table into NoSQL format.

rename

Rename a column.

repair

Append empty data fields to rows to make them match the table header.

rmcolumn

Remove one or more columns.

row

Select rows based on arbitrary AWK expressions.

search

Select rows based on a multi-column key of a sorted or indexed table.

select

An alias for row.

sorttable

Sort a table by one or more columns.

soundex

Compute Knuth's soundex codes for selected columns.

subtotal

List subtotals of specified columns.

tabletocsv

Convert a table into the popular CSV (comma separated values) format.

tabletordb

Convert a table into /rdb format.

tabletolist

Convert a table into the corresponding 'list' format.

template

Build a table template file for the input table.

union

Concatenate multiple union compatible tables.

unique

Make a table unique on the primary key field.

update

Insert/update/delete table rows based on the contents of an edit table.

viewtable

Visualize a table in a nice list-like format.

xreftable

An alias for template.


Next Previous Contents