How to get schema information, list of metadata objects and their properties?

Metadata is stored in system tables, whose names begin with RDB$. Many administrative tools list such tables separately, and in ISQL you can use the SHOW SYSTEM command.

The data stored in RDB$ tables is not very end-user friendly, so you are better off with some administration tool to get the details. While graphic administration tools present all this info visually, in ISQL there is the SHOW command, that can be used with object type or object name. For example, to get a list of tables, you would type SHOW TABLES, and to get information about some specific table (ex. employee), you would type SHOW TABLE EMPLOYEE. To get triggers on that table, you would type SHOW TRIGGERS EMPLOYEE.

If you still wish to dig into system tables, the best place to look is the System Tables and Views section in the Language Reference book of the original InterBase 6.0 PDF docs (see FAQ #49 for download link). You should also add Firebird release notes for new features that Firebird introduced (like multi-action triggers for example).

Beside this, you can also look into sources of ISQL or FlameRobin which extract data from RDB$ tables to show metadata information to users.

To get the idea how to query the information from the system tables, take a look at FAQ #174 which shows how to get the list of tables, views and their columns.

Do you find this FAQ incorrect or incomplete? Please e-mail us what needs to be changed. To ensure quality, each change is checked by our editors (and often tested on live Firebird databases), before it enters the main FAQ database. If you desire so, the changes will be credited to your name. To learn more, visit our add content page.

If you are a commercial tool maker and your tool features a great way to handle the issue written about in this FAQ, please check out our advertisement page.

All contents are copyright © 2007-2017 unless otherwise stated in the text.

Links   Firebird   News   FlameRobin   Home Inventory powered by FB  
Add content   Advertise   About  

 Installation and setup
 Backup and restore
 Connectivity and API
 Errors and error codes