About Rdbed

[Rdbed is copyright 2001 by Mark Pruett and is available under the GPL (GNU General Public License). See www.gnu.org for more information on the GPL.]

Rdbed is a database builder and editor designed for the Agenda VR3. Rdbed stores data in the RDB format, a type of formatted text file. You can use Rdbed to create data tables and edit those tables.

Rdbed stores tables in a .rdbed subdirectory under the user's HOME directory. If this directory doesn't exist, Rdbed will try to create it. Files are saved with a .rdb file extension. If you create a table called Books, then it will be saved in ${HOME}/.rdbed/Books.rdb.


You can get the source code and Agenda binary from the Rdbed Project Page on Source Forge at http://sourceforge.net/projects/rdbed.

The RDB File Format

Database tables are stored in RDB format. RDB files are tab-delimited text files with special information about the table fields stored in the first few lines.

[For more information on RDB files and RDB relational databases, download the RDB package (a set of perl RDB programs and documentation) at ftp://ftp.rand.org/pub/RDB-hobbs/.]

An RDB file can start with one or more optional comment lines. These lines will always start with a "#" character in the first column. Comments can only appear at the beginning of the file.

Following the optional comments lines is the Field Names line. This is a tab-delimited list containing the name of each field in the table.

Following the Field Names line is the Field Types line. For each field name their should be a corresponding field type. RDB recognizes to types of data: text and numeric. The field type also specifies a field length, though this value is more a suggestion than a restriction. The field length is used by some RDB commands as a guide for formatting output.

Following the Field Types line are 0 or more tab-delimited data lines. The order of the data is the same as the order of the Field Names and Field Types lines.

Here is an example of a small RDB table:

# Books RDB table
Author	Title	Section	ISBN
20	20	10	12N
Dickens, Charles	A Christmas Carol	Fiction	0553212443 
Wall, Larry, et.al.	Programming Perl	Technical	1565921496
This table tracks books and their authors. It only contains two records. Each field is separated by a tab character, and each line ends with a newline character.

Creating a New Table

From the File menu, select the "New Table" option. This displays the New Table window. Enter the name of the new table. Next, enter the name of the first table field, followed by the field size (for text fields, this is the largest number of characters you expect the field to hold). If the field will only contain numbers, click the Numeric ("Num") check box. Click the "Add" button to add this field to the Fields list. Repeat this process to add the rest of the fields in the table.

After adding the last field, press the "Okay" button and Rdbed will create the new table.

Opening a Table

Once you've created a new table, you'll want to add records to it. From the File menu, select the "Open Table" option. This displays the "Open Table" window, showing a list of existing tables. Click on a table and press the "Okay" button. The selected table is displayed in the main window, positioned at the first record.

Navigating a Table

You can step through the records in one of three ways. First, you can move between records by using the "<" and ">" buttons to step to the previous or next records. Second, you can use the Page-Up and Page-Down buttons on the left side of the Agenda. Finally, from the Record menu, you can select the "Previous" or "Next" options. The Record menu also has options to move to the first or last record in the table.

Editing Records

To edit a record, just type in the field. The record is automatically saved and will be saved to the file permanently when you either exit the Rdbed program or open another table.


I believe memory is not entirely freed when changing tables, which is really bad for largish tables, as they are kept entirely in memory. (Check all mallocs.)

On tables large enough to display a scroll bar, the window doesn't scroll all the way back to the top. The first field's label isn't displayed.

The app occasionally segfaults on exit; find out why. (Fixed 3/26/2001, mlp)

TO-DO List