From J Wiki
Jump to navigation Jump to search
JDB: Layout Columns | Queries Σ | API: Structural Records | Client/Server | Implementation | Examples

File:Browser.ijs|||right]] data/jdb/browser - JDB browser

JDB browser allows to connect to a database and browse database schema, view table data and execute queries.

Database Connection

JDB Browser connects to a JDB database through the file system, so it acts as an in-memory database, as opposed to a remote client.

You can start JDB Browser loading the data/jdb/browser script: associating a key in J configuration or typing in J session
   load 'data/jdb/browser'

or from shell command line or shortcut (see Explorer Integration below)
   j -jijx data/jdb/browser
   j -jijx data/jdb/browser "path/folder/database"

To connect to a database file, use File|Connect menu item.

A regular File Open dialog is used to locate the JDB database. To open a database, select the file named dir in the database folder.


Schema Browsing

Window title shows currently open database.

The Tables list shows available tables in the database. The Schema tab shows the schema of the selected table. The top script view shows the Create syntax, and the grid at the bottom shows the structure of the columns.


Data Browsing

The Data tab shows the values in the selected table. The top script shows the query used to retrieve the data. The grid at the bottom shows the result.

You can copy the query to the Script tab to use as a starting point.


Query Script

The Script tab allows to enter one or more query statements, separated with semicolon (;). When Run button is pressed the query containing the caret is executed. The bottom grid displays the result.

To open or save the script, use File|Open and File|Save menu items.

The bottom log view tracks the status of the execution.


Explorer Integration

For Windows, edit path to J and extensions and run browser.reg to open jdb files from Explorer.


Information.png Before running the reg file, replace path-to with the location of J installation.

[{{#file: ""}} Download script: ]

Windows Registry Editor Version 5.00

@="Browse JDB"

@="\"d:\\path-to\\j602\\bin\\j.exe\" -jijx data/jdb/browser \"%L\""

See Also

Contributed by Oleg Kobchenko