Sugestions ? why yes, I've one for you : RDBAL and RDBAL::Schema
Links ? got two for you, here you go, RDBAL and RDBALL::Schema on CPAN
RDBAL - Relational DataBase Abstraction Layer class (ReDBALl) is a very interesting module, that could even (and has been, trust me on that) be used to automate html input form creation. It will allow you the get exactly the information your looking for, without having to fidle with the RDBM that you happen to be using at the time.
Here is what I'm using to get tables, stored procedures and stored procedures code out of the database (yes, there are more ways to get this info, but using perl and CPAN modules is just so sweet, you've got to love it ;-)
use RDBAL;
use RDBAL::Schema;
use strict;
# generic RDBALL::Connect
# $X = RDBAL::Connect('username', 'password', 'server') or die ("cant
+connect: $!");
# here i'm using ODBC to get to a MSSQL database
my $X = RDBAL::Connect('user','password', 'dsn_name', 'ODBC', 'databas
+e') or die ("cant connect: $!");
print "rdbal connected\n";
my $schema = new RDBAL::Schema ($X,'visao') or die ("cant make schema
+for visao : $!");
my $database = $schema->Database() or die ("cant get database from sch
+ema : $!");
my @user_tables = $schema->User_Tables() or die ("cant get user tables
+ from schema : $!");
my @procedures = $schema->Procedures() or die ("cant get procedures fr
+om schema : $!");
foreach my $t (@user_tables) { print "[table] : $t\n"; }
foreach my $p (@procedures) {
print "[procedure] : $p\n";
my $comments = $schema->Comments($p);
print "[procedure code] : $comments\n";
}
print "that's all, folks.\n"
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.