Re: how to query the structure of a database

From: Mikito Harakiri <mikharakiri_at_yahoo.com>
Date: 29 Jan 2002 09:31:03 -0800
Message-ID: <bdf69bdf.0201290931.7371f8bf_at_posting.google.com>


wolfn_at_web.de (Wolf Nuecker) wrote in message news:<f21aa9bf.0201290333.3796e083_at_posting.google.com>...
> "Massimo Fuccillo" <mfuccillonospam_at_tiscalinetnospam.it> wrote in message news:<D8958.18173$6e5.625842_at_twister2.libero.it>...
> > Hi all
> >
> > Is there a standard way (using SQL) to query the structure of a database?
> >
> > In other words:
> > one or more query to obtain the names of the non system tables,
> > one or more query, for each table, to obtain field names, field types, field
> > sizes
> > one or more query for the constraints, indexes etc.
> > independently from the database provider (Oracle, Db2, Sqlserver, etc)
> >
> > Thanks in advance for any suggestion.
> >
> > Regards
> >
> > Massimo Fuccillo
>
>
> For SQL92(full) you should find standard tables (TABLES, USERS etc.)
> in schema INFORMATION_SCHEMA, but few DB-vendors actually seem to
> care...

JDBC has API to catalog (aka "metadata" IIRC), and every vendor implemented it! That's a pity because I don't have to emphasize in this group how inferior API is to querying. On the other side, note that java interface enforces actualy something onto a vendor... Received on Tue Jan 29 2002 - 18:31:03 CET

Original text of this message