The FastDB browser is a frontend tool to monitor content and structure of FastDB databases.
FastDB is a Main Memory Object Relational Database Management System (MMORDBMS) written by Konstantin A. Knizhnik and is available here.
Some important features related to this browser and its fields of usage are:
Using the FastDB browser one can watch schema and relationships of tables and follow any links in the content. The FastDB browser is mainly intended to monitor systems which are implemented as a set of FastDB applications.
For debugging purposes changing of scalar values is supported- the current release does not support:
The browser is a Windows application with Multiple Document Interface (MDI). In a frame window different views show different aspects of the database. You can open different databases in several windows.
Use the "File-Open" menu entry or the folder- button of the toolbar to get a file-open dialog, where you can navigate to any FastDB database stored on disk. After choosing such a file with the default extension FDB you will get a database view.
In all views, clicking on table names opens new views dependent on key combinations while clicking:
Also it is possible to click at object IDs, which are hexadecimal numbers prefixed by a number sign (#). This will open a detail view of the record the object ID references to.
The position of all columns in all views can be changed by drag&drop the column's title.
For each database exists exactly one database view which lists all tables contained in the database.
You can click at any table name to open new views as written at navigation. All other views created this way or following further links depend on this view and get destroyed when their database view is closed.
After clicking a tablename while the CONTROL key was pressed, a table schema view like the following appears:
This view displays for each column of the table:
The following datatypes are supported by FastDB
Type displayed |
meaning |
oid |
object id (reference) |
int1 |
8 bit signed integer range -128 .. 127 |
int2 |
16 bit signed integer range -32768 .. 32767 |
int4 |
32 bit signed integer range -2147483648 .. 2147483647 |
int8 |
64 bit signed integer |
real4 |
32 bit low precision floating point (approx 7 digits precision) |
real8 |
64 bit high precision floating point |
string |
zero terminated, dynamic length character string |
&string |
address of a string |
oid[ ] |
vector of references (any length) |
int1[ ] |
vector of int1 values (any length) |
int2[ ] |
vector of int2 values (any length) |
int4[ ] |
vector of int4 values (any length) |
int8[ ] |
vector of int8 values (any length) |
real4[ ] |
vector of real4 values (any length) |
real8[ ] |
vector of int8 values (any length) |
string[ ] |
vector of strings (any length) |
auto |
autoincrement field (read only) |
unknown |
application specific extension type- not accessible to other apps and the browser |
The table names in the RefTable column can be clicked to navigate.
When clicking a tablename without pressing a key, a table content view like the following is opened showing any records currently stored in the database:
All record fields are showed as columns with the fieldname as column title. As first column the record's object ID is displayed. It can be clicked to get a detail view of that record. The detail view can be used to modify the record's data. The content of fields containing arrays can not be viewed in this view, just click at the arrays placeholder (oid[] in the example to open an array content view.
When clicking a tablename while pressing the SHIFT key, a query dialog appears:
Here you can use SQL- syntax as used for the WHERE part of a SELECT statement. All following views which inherit from this query will show the data filtered by this query- condition. If you cancel this dialog, the full content will be displayed. If you enter an unrecognized query (e.g. by using invalid fieldnames), you will get an error message, in all other cases a table content view appears.
When clicking in a table content view on the placeholder of an array field, an array content view like the following appears:
The view's caption will tell you the object ID of the record containing this array field in square brackets. Just one column is displayed with the array field's name as column title. For each array element a row displaying its content is shown. In the case above the array contains references which can be clicked to get detail views of the referenced records.
After clicking on an object ID identifying a record contained in a table, a detail view like the following will be showed:
The title of this view tells you the object ID of the record from which the data displayed is taken. For each of the record's fields a row is displayed. The first column lists the fieldnames, the second row shows the content of that field for this record. Again, for array fields only a placeholder is shown. Clicking on that placeholder opens the array field's content in a new array content view.
After enabling the editing mode, you can click on values to change them. Currently only scalar values can be changed (no references or array fields).
After clicking the pencil- icon in the toolbar (or using the menu option "Edit-Start editing") you can modify values displayed in the detail view after clicking on them:
The pencil- icon appears pressed while in editing mode.
You can leave the editing mode by pressing either the "commit" (arrow pointing explanation mark) or the "rollback" button (cancel symbol and exclamation mark) or the corresponding menu options "Edit-Commit changes" or "Edit-Rollback changes".
When clicking on a value for changing it, a frame is drawn around the field editor:
After clicking into another field and having modified something you will be asked to confirm the changes. If doing so, the data will be stored immediately and all views containing that data will get updated.
If leaving the editing mode by using "commit" or "rollback" functions you can decide to store or revoke your changes also.
By clicking the toolbar button with the eyeglasses- button or using menu option "View-Reread data views" any open views get updated with the data currently contained in the database or get closed if e.g. records have been deleted. This is an important feature since all data can have been modified by other applications. Future browser releases will have a notification mechanism which can be used by applications to force a reread of the views. Also a user settable refresh interval will be supported, so the FastDB browser can be used as application monitor.
The window menu supports the normal features of a MDI- application.
So you can tile or cascade all view windows or use this menu to place hidden views into the foreground. There are options to disable toolbar and status line.
The question mark icon or "Help-Help" menu option will display this hypertext help window.
The content of the working database (which is shown by the database view window) can be replaced by the content of an XML file exported earlier by using "File-Import data from XML-file". This can be used also to migrate old content into a new database schema. First you open the old database and export its data into an XML file, then open the new database and import that data into it.
Using the menu-command "File-Export Data to XML File" the content of a database can be written into an XML- file. This is useful to migrate database content into a database with modified scheme or a database other than FastDB which also supports XML import/export.
This menu command generates a C++ header-file which can be parsed by a CASE tool to produce an UML class diagram. I choosed C++ source code as output instead of XMI since the latter is supported only by some expensive UML- CASE-Tools and most even cheaper UML- tools are pretty able to parse that subset of C++ which is needed to visualize databases as UML diagrams.
As an example the database of the BUGDB sample which comes with FastDB is shown. The C++ Header file which was created from the BUGDB database was parsed with UMLStudio 7.1 resulting in the following class diagram:
Since this database has lots of references between its tables, the diagram looks pretty complicated. Databases with fewer table interconnections should be easier to read or some work must be done in the UML tool to make the diagram easier to read.