[comp.databases] Determing Table Structure

cant@mrmarx.msc.com (Jim Cant) (06/20/91)

I have an application that needs to determine the structure of a table,
that is, its column names and their datatypes.  It knows nothing except
the table name.  This is done with Sybase under AIX on an RS6000.

Currently I do this in a database specific manner by using function calls
to get the # of columns, then get the name and type for each column.
In contrast, Oracle has a differnt way to get the same information.

What I would like is a database independent way to get a table
description.  Is there such?  Does the SQL standard provide a way to 
query for this data?

(I believe the strict relational definition says that all such bookkeeping
data must be kept in the database itself but is there a defined way to
get it out?)

Thanks for whatever help anyone may offer.  If there is any meaningful
response, I'll post a summary.

Jim Cant, cant@mrmarx.msc.com   I don't care what the company thinks
Mainstream Software Corp.	about what I think or say nearly as much
411 Waverly Oaks Road		I care about how my boy responds to same.
Waltham MA 02154, 617-894-3399

reiner@ksr.com (David Reiner) (06/20/91)

Ain't no such yet, but it's on the way.  It's not just reading metadata that
would be nice to do in a standard fashion across different servers (Sybase,
Oracle, Ingres, Informix, DB2, etc.), but lots of other aspects of
client/server database access that are covered in "standard" SQL.  These
include handling authorization, transaction management, and database
connection.

The good news is that there are some possible standards emerging.  Here are a
few of the leading ones:
1) SQL Access Group (an industry consortium) is working on standard embedded
and call-level interfaces to database server functionality.  This will
eventually become an X/Open standard, I believe.
2) Apple's Data Access Language (DAL, formerly CL/1) is becoming a standard in
the Apple arena.
3) Lotus's DataLens interface is not public, but at least gives broad
capabilities to spreadsheet users.
4) Various vendors have tackled the problem of heterogeneous database access
via their own protocol set (e.g., Sybase Open Server, Ingres gateways,
Oracle's SQL*Connect, Revelation's Environmental Bonding).

The bad news is that there is not yet in place one single, broadly-available
standard to do what you want.  If I had to place a bet, it would be on the SAG
standard.

DSR

------------------------
In article <5693@mrmarx.UUCP> cant@mrmarx.msc.com (Jim Cant) writes:

   Path: ksr!world!uunet!mrmarx!cant@mrmarx.msc.com
   From: cant@mrmarx.msc.com (Jim Cant)
   Newsgroups: comp.databases
   Date: 19 Jun 91 17:58:38 EDT
   Sender: cant@mrmarx.UUCP
   Organization: MainStream Software Corporation

   I have an application that needs to determine the structure of a table,
   that is, its column names and their datatypes.  It knows nothing except
   the table name.  This is done with Sybase under AIX on an RS6000.

   Currently I do this in a database specific manner by using function calls
   to get the # of columns, then get the name and type for each column.
   In contrast, Oracle has a differnt way to get the same information.

   What I would like is a database independent way to get a table
   description.  Is there such?  Does the SQL standard provide a way to 
   query for this data?

   (I believe the strict relational definition says that all such bookkeeping
   data must be kept in the database itself but is there a defined way to
   get it out?)

   Thanks for whatever help anyone may offer.  If there is any meaningful
   response, I'll post a summary.

   Jim Cant, cant@mrmarx.msc.com   I don't care what the company thinks
   Mainstream Software Corp.	about what I think or say nearly as much
   411 Waverly Oaks Road		I care about how my boy responds to same.
   Waltham MA 02154, 617-894-3399

alessio@cs.columbia.edu (Eduardo Alessio) (06/22/91)

Rao writes:

>Hi netters,

>I am a regular reader of this newsgroup.  A gamut of areas have been discussed
>so far in this newsgroup viz., pc databases, databases for larger machines, 
>distributed databases, distributed transaction processing, query languages 

>With the increasing number of "Transaction Processing" articles showing up
>in this newsgroup and the budding "UNIX OLTP" market, I feel there could be
>another newsgroup exclusively for "OLTP (On Line Transaction Processing)".

>The potential discussions in this newgroup for example could be

>	- distributed transaction processing applications
>	- TUXEDO, CICS, TRANSARC etc.,
>	- network related issues in OLTP environments
>	- large scale database issues related to OLTP
>	- UNIX OLTP, open system solutions
>	- any other relevant topics to OLTP
	
>......

	I also support this proposition, but not only for Unix environments
but for any.  I currently work with Guardian O.S. in the field of OLTP and
Networks, feeling interesting topics could come up that can enrich our
developments, not only at work, but also for future research under the
academic environment.

	My vote......., thumbs up!!


Eduardo Alessio
alessio@hudson.columbia.edu