NAME

gendba.pl - line mode for Genezzo system

SYNOPSIS

gendba [options]

Options:

-help            brief help message
-man             full documentation
-init            build a gnz_home installation if necessary
-gnz_home        supply a directory for the gnz_home
-shutdown        do not startup
-define key=val  define a configuration parameter

OPTIONS

-help
Print a brief help message and exits.
-man
Prints the manual page and exits.
-init
Build the gnz_home dictionary and default tablespace if 
it does not exist.
-gnz_home
Supply the location for the gnz_home installation.  If 
specified, it overrides the GNZ_HOME environment variable.
-shutdown
If initializing a new database, then shutdown when 
complete, versus continuing in interactive mode.
-define key=value
If initializing a new database, define a configuration 
parameter.

DESCRIPTION

Genezzo is an extensible, persistent datastore, that uses a pidgin, SQL-like syntax.

Commands

Genezzo understands a SQL-like insert, update, select, and delete, and it supports the following "short" commands: ct, dt, s, i, d, u

ct - create table
example: ct EMP NAME=c ID=n
SQL equivalent: CREATE TABLE EMP (NAME CHAR(10), ID NUMBER) ;
dt - drop table
example: dt EMP
SQL equivalent: DROP TABLE EMP ;
s - select
example: s EMP *
SQL equivalent: SELECT * FROM EMP ;

example: s EMP rid rownum *
SQL equivalent: SELECT ROWID, ROWNUM, * FROM EMP ;

example: s EMP NAME
SQL equivalent: SELECT NAME FROM EMP ;
i - insert
example: i EMP bob 1 orville 2
SQL equivalent: 
  INSERT INTO EMP VALUES ('bob', '1');
  INSERT INTO EMP VALUES ('orville', '2'); 
d, u - delete and update
DELETE and UPDATE only work by rid 
-- you cannot specify a predicate.

example: d emp 1.2.3
SQL equivalent: DELETE FROM EMP WHERE RID=1.2.3 ;

example: u emp 1.2.3 wilbur 4
SQL equivalent: UPDATE EMP SET NAME='wilbur', 
                               ID='4' WHERE RID=1.2.3 ;

Genezzo stores information in a couple of subsidiary files: the default install creates a file called default.dbf which contains the basic dictionary information. Other data files can be added as needed. While the default configuration uses a single, fixed-size datafile, Genezzo can be configured to use datafiles that grow to some maximum size, and it can also be configured to automatically create new datafiles as necessary.

All tables are currently created in the system tablespace.

There are a couple of other useful commands:

HELP -- give useless help
DUMP -- dump out internal data structures
DUMP TABLES - list all tables
DUMP TS - dump tablespace information
RELOAD - reload all Genezzo perl modules (will lose uncommited changes, though)
COMMIT - force write of changes to database. Note that even CREATE TABLE is transactional -- you have to commit to update the persistent dictionary. Forgetting to commit can cause weird behaviors, since the buffer cache may flush data out to the dbf file. Then you can have the condition where the tablespace reuses these "empty" blocks and they already have data in them.

Environment

GNZ_HOME: If the user does not specify a gnz_home directory using the '-gnz_home' option, Genezzo stores dictionary and table information in the location specified by this variable. If GNZ_HOME is undefined, the default location is $HOME/gnz_home.

AUTHORS

Copyright 2003, 2004 Jeffrey I Cohen. All rights reserved.

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

Address bug reports and comments to: jcohen@genezzo.com

2 POD Errors

The following errors were encountered while parsing the POD:

Around line 132:

'=item' outside of any '=over'

Around line 148:

You forgot a '=back' before '=head2'