# Database Browser

This article is deprecated. Please see the following article instead.

> The eXtremeDB SDK includes an HTML-based database browser / editor (HTTP Viewer) that can be used to examine any eXtremeDB database. The browser is implemented via C API libraries which comprise a layer between the UDA API and the generic C APIs of the eXtremeDB database. The browser interface can also be implemented with eXtremeSQL.

> ## Connecting to a Database

> To connect to the database, type the address in the browser in the form

>         http://ip_address:port

> By default, `mcohv` uses `port 8082`. For example, if the database is local, the connection string is

>         http://localhost:8082

> ## Using the Browser

> The page is divided into two parts. On the left is the “navigation pane” (menu), on the right is the “data pane” that corresponds to the active menu item on the left. The menu items are:

> - Database content: Displays database statistics and the current runtime information.
> - List of classes and indexes: class structure, index structure and statistics. Each class’ objects are displayed in the order of any of the indexes created for the class. The data pane allows creating and deleting objects, and editing object data.SQL
> - Viewer options: allows setting the number of objects per page and the number of elements for vector fields.

> If more than one database are opened in an application and are registered for browsing then the menu items "Database content", “List of classes” and “Indexes” will be accessible for each of the observable databases.

> ## Left pane

> All menu “lists” can be expanded and closed.

> Next to the class name on the right there is a “[new]” item. Choosing “[new]” brings up a form to create a new object for the specified class. The object (being created/edited on the right) is highlighted in red.

> Choose “SQL query” to enter and run a custom SQL query.

> ## Right pane

> All objects in the class are represented via a horizontal list of “object forms”. Depending on your screen resolution a certain number of objects are displayed on the page. The pages can be navigated using a small navigation bar positioned above the object list. The “object form” is represented as a vertical list of field names and values. The value being edited is highlighted in red. To the left of some fields there is a black circle that indicates that this field is included in the current index (selected in the left pane).

> Depending on the field type, the values are represented in different ways: simple fields (`chars, ints`) are represented by the edit box, and are immediately available for editing; In order to edit `strings`, `blobs`, or `vectors` and `arrays` of `strings`, click on the field value and a separate form will appear.

> Fields of types `autoid` and `ref` cannot be edited.

> `Optional structures` and `vectors` may or may not have values. If the value exists it is indicated by a solid black square next to the value. An empty square indicates that the value does not exist.

> Pressing the small blue square next to the object form deletes the object. Pressing the small blue square next to a `vector` element value deletes the `vector` element.

> Not all objects can be edited or deleted; only those that have `oid`, `autoid` or `auto_oid` index fields. `Auto_oid` is database wide indexing required if using the eXtremeDB High Availability or Transaction Logging features. If `auto_oid` is defined then all objects of all classes in this database are editable in the database browser. On the other hand, if no `auto_oid` is defined then only objects of classes containing an `oid` or `autoid` fields may be edited or deleted via the database browser.

> Please use the following links to view the APIs for the database browser:

> C | The C APIs for the HTTP Browser
> SQL | The eXtremeSQL APIs for the HTTP Browser