Subject Re: [firebird-support] Re: How to set field descriptions
Author unordained
---------- Original Message -----------
From: "sqlsvr" <sqlsvr@...>
> Good practice is using a data dictionary instead of commenting
> columns/tables directly. Firebird does not have a built-in data
> dictionary (neither does SQL Server/Oracle).
------- End of Original Message -------

"comment on" puts information into the rdb$description field for the appropriate
rdb$ table for the type of object you're commenting on. As such, it's part of the
system-provided catalog tables, queriable later, visible in various FB tools,
kept in sync when you add/drop fields, etc.

Would you like to define "data dictionary", in your opinion? The SQL-92 standard
mentions a database catalog with specific fields, yes. (SQL-2003 mentions an
information_schema.) All relational databases at least have their own proprietary
catalog tables, specific to their feature sets. With Firebird (at least pre-3.0)
it's even possible to make changes directly in the catalog tables, bypassing DDL
statements. It's possible to create views on top of those to give you the
standard ones, but I agree most vendors have not done so. (But then everyone
feels free to pick and choose the parts of the SQL standard they feel like
implementing anyway, so I prefer Codd's concept of catalog tables, independent of
what the SQL committee may have thought "right".) The Interbase6 Language
Reference guide, in Chapter 7, gives examples of creating such compatibility
views for constraint tables compatible with those in the SQL-92 spec. See http:// for the download link. It's after figure 7-32.

Also see for a discussion of what systems
support what (they say SQLServer 7+ supports information_schema outright), and in
the comments, you'll find a link to
firebird_sql_meta_info.html ; he has scripts for other databases too, to bring
them all in line with each other.