|
NAMEgendba.pl - line mode for Genezzo database systemSYNOPSISgendba [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 -version print version information -shutdown do not startup -define key=val define a configuration parameter -fileheader_define key=val define a file-specific configuration parameter (not useful in general) OPTIONS
DESCRIPTIONGenezzo is an extensible, persistent datastore that uses a subset of SQL. The gendba line-mode tool lets users interactively perform management tasks, as well as define and modify tables, and manipulate table data with updates and queries.CommandsGenezzo supports some very basic SQL create/drop/alter/describe table, select, insert, update and delete syntax, and like standard SQL, table and column names are case-insensitive unless quoted. More complex SQL parses, but is ignored. The only supported functions are count(*) and ecount(*), a non-blocking count estimation function. The database also supports commit to force changes to disk, but no rollback. NOTE: Data definition (such as create table or ct) must be manually committed to keep the database in a consistent state. Uncommitted inserts and updates will only be block-consistent -- there is no guarantee that the data will get flushed to disk, and no guarantee whether the changes will or will not take effect.rem Some simple SELECTs select * from _col1; select rid, rownum, tname, colname from _col1; select count(*) from _col1; select ecount(*) from _col1; rem SELECTs with WHERE, perl and SQL style. select * from _tab1 where tname =~ m/col/; select * from _tab1 where tid < 5; select * from _tab1 where numcols > 3 AND numcols < 6; rem basic joins select * from _tab1, _col1 where _tab1.tid = _col1.tid and _tab1.tname =~ m/col/; rem Column aliases and Expressions select tid as Table_ID, tname Name, (tid+1)/2 from _tab1; rem Basic INSERT insert into test1 values ('a','b','c','d'); insert into test1(col2, col1) values ('a','b','c','d'); rem CREATE TABLE and INSERT...SELECT create table test2(col1 char, col2 char); insert into test2 (col1) select col1 from test1; rem DELETE with WHERE delete from test1 where col1 < 'bravo' and col2 > 5; rem UPDATE with WHERE (no subqueries supported) update test2 set col2 = 'foo' where col2 is null; rem CREATE an INDEX create index test1_ix on test1(col1); rem ADD a CHECK CONSTRAINT alter table test2 add constraint t2_cn1 check (col2 =~ m/(a|b|c|d)/x ); commit Genezzo also supports the following "short" commands: ct, dt, s, i, d, u
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 by default. There are a couple of other useful commands:
EnvironmentGNZ_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.AUTHORSCopyright (c) 2003-2007 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 US Address bug reports and comments to: jcohen@genezzo.com For more information, please visit the Genezzo homepage at <http://www.genezzo.com>
Visit the GSP FreeBSD Man Page Interface. |