tags:

views:

376

answers:

3

I need to test whether various types of database objects exist in a given database, and I don't know how to formulate these tests in Firebird SQL. Each test has the form "Does object of type X with name Y exist?". For example, I need to test whether a table with a given name exists. The object types I need to test are:

  • Table
  • View
  • Domain
  • Trigger
  • Procedure
  • Exception
  • Generate
  • UDF
  • Role

One can find how to query for a given table on the Internet, but the other types are more difficult to find ...

+1  A: 

It seems like you need to query against the system tables to reliably get that information. Here's a tutorial that looks like it can help:

http://www.alberton.info/firebird_sql_meta_info.html

Adam Bellaire
+3  A: 

I think a lot of what you are asking can be found at this forum post. If you want to dive a little deeper, this site seems to have a graphical representation of the tables.

Knobloch
A: 

Every year, Martijn Tonies made a session in Firebird Conference

so find in timetable in 2005 http://www.ibphoenix.com/main.nfs?a=ibphoenix&page=fb_conf_timetable_2005

in 2006 http://www.ibphoenix.com/main.nfs?a=ibphoenix&page=fb_conf_timetable_2006

there is also for 2007 and 2008

http://www.firebirdconference.net/index.php?option=com_content&view=article&id=3&Itemid=3

but I don't know where to download papers

Hugues Van Landeghem