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.



All contents are copyright © 2007-2024 FirebirdFAQ.org unless otherwise stated in the text.


Links   Firebird   News   FlameRobin   Powered by FB: Home Inventory   Euchre  
Add content   About  

Categories
 Newbies
 SQL
 Installation and setup
 Backup and restore
 Performance
 Security
 Connectivity and API
 HOWTOs
 Errors and error codes
 Miscellaneous