WARNING: modifying and deleting objects from databases requires thorough knowledge of their dependencies. Do NOT modify or delete objects unless you know how to modify all dependent objects as well.
The DBInspector has a graphical interface and is very easy to use. This chapter explains the use of the interface, so you will be able to perform these actions:
View entire databases
View objects (class instances) within databases
browse variable storage attributes in detail
Modify objects (you can modify multiple objects simultaneously)
Delete objects from a database
Query on databases (you can save queries and load them later)
Export data from databases to ASCII files
View, add and delete indexes on object attributes
Your DBInspector comes with predefined keyboard shortcuts, toolbars and help files to aid you in quickly accessing the databases and objects that you want to manipulate. This chapter also explains these features.
The DBInspector uses Java Foundation Classes (JFC) Swing graphical components from Sun Microsystems. The JFC system rests on top of JDK 1.1.2 (and later versions). The system uses Java Fundamental Binding to access the database for schema information and data.
cd C:\VERSANT\DBInspector
and on Unix you might type:
cd /VERSANT/DBInspector
Once there, set the environment variable VBROWSER_HOME
to the current directory.
NT — Set VBROWSER_HOME = c:\...
UNIX — setenv VBROWSER_HOME /versant/....
If you put the directory containing DBInspector
in your PATH
variable, you can launch DBInspector
from any directory.
Now you are ready to run your browser. Launch the application by typing:
vbrowser
List of Databases
Browser Window
Object Browser
Vstr Inspector
Query Tool Window
Each of these components provides access to the next level down. For instance, clicking on a database in the List of Databases brings up the Browser Window. Clicking on a particular class in the Browser Window brings up the Object Browser, and so forth.
Figure 1: Browser Window with List of Database Dialog Box
Notice at the bottom of the dialog box is an item Hostname
. The databases you see listed are those that reside on the specified host. This defaults to localhost
. If you want to access databases on a remote machine, type in the hostname of the machine, and a new listing appears. Select the database you would like to view.
Note — Only view one personal database at a time.
You see two main areas in the Browser Window:
a schema tree
Car
. This class has five attributes.
Similar to the Object Browser, the Vstr Inspector shows you more detailed information about attributes that have a varying amount of data. For example, in Figure 4, We see that the Attribute cars
is a data structure that contains a variable amount of information about its Garages
. Again, you can modify the contents of the Vstrs in the Vstr Inspector.
The QueryTool Window comes up with your selected class showing in the upper portion of the window. If you want to change this class, you can use the popup menu to select a different class. The middle portion of the window accepts your queries, and in the lower portion are buttons for executing, loading and saving queries.
Add New Objects
Modify Objects
Delete Objects
Query for Objects
Export Data
Manipulate Indexes
EDIT
menu item, select INSERT
.Adding a new object inserts a new row in the table on the right side, with the default value of the objects in the instance variable. You can open an Object Browser on the new object and change the attribute values. Once you save the new data from the Object Browser, the new row inserted in the table view changes to reflect your modifications. Remember, when you change the data in the tables, you must commit the changes (click on the floppy diskette icon) to actually modify the database.
You can modify attributes that hold a reference to a persistent object. You can also change a link to a NULL
value, or to some valid persistent LOID
value of format dddd.nnnn.nnnn
. For this to take effect, the database that holds your object must be the session database, or be connected to your session. Once you finish your modifications, commit them by clicking on the floppy diskette icon.
NOTE: The system uses pessimistic locking during any modification/update operation to the Database. See your VERSANT Database Fundamentals Manual for more information about pessimistic locking.
DELETE
key to delete them. Commit your changes by clicking on the floppy diskette icon.
EXECUTE
button to see the results in an Answer Set Window.
SAVE
(or SAVE AS
) button. To load a formerly saved query into the system, click on the LOAD
button, then navigate to your specified query. DBInspector uses File Dialog windows to save/load queries.
EDIT
menu item, selecting the ADD-DELETE INDEX
option. Once you have associated an index for that attribute, it appears in red on your screen. You can then view indexes and delete them by selecting the red icon.
Supports Copying
Allows Manipulation of Mulitple Objects Simultaneously
Includes Short Cut Keys for Frequent Operations
Includes A Tool Bar
Handles Multiple Windows Simultaneously
Includes an Online Help Facility
Includes Customizable Preferences
EDIT
menu, COPY
options, the Tool Bar icon that looks like two documents, or the Cntrl-Insert
short cut keys. This data is in a generic format.
FILE |
EDIT |
DATABASE |
WINDOWS |
HELP |
Open Database Cntl O |
Copy Cntl Insert |
Commit Changes Alt C |
Close All Sub Windows F4 |
|
Export Alt E |
Inspect Alt Space |
Rollback Changes Alt R |
|
|
Exit Cntl Q |
Find Cntl F |
|
|
|
|
Select All Cntl A |
|
|
|
Open Database: open file folder
Commit Changes: floppy diskette
Rollback Changes (undo): X'ed out floppy diskette
Copy: two documents
Query For Objects: storage disk with binoculars
Export Data: storage disk with arrow
Help: large question mark
The online help system uses HTML documentation, and its invocation opens any installed Internet Browser with the HTML Help documentation as argument. This help system does not provide context sensitive help.
You can open a simple popup window with information about the Browser by selecting the About Versant Browser
menu item.
NOTE: There might be more information DBInspector depends on, such as the version of the JDK, that does not appear in the About Versant Browser Window.
HOME
directory of the current user. This file is called VBrowser.ini
on Windows platforms and .vbrowserrc
on UNIX platforms. If the Browser is unable to find the perferences file, it uses default preferences and saves them in a new preferences file. Preferences include: default hostname
entry delimiter character
Use only one personal database at a time.
Use the Schema tree's extendability.
This online documentation is confidential and proprietary to Versant Corporation and is licensed to you, or to your organization, pursuant to the terms of an agreement between you and Versant that restricts the use of this documentation. Please refer to the agreement for more information or call Versant at 510-789-1500 with any questions.