(4) Database Explorer

<< IBExpert screen | IBExpert | SQL Assistant >>

The IBExpert Database Explorer is a navigator which considerably simplifies the work with Firebird/InterBase® databases and database objects.

The Database Folder displays all registered databases at a glance. A database connection can be made simply by double-clicking on the database name.

Each connected database is displayed in a logical tree form, including a list of all the database objects created in this database. If the database contains objects of some of these types, the name of the respective object branch appears in bold. The blue number in brackets behind the object caption shows the number of objects already created for this database.

Users from the SEC$USERS table are also listed here when working with Firebird 3 databases. Adding, editing and dropping users are all available here directly in the Database Explorer in addition to the IBExpert User Manager. (Adding and editing tags is not available yet, except UID and GID tags.)

Detailed information regarding the highlighted database object can be viewed in the SQL Assistant (below the DB Explorer).

The object tree branches can be expanded or reduced by double-clicking the object heading or clicking on the "+" or the "-" sign to the left of these headings (alternatively use the "+" and "-" keys to open a highlighted object heading). The individual objects themselves can be opened with a double-click or by pressing the [Enter] key.

The object description can be seen to the right of the object name, provided a description was inserted at the time of creation, and providing the DB Explorer is opened wide enough (the width of the DB Explorer can be expanded or reduced by dragging the right-hand splitter with the mouse).

Should you experience any problems with double-click expanding, or your object descriptions are not displayed at all, please check the IBExpert Options menu item Environment Options under the branch, DB Explorer, to ensure that these options have been checked. It is also possible to specify color display here for system objects, the Database Folder and inactive triggers. The tab position of the Database Explorer pages (top, bottom, left or right) can be also defined here.

The contents of the Database Explorer can be refreshed using [F5].

The Database Explorer status (expanded folders, active node) is saved between IBExpert sessions.

back to top of page

DB Explorer right-click menu

When a database, the object captions or the objects themselves are highlighted, the DB Explorer context-sensitive menu can be opened by right-clicking the mouse.

Using the control panel and right mouse button many basic metadata and data operations can be performed directly from the DB Explorer, such as creating, editing and dropping a database and its objects.

The Copy object feature can also be found in the IBExpert Tools menu and is described in detail here. Multi-select operations may also be allowed in certain situations, for example, it is possible to unregister more than one database at the same time, or activate/deactivate only selected procedures/triggers by simply selecting the required SP/triggers holding the [Ctrl] or [Shift] keys and choose the Deactivate/Activate item in the DB Explorer context menu. And several selected objects can be autogranted privileges at the same time.

Online validation: Simply select one or more tables and choose Validate selected table(s) online from the context menu. Online validation is available only in Firebird 2.5.4.

It is also possible to obtain database statistics for one or more tables: select the table(s) as wished, and use the Get statistics for selected tables option to automatically open the IBExpert Database Statistics and generate statistics for the tables selected.

The Goto Database and Goto Options menu items display further menus, allowing you to jump to another database or database object:

The Search in selected objects feature is a wrapper for the Tools / Search in metadata feature that allows you to search only in the metadata of selected objects. Just select the necessary objects in the Database Explorer tree and click Search in selected objects in the tree context menu. This feature is also available in the dependencies trees of object editors and the Dependencies Viewer (Tools / Dependencies Viewer).

The database/folder nodes can be sorted in alphabetical order (ascending or descending), using the menu item Sort child nodes alphabetically.

System indices (i.e. those indices created by Firedatabird/InterBase®) can be displayed (or their display disabled) using the menu item, Database Registration Info / DB Explorer / Additional / Show System Indices.

InterBase® 7.5 embedded user authentication is also supported. There is a separate node for embedded users in the Database Explorer. It is possible to create, alter and delete embedded users using the DB Explorer context menu.

When a table or view is selected, the right-click context-sensitive menu item, Show data... immediately opens the Table editor's Data page. The default shortcut for this feature is [F9]. The menu item, Create SIUD procedures is offered when a table is selected, and can be used to directly create a procedure from the table's DLL code. Please refer to the Create procedure from table for details of this feature.

The menu item, Apply IBEBlock to selected object(s), is based on IBEBlock functionality and allows you to create your own set of code blocks to process selected object(s). Inplace debugging is available.

Firebird 2.0 blocks, IBEBlocks, Event Blocks and IBEScripts which are stored in registered databases or in the User Database can be started from the DB Explorer, by using the relevant context-sensitive menu item, when a script is highlighted, or by opening the script (double-click to open the Block Editor) and executing with [F9]. it is possible to drag 'n' drop scripts and blocks from a registered database's object tree and from the Scripts/Blocks tree to automatically insert the source into code editors.

The text input field at the top of the DB Explorer (directly underneath the tabs) can be used to filter object names, e.g. to search for an object, EMP, simply type EMP. If EMP* or EMP% is typed, IBExpert displays all objects beginning with EMP; for an object ending in EMP, type *EMP or %EMP. To display objects which have a substring in their name, it is necessary to type *EMP* or . It is also possible to use ? For example, to display objects whose names start with EMP and are exactly 6 symbols in length. In this case type EMP???. Regular expressions are, of course, also allowed. To filter objects by their description just add '~' (tilde) at the beginning of the filter string.

Please note that this option does not search for individual fields - if this is required, use the IBExpert Tools menu item, Search in Metadata.

An alternative way to search for specific database objects is to use the Select database object form, which can be opened using the key combination [Ctrl + Shift + F12].

Certain display default filters can be defined, under Register Database / Explorer Filters. And under Database Registration Info or Register Database, system tables, system generated domains and triggers and object details (fields, triggers etc. relating to a specific object) can be displayed or blended out as wished, by clicking on the Additional / DB Explorer branches.

The DB Explorer includes the following pages:

It is only possible to remove the Windows Manager page, if you do not need it: select the Windows page and right-click on the Windows tree. Then select the Floating Windows Manager. You can then close the Windows Manager window (click the X in the top right-hand corner). If you need to open this again use either [Alt + 0] or the IBExpert Windows menu item, Windows Manager.

Should you not be able to view the tabs of those pages you use the most, change their position using the IBExpert Environment Options menu item, Tools / DB Explorer.

[F11] blends the DB Explorer in and out. Alternatively refer to the IBExpert Menu item View / Autohide DB Explorer. This option namely enables the DB Explorer to disappear automatically when any editor is opened - allowing a larger working area. It is blended back into view simply by holding the mouse over the left-hand side of the IBExpert main window.

back to top of page

Drag 'n' dropping objects into code editors

Objects may be dragged 'n' dropped from the DB Explorer and SQL Assistant into many of the IBExpert Tools and Services code editor windows, for example, the SQL Editor and Query Builder. When an object node(s) is dragged from the DB Explorer or SQL Assistant, IBExpert opens the Text to insert window, which offers various relevant versions of text to be inserted into the code editor. Even the charcase of keywords and identifiers specified under Options / Editor Options / Code Insight is taken into consideration, and it is even possible to format code generated in this way.

If you wish to drag and drop a database node into the editor, for example to insert a database alias name instead of the full path and file name, simply hold down the [Ctrl] or [Shift] key when dragging 'n' dropping the node. In this case only node caption will be inserted.

It is possible to create your own sets of statements that will be composed when you drag-n-drop object(s) from the Database Explorer into any code editor. This feature is based on IBEBlock.

It is possible to drag 'n' drop scripts and blocks from a registered database's object tree and from the Scripts/Blocks tree to automatically insert the source into code editors.

Further information regarding this feature can be found in the SQL Editor chapter, Inserting text.

back to top of page

Database Folder

The DB Explorer Database Folder can be used to specify a selection of databases as wished, so that it is not necessary to search through all available databases each time a specific database is required. The database folder allows a hierarchical classification of the Database Registration. This is for example useful for system vendors with many customers and databases, and simplifies, for example, the logging in to customer databases via a router.

When a database is registered, it is automatically displayed here in the folder list. Connected databases are displayed in bold, disconnected in normal type. Highlighting of the database folder containing the active database has been implemented. The highlighting color is customizable in Options / Environment options / DB Explorer (Database folder containing active DB). If wished it is possible to blend out all unconnected databases using the DB Explorer right-click menu item, Hide Disconnected Databases.

A new database folder can be created in the DB Explorer by highlighting the connected database for which a folder is to be created, right-clicking and selecting New Database Folder ... (or [Ctrl + N]).

It is then possible to rename the database folder, by selecting the folder and using the right-click context-sensitive menu or [Ctrl + O]:

It is also possible to store server information (server type, server name, server version, connection protocol) and client library name for database folders.

The database folder containing the active database is highlighted. The highlighting color is customizable in Options / Environment options / DB Explorer.

A folder can also be deleted if no longer needed (again, using the right-click menu or [Ctrl + Del]). Please be careful when using this delete command, as IBExpert does not ask for confirmation before deleting the folder!

back to top of page

Project View

(This feature is unfortunately not included in the IBExpert Personal Edition.) In the DB Explorer, projects can be defined to streamline the overview of database objects currently being worked with.

Database objects within a database can be hierarchically classified (user-specified) as wished. For example, for an Accounts project, only those objects necessary for all accounting processes are included, a Sales project would include certain objects used in Accounts and also, in addition, sales-specific objects.

This is ideal for large software projects in an enterprise.

The Project View tree filter was implemented in IBExpert version 2020.05.10.

The first time a folder or object is inserted in the project tab, IBExpert asks for confirmation whether it should create certain system tables for the project page:

This only needs to be confirmed once. Following this, folders and objects can be inserted as wished using the right mouse context-sensitive menu, [Shift + Ctrl + F] or drag 'n' drop in the Inspector Page Mode, to organize databases individually and personally.

The context-sensitive right-click menu offers a number of further options:

These menu options allow new folders to be created, objects to be added to or deleted from a project (and searched for within the Explorer tree). User items may be created and copied; and the visual display customized (Show SQL Assistant, Inspector Page Mode, Hide Disconnected Databases).

Items can be sorted in alphabetical order using the menu item Sort child nodes alphabetically.

back to top of page

Diagrams (Database Designer)

The Diagrams page provides a Model Navigator to navigate models in the Database Designer quickly and easily.

Simply click on an object in the DB Explorer, and it is immediately marked in the main Database Designer window. Double-clicking on a selected object automatically opens the Model Options page in the Database Designer.

Please also refer to the Model Navigator in the SQL Assistant.

back to top of page

Windows Manager

The Windows Manager can be opened using the IBExpert Windows menu item Windows Manager, the key combination [Alt + O], or - of course - by simply clicking on the Windows tab heading directly in the DB Explorer.

In the DB Explorer, the Windows page displays a list of all open windows, and allows the user to change quickly and easily from one window to the next by simply clicking on the object name in the list.

The right mouse button can be used to close individual or all windows, or to find the selected object in the DB Explorer database tree.

The Windows Manager can also be "separated" from the DB Explorer and floated using the right-click context menu. The floating Window can be returned to the DB Explorer by unchecking the context menu-item Floating Windows Manager.

The open windows can also be viewed and selected in the windows bar, directly above the status bar at the bottom of the IBExpert Screen.

back to top of page

Recent List

By clicking on the Recent tab in the DB Explorer, a list of the most recent objects worked upon appears.

This list can be sorted by object name, date or count in ascending or descending order, by simply clicking on the column header. The object can be reopened by double-clicking.

back to top of page

Scripts/Blocks

This page displays all existing IBEScripts, IBEBlocks and Event Blocks saved locally in the database.

There are two ways to store the blocks and scripts: (i) in a registered database - stored in the IBE$SCRIPTS table, found under the Scripts node in the registered database, (ii) in the IBExpert User Database, which can be activated using the IBExpert Options Menu / Environment Options / User Database.

To create a new script in a registered database, click on the Scripts node in the connected database and use the context-sensitive (right-click) menu to create a new script. You can also create IBEBlocks, Firebird 2 blocks (EXECUTE BLOCK) and Event Blocks in this way within your database. Each script or block must have a unique name (up to 100 characters) within the database.

When creating the User Database for the first time, you will need to restart IBExpert. After restarting you should see a new tab in the Database Explorer: Scripts/Blocks. This allows you to create scripts and blocks using the context-sensitive menu from the Scripts/Blocks tree and also organize them in folders. It is possible to drag 'n' drop scripts and blocks from a registered database's object tree and from the Scripts/Blocks tree to automatically insert the source into code editors.

We strongly recommend using the IBExpert User Database as a main storage for IBExpert, even if you do not need the scripts/blocks feature. Firebird 2.0 blocks, IBEBlocks, Event Blocks and IBEScripts stored in registered databases or in the IBExpert User Database can be executed directly from the DB Explorer. Simply use the DB Explorer right-click context menu or open the script in the Block Editor and execute using [F9].

It is also possible to recreate selected views based on IBEBlock and the ibec_GetViewRecreateScript function using the DB Explorer context-sensitive menu, Apply Block.

Please refer to IBEBlock and IBEScripts for further information concerning the many possibilities of these comprehensive features. Refer to BlockEditor for information regarding the creation, alteration and execution of blocks and scripts.

back to top of page

Events Log

The Events log page contains the log of executed event blocks within the IBExpert session.

  • Double click a log entry to edit the existing event block.
  • Use the context menu to create a new event block or edit an existing one.

back to top of page

Inspector Page Mode

(This feature is unfortunately not included in the IBExpert Personal Edition.) When either the Database Page or the Project Page in the IBExpert DB Explorer is active (i.e. visible in the foreground), it is possible to compare the two to each other by switching on the Inspector Page Mode.

This can be done using the right-click menu and selecting Inspector Page Mode, to produce two adjacent windows:

Objects can be dragged 'n' dropped from one window to the other, allowing a quick and easy selection of those objects necessary for a project.

To return to a single window display in the DB Explorer, simply right-click and the select the menu item Inspector Page Mode again.

See also:
Environment Options
IBExpert Toolbars
Toolbar options
SQL Editor
Database Objects

back to top of page
<< IBExpert screen | IBExpert | SQL Assistant >>