NAME
dbe, .dbe.pf - database editor/viewer
SYNOPSIS
dbe [-e] [-p pf] db[.tbl]
[ db2[.tbl2] ...]
[-f field ...]
DESCRIPTION
dbe is a general purpose tool for examining, exploring and editing
Datascope databases.
The arguments are database names,
db, which may be qualified with
table names,
tbl.
You can pass it the names of databases or tables to display; a single dash
indicates that a view is to be read from stdin.
When the first argument(s) are tables to be opened, you may specify
a list of fields to display by starting the list with -f. Of course,
the fields need to be in the table!
The best way to learn about dbe is to try all the menus, or
work through the Test Drive in the user's guide (see
$ANTELOPE/doc/datascope.pdf). This man page is
only introductory.
Some of the things you can do are:
-
View individual tables, and arrange the fields in any order you wish.
-
Explore the schema.
-
Sort a table by any combination of fields or expressions.
-
Compute an expression on the fields of a table and display it as
another column.
-
Create a subset of a table.
-
Join a table with other tables.
-
Search for a row which matches a particular value or expression.
-
Edit fields.
-
Delete rows from a table, or delete an entire table.
-
Save tables or views into text files (with or without headers), new
views, or databases.
-
Create new tables, or add more rows to an existing table.
-
Create simple graphs.
-
Display and/or edit external files (depending on the table).
Useful to know Bindings
-
In scrollbar
Control-left-mouse moves to the very end, in the direction indicated. (This is a
standard tcl/tk binding).
-
In table window
Control-return takes the contents of the entry as either a string, a regular expression,
or a Datascope expression, searching forward for the first match.
If the entry is empty, it moves forward 1 page.
(This is the same as the right facing arrow to the right of the entry).
Control-backspace takes the contents of the entry as either a string, a regular expression,
or a Datascope expression, searching backward for the first match.
If the entry is empty, it moves backward 1 page.
(This is the same as the left facing arrow to the right of the entry).
-
In a field column
Left mouse button selects a single field/record, unselecting all other
records.
Shift-left-mouse button selects an addition record (for the same field), leaving the
other selections alone.
Left-mouse-drag selects a range of records.
Unfortunately, selections cannot extend past the displayed records, and all
selections are lost when the set of displayed records is changed.
OPTIONS
-
-e
Allow editing on any table which is not write protected.
By default, dbe does not allow editing tables until the Options->Allow_edits
menu option is selected.
-
-p pf
Specify an alternate to the default .dbe.pf file.
PARAMETER FILE
The default parameter file for dbe is named .dbe.pf, and will be found in your home directory
as well as in the standard locations $ANTELOPE/data/pf and the current
working directory.
-
always_keep_windows
Set this parameter to yes to
keep open windows until they are explicitly dismissed. The default action
is to reuse an open window whenever an operation like subset, sort, or join
is performed on it.
-
Font
Default font to use to display the field data (should be fixed-width)
-
HeaderFont
Default font for column headers, menu entries, etc
-
Fonts
Alternative fonts which may be selected from a menu
-
HeaderFonts
Alternative header fonts which may be selected from a menu
-
Hide_null_columns
If set to yes, dbe attempts to eliminate the display of
null fields by sampling some of the first thousand rows
of a database table.
-
Hide_duplicate_columns
Joined tables tend to have duplicate fields -- the fields on which the
table was joined. Setting this to yes causes fields which have the
same name to be displayed only the first time. Note that this is not
the same as suppressing the join fields.
-
Readable_epoch_time
If set to yes, epoch times are converted to a more readable format.
-
rebind_listbox
By default yes, change to no to use the default tcl/tk mouse
behavior in the column windows.
-
Records_to_display
Default number of records to display
-
maximum_width
specify a maximum width for windows
Schema specific parameters
There are separate sections of the parameter file for different schemas.
The following parameters may be repeated in each such section.
-
Ignore_fields
These fields are not displayed.
-
table_name
Under each table_name, you may provide a list of fields that you wish to
have displayed for this table. This overrides any other default selection
method.
-
edit
This is a list by table which causes new edit menus to be added to the
standard dbe menubar. The entries follow the same plan as
graphics entries, described below.
-
graphics
In this section, you can list by base table name,
commands which provide some graphical display.
The specified command must read an input view (consisting of selected records
from the displayed table).
The value for a particular table may be
a simple scalar, or a &Tbl{ list of scalars.
Each such scalar is the menu entry label, followed by a command to
execute. Here's an example showing a list for wfdisc, and a simple, single
menu entry/command for instrument and stage.
graphics &Arr{
wfdisc &Tbl{
Waveforms trdisp -
filenames dbselect - extfile() | xargs ls -l
}
instrument Response dberesp -
stage Response dberesp -
}
Note that if you join wfdisc to other tables, such as arrival, origin, etc.,
the order of the join matters: you must start with the wfdisc table.
trdisp uses the underlying routine trgetwf(3) and the time field is not
qualified. So that requires that the initial "time" be read from the wfdisc:
not the origin, arrival, or any other table that may have a time field.
-
process
This is a list by table which causes new process menus to be added to the
standard dbe menubar. The entries follow the same plan as
graphics entries, described above.
-
views
This is a list of specially composed views you might regularly use. Each view
can be opened under the File->Open View menu. If you have views you regularly
use, this can be a useful timesaver, as it's considerably quicker than
composing the view by hand.
Graph options
-
active_color
A set of points displayed by the graphing option can be selected with
the mouse using the legend. The selected points are redrawn in this color.
-
symbol_colors
This is a list of symbol colors (from rgb.txt) to allow in the graph.
You can probably choose a more restful set of colors.
-
symbol_sizes
This is the list of symbol sizes to allow.
-
postscript_sizes
These are the sizes to appear on the graph's postscript menu.
EXAMPLE
After some exploring, are you wondering how you created the current display?
Try the Help->process menu:
SEE ALSO
BUGS AND CAVEATS
To read a personal .
dbe.
pf from the home directory,
dbe modifies the PFPATH
briefly by appending $HOME:. as .
dbe.
pf
is read.
Especially on long-distance connections (e.g., running dbe on a
machine in California, while displaying the windows on a machine in
New York), there is a tendency to get tk errors when a window is
dismissed. This is evidently an underlying flaw in tcl/tk.
You can run dbe on multiple databases at once only if they share the
same schema. This limitation is easily avoided by running multiple
instances of dbe.
AUTHOR
Daniel Quinlan