Skip Site Navigation «

dbrowse

app«dbrowse

MySQL Database Browser

This is dbrowse, a dbrowse: MySQL Database Browser.

(skip to database Navigation)

Synopsis

dbrowse allows the user to examine a wide variety of information about a MySQL database including a list of tables, each table structure, properties and metadata, keys and indexing, records in each table, and the server status, variables and threads. dbrowse is designed to help you visualize a database collectively, as well as down to very fine detail.

You are visiting the root node, or top-level view of this application.

Status of this Project

dbrowse is a Work in Progress. As of the timestamp posted at the bottom of this document, I have upgraded the status of this project to beta/ongong evaluation. I invite and welcome any comments, questions or other feedback you would care to provide regarding this project. Feel free to Contact Me. Thank you!

For additional information and a large list of resources, visit drx: MySQL.

Definition of Terms

A Node/View may be any or all of these types:

informative
The purpose of this view is to assist the user with a general or broad perspective of the database or application framework.
navigational
Like a table of contents, this node type is used primarily for selecting from a list of other view options—it is transitional.
descriptive
Contains more detailed information about the database, typically in the form of tabular data, and terms and their definitions about that data, with additional details made available through external resources.
functional
Means the view is singular, or displays one distinct aspect of the database.
terminating
Indicates the view has no children or forward links—it is a leaf node.

Examples

  1. This view is informative.
  2. A Database Node is navigational.
  3. Show Table Status is informative and descriptive.
  4. Index Metadata is descriptive, functional, and terminating.

Since Show Table Status is about many tables, it is not functional. Index Metadata allows you to view the details of one index in a table, so it is considered functional. As you can see, there is a relationship between the distance from the root and the degree of detail available at any particular node. The amount of detail becomes even more narrowly focused at a functional/terminating view. For instance, when you are checking the properties of one particular index, e.g. the sequence of the primary key for the seasons table in the dcal database.

Query Path

This application uses the concept of a hierarchical path, rather than an SQL query, to browse a database. This is quite similar to the path notation used in a URI, and is a simplification of the XPath language used by XSLT and XQuery, as well as other XML technologies under development at the W3C. Obviously, there is nothing particularly ground-breaking about this approach. I find it interesting and a more intuitive way to visualize and “browse” the structure of a database.

It is also very similar to OOP, where the noun (object) precedes the verb (method), rather than the other way around as in procedural programming: function(data). SQL also uses a verb/object form.

Example Query

To view the indexing on one table in a database, you would use the following SQL statement:

mysql> show keys from DB_name.table_name;

Which takes the form: verb object clause, clause, clause...

To do the same thing with dbrowse, you visit the node:

/DB_name/tables/table_name/keys

Which takes the form: /global/category/class/instance/detail...

Note: The data cells displayed for each view will contain further query path details as a tooltip.

Node/View

A view will first state the type or types it is, as defined above. For nodes that are terminating, the Query Path will also indicate this through the use of a ‘]’ (right square bracket) character at the end of the path—rather like the end-cap on a pipe.

All views will display the current Query Path at the top of the page, which you can locate under the heading of the same name. Unlike these examples, they are a navigation tool much like the Pebbles interface available on every page of this Web site. Note that the Pebbles interface under dbrowse does NOT function as a navigation aid within this application. Although you can use it to exit the application and return to the loadaverageZero home page, but there are plenty of ways to do that.

And, just like the Pebbles interface, the first link in the Query Path interface is a radical symbol (or square root) which you can select at any time to start over at this node.

Interactive Path

While the Query Path navigation element is mouse-centric (although you can certainly tab to the links), this one is designed for the keyboard. This feature is experimental, so if something goes wrong I suggest you use your Web browser’s Back feature(s) until a suitable view has been restored.

As with most filesystems, as well as with XPath (see Abbreviated Syntax), a pair of dots: “..” represents the parent node in the system. So, using this interface you can move back down a node, or jump over to a sibling node or even move forward—once you’re familiar with the tree structure of this application. Give it a try and see what you think.

Example Path

Let’s say you were viewing the brief Server Status node for the dcal database. Your Interactive Path would look like this:

/dcal/status/

Now, if you want to visit Show Table Status (list all tables) for the laz database, you would enter the following into the Interactive Path interface box and hit the Enter key:

/dcal/status/../../laz/tables

And you would find yourself indeed visiting that node and both the Query and Interactive Path interfaces will update to display (and allow you interact with) your current view:

/laz/tables/

Note: This same path will also be reflected in your browser’s address/URL (and status) bar. However, I highly recommend you avoid altering or using that interface to navigate this application. You are liable to get unexpected results or error messages if you do so. Remember that the path you see is an abstraction, it does not represent files or folders on this Web server.

Selected Data

From the Table Structure (or schema) view of any table in a database, you may visit the Selected Data node. From there you can learn more about the design and use of that particular table, and see some or all of the data contained in it. Depending on how interesting I find any single example, you may get additional information or sample PHP or Perl code used to access the data in that table.

Another method for visiting a Selected Data view is to use the Interactive Path interface:

/DB/tables/table_name/data

In addition to the Query and Interactive Path navigation systems as described already, there are a number of other dbrowse features for you to explore. Depending on what you are viewing, the column headers are usually links to the descriptions of what is contained in that column, or to a definition of the term used to reference those items. Many of the data cells contain links as well. For instance, if you are viewing a list of all tables in a database, each listing is a link to the structural view for that table.

A new feature, one that I find interesting, is how indexes that connect tables together (foreign keys, or just FKs) are presented. Look for index fields in Table Structure views that are blue. Selecting one of these links will take you to a detailed view of the index that it’s pointing at, and the exact inverse is also true.

Select a database to get started:

  1. laz (loadaverageZero—this Web site)
  2. dcal (my Web Calendar)
Last updated: Friday, October 31st, 2008 @ 3:15 AM EDT [2008-10-31T07:15:33Z]   home

(c) 2008-2010, Douglas W. Clifton, loadaveragezero.com, all rights reserved.