Properties Window

From InterBase

Go Up to IBConsole Windows and Tools


Use the object inspector to view properties, metadata, permissions, data, and dependencies for the entire database or for a specific table, view, function, procedure, or any other database attribute displayed in the Tree pane.

To open the object inspector, double-click a database object in the Work pane. The object inspector appears:

Object Inspector

Depending on the database object selected, the object inspector has some or all of the following tabs: Properties, Metadata, Permissions, Data, and Dependencies. These are discussed in the following sections.


Object Properties

The Properties tab is available when viewing Table and View database objects. Use the Properties tab of the object inspector to display properties for database objects, including columns, triggers, check constraints, indexes, unique constraints, and referential constraints. The Properties tab has five toolbar buttons for displaying the various object properties:

Columns: displays the name, type, collation, character set, default value, and whether or not null values are acceptable for every row in the column. The accelerator key is W+Y+C. For more information on columns, refer to “Defining columns” in the Data Definition Guide.

Triggers: displays the name and type of each trigger, as well as whether or not it is active. In addition, it displays the SQL trigger statement. The accelerator key is W+Y+T. For more information on triggers, refer to “Working with Triggers” in the Data Definition Guide.

Check constraints: displays the names of the constraints, whether or not they can be deferred, and if they were initially deferred. In addition, it displays the SQL check constraint statements. The accelerator key is W+Y+H. For more information, refer to “Defining a CHECK constraint” in the Data Definition Guide.

Indices: displays the name of the index keys, and whether or not they are unique, descending, or active. The accelerator key is W+Y+R. For more information, refer to “Working with Indexes” in the Data Definition Guide.

Unique Constraints: displays the names of the constraints, whether or not they can be deferred, if they were initially deferred, and the index keys. The accelerator key is W+Y+U.

Referential Constraints: displays the names of the constraints, whether or not they can be deferred, if they were initially deferred, the match options, the update rules, the delete rules, the index, and the reference table. The accelerator key is W+Y+R.


Viewing Metadata

The metadata which the Metadata tab of the object inspector displays depends on the database that is selected in the Tree pane, or the item that is selected in the Work pane.

To view metadata for an entire database Select a connected database in the Tree pane, and then double-click View Metadata in the Work pane. The metadata is displayed in a text window.

To view metadata for a specific database object perform one of the following actions:

  • Select a database element from the hierarchy displayed in the Tree pane, and then in the Work pane double-click an object to display its Properties dialog. Click the Metadata tab to see the object’s metadata.
  • Select a database element from the hierarchy displayed in the Tree pane, and then in the Work pane right-click a database object associated with that element and select Extract from the context menu.

For example, if you want metadata for domains only, expand the desired database hierarchy (if it is not already expanded), select Domains, double-click on a domain in the Work pane, and select the Metadata tab of the Properties dialog.

Use the drop-down list at the top of the dialog to select other objects associated with the database element.

The following table lists the items for which you can view metadata for associated objects with the object inspector.

Metadata Information Items
Item Displays

Blob Filters

Blob filters definition

Domains

Metadata script, dependencies, data type, description, check constraints, and default values

Exceptions

Description, exception number, exception message, metadata script, and dependencies

External Functions

UDFs definition

Generators

Generator ID, current value, metadata script, and dependencies

Stored Procedures

Metadata script, procedure body, input parameters, output parameters, permissions, data, and dependencies

Roles

Role definition

Tables

Columns, data types, triggers, indexes, unique constraints, referential constraints, check constraints, metadata script, permissions, data, and dependencies

Tablespaces

Metadata script, description.

Views

Metadata script, permissions, data, and dependencies


Extracting Metadata

You can extract a metadata script to a file by displaying the desired metadata in the Metadata tab and clicking the Save Script toolbar button.

Extracting an entire database exports metadata in a specific order, to allow the resulting script to be used as input to recreate the database.

Metadata Comments

1. Database

Extracts database with default character set and PAGE_SIZE.

2. Domains

Must be before tables that reference domains.

3. Tables

Must be after domains.

4. Indexes

Must be after tables.

5. FOREIGN KEY constraints

Must be added after tables to avoid tables being referenced before they have been created.

6. Views

Must be after tables.

7. CHECK constraints

Must be after tables.

8. Exceptions

Must be extracted before stored procedures and triggers that contain code to raise exceptions.

9. Stored procedures

Stored procedures are shown with no body in CREATE PROCEDURE and then ALTER PROCEDURE to add the text of the procedure body; this is to allow circular or recursive procedure references.

10. Triggers

Must be after tables.

Must be after stored procedures, to allow trigger code to reference procedures.

Does not extract triggers from CHECK constraints.

11. Roles

Must be before GRANT privileges.

12. GRANT privileges

Must be after tables, views, stored procedures, triggers, and roles.

13. Tablespaces

Must be.... .

Items that are not extracted include:

  • Code of external functions or filters, because that code is not part of the database. The declarations to the database (with DECLARE EXTERNAL FUNCTION and DECLARE FILTER) are extracted.
  • System tables, system views, and system triggers.
  • Because DDL statements do not contain references to object ownership, the extracted file does not show ownership. The output file includes the name of the object and the owner if one is defined. There is no way to assign an object to its original owner.

Advance To: