<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.0.6619.12">
<TITLE>Meta-querying (perhaps OT...)</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->
<P><B><FONT FACE="Courier New">This is more for the database guru's out there -- specifically, for DB2: is there a way to perform a "meta" query on a database? In particular, I'd like to find out what tables contain a particular field (by name, or possibly by structure as it's possible that the "name" of the field isn't consistent across datasets)</FONT></B></P>
<P><B><FONT FACE="Courier New">This is (perhaps...) a feature I happen to like with TurobIMAGE databases. It may seem a little daunting at first, but it "encourages" designing a database that is easy to maintain. With IMAGE, you need to specify the fields that will be used in the database prior to actually placing them in datasets (tables). Since the structure of the field is kept independent of the table specification, you can't inadvertantly define a "key" item as "varchar(12)" in one table and "numeric(9,3)" in another (you have to explicitly do this by defining two different fields and relating them as a key item, but the schema processor will stop and show you the error of your ways...)</FONT></B></P>
<P><B><FONT FACE="Courier New">I *think* you can do this with MySQL, but only if you've set up field-level security in your database (kind of a back-door approach -- you query the access-rights table for all tables containing the field you are interested in...)</FONT></B></P>
<P><B><FONT FACE="Courier New">So, is what I'm after possible, or do I have to dump the schema to a file and use something like grep?</FONT></B>
</P>
</BODY>
</HTML>