Yes, I've considered using Hibernate's metadata framework, and I've reviewed the Hibernate's code back in 2004 (when I did first release of database metadator), and I did it again hours ago for v.3.3.0.SP1.

The JDBC connector needs to be more dynamic than Hibernate can allow. Hibernate is tuned for ORM stuff only, and it was done for the reason.  Hibernate's view of database metadata relying on the concept of org.hibernate.dialect.Dialect classes that needs to be supplied in a configuration (JPA or hibernate.cfg.xml) and/or in POJO annotations. Hibernate will know about relationships between objects only if it will be supplied as part of the mapping.
 It is sort of static approach (alhough it is possible to programmatically create configuration) and it mostly limited to tables to classes mapping (again, for a reason) - in other words, Hibernate is trying to see a database metadata through your eyes (mapping, a top-down approach).

Loading table's data is important but it is equally important to get other database metadata. In contrast with Hibernate, the database metadator relying on JDBC metadata provided from connection to dynamically get all neccessary info - and it is more comprehensive - everything that java.sql.DatabaseMetaData provides can be extracted using database metadator - tables, views, indexes, stored procedures, database capabilities (a bottom-up approach). 

The JDBC connector needs only database connection URL/user info or Datasource name from JNDI to get all metadata, and it can drive from there.
I was thinking about similar way (I'm talking about concept, not the UI view) like Aqua Data Studio does it - http://www.aquafold.com.
 
The dna-common-jdbc already has most of the logic needed - we just need a glue for a request processor implementation. BTW, the dna-common-jdbc extracts table's metadata in the same way like org.hibernate.tool.hbm2ddl.
IMO, it is possible to use both in the same project - for example to get metadata - use dna-common-jdbc, to issue datbase update statements use Hibernate. But again, it's not difficult to execute "select" statement based on table name without Hibernate.

Again, don't get me wrong - Hibernate is extremely useful when it comes to objects mapping to tables and persistent operations against defined POJO model (in fact, I'm using the Hibernate 3 for my current projects, and very happy with it). But when it comes to something very dynamic like federated access to databases where we're discovering models by traversing graphs - we need something more than that, and  database metadator classes can provide that level of flexibility.

Best regards,
   Sergiy


From: "dna-dev-request@lists.jboss.org" <dna-dev-request@lists.jboss.org>
To: dna-dev@lists.jboss.org
Sent: Tuesday, 9 December, 2008 3:20:50 AM
Subject: dna-dev Digest, Vol 9, Issue 7

Send dna-dev mailing list submissions to
    dna-dev@lists.jboss.org

To subscribe or unsubscribe via the World Wide Web, visit
    https://lists.jboss.org/mailman/listinfo/dna-dev
or, via email, send a message with subject or body 'help' to
    dna-dev-request@lists.jboss.org

You can reach the person managing the list at
    dna-dev-owner@lists.jboss.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of dna-dev digest..."


Today's Topics:

  1. FYI: Apache Jackrabbit v. 1.5.0 has been released
      (Sergey Litsenko)
  2. JDBC metadata connector (Randall Hauch)
  3. Build failed in Hudson: DNA continuous on JDK1.5 ? JBoss DNA
      JDBC Common model #393 (jboss-qa-internal@redhat.com)
  4. Build failed in Hudson: DNA continuous on JDK1.5 ? JBoss DNA
      JDBC Common model #394 (jboss-qa-internal@redhat.com)


----------------------------------------------------------------------

Message: 1
Date: Sun, 7 Dec 2008 15:24:23 -0800 (PST)
From: Sergey Litsenko <litsenko_sergey@yahoo.com>
Subject: [dna-dev] FYI: Apache Jackrabbit v. 1.5.0 has been released
To: dna-dev@lists.jboss.org
Message-ID: <357562.58665.qm@web50510.mail.re2.yahoo.com>
Content-Type: text/plain; charset="utf-8"

IMO, The most notable changes are:
  1) development preview: JSR 283 features (org.apache.jackrabbit.api.jsr283)
  2) jackrabbit-jcr-benchmark component (depends on javax.jcr and on jackrabbit-jcr-tests - JCR API test cases designed for
testing the compliance of an implementation.)

Speaking of reusability the jackrabbit-webdav module can be reused for https://jira.jboss.org/jira/browse/DNA-190 Support accessing repository through WebDAV. It depends on small part of jackrabbit-jcr-commons only - org.apache.jackrabbit.commons.xml.SerializingContentHandler to generate XML output.


Regards,
  Sergiy


________________________________
From: "dna-dev-request@lists.jboss.org" <dna-dev-request@lists.jboss.org>
To: dna-dev@lists.jboss.org
Sent: Saturday, 6 December, 2008 5:56:37 AM
Subject: dna-dev Digest, Vol 9, Issue 6

Send dna-dev mailing list submissions to
    dna-dev@lists.jboss.org

To subscribe or unsubscribe via the World Wide Web, visit
    https://lists.jboss.org/mailman/listinfo/dna-dev
or, via email, send a message with subject or body 'help' to
    dna-dev-request@lists.jboss.org

You can reach the person managing the list at
    dna-dev-owner@lists.jboss.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of dna-dev digest..."


Today's Topics:

  1. Build failed in Hudson: DNA continuous on JDK1.5 ? JBoss DNA
      Connector to SVN #388 (jboss-qa-internal@redhat.com)
  2. Hudson build is back to normal: DNA continuous on JDK1.5 ?
      JBoss DNA Connector to SVN #389 (jboss-qa-internal@redhat.com)


----------------------------------------------------------------------

Message: 1
Date: Fri, 5 Dec 2008 10:36:01 -0500 (EST)
From: jboss-qa-internal@redhat.com
Subject: [dna-dev] Build failed in Hudson: DNA continuous on JDK1.5 ?
    JBoss DNA Connector to SVN #388
To: dna-dev@lists.jboss.org, rhauch@gmail.com
Message-ID:
    <516078381.13271228491361684.JavaMail.hudson@hudson1.qa.atl2.redhat.com>
   
Content-Type: text/plain; charset=us-ascii

See http://hudson.qa.jboss.com/hudson/job/DNA%20continuous%20on%20JDK1.5/org.jboss.dna$dna-connector-svn/388/changes

------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Building JBoss DNA Connector to SVN
[INFO]    task-segment: [clean, package]
[INFO] ------------------------------------------------------------------------
[INFO] [clean:clean]
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:compile]
[INFO] Compiling 6 source files to http://hudson.qa.jboss.com/hudson/job/DNA%20continuous%20on%20JDK1.5/org.jboss.dna$dna-connector-svn/ws/target/classes
[HUDSON] Archiving http://hudson.qa.jboss.com/hudson/job/DNA%20continuous%20on%20JDK1.5/org.jboss.dna$dna-connector-svn/ws/pom.xml  to /home/hudson/hudson_workspace/jobs/DNA continuous on JDK1.5/modules/org.jboss.dna$dna-connector-svn/builds/2008-12-05_10-32-13/archive/org.jboss.dna/dna-connector-svn/0.4-SNAPSHOT/pom.xml
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Compilation failure
http://hudson.qa.jboss.com/hudson/job/DNA%20continuous%20on%20JDK1.5/org.jboss.dna$dna-connector-svn/ws/src/main/java/org/jboss/dna/connector/svn/SVNRepositoryRequestProcessor.java :[223,86] cannot find symbol
symbol  : variable MIME
location: class org.jboss.dna.graph.JcrLexicon



http://hudson.qa.jboss.com/hudson/job/DNA%20continuous%20on%20JDK1.5/org.jboss.dna$dna-connector-svn/ws/src/main/java/org/jboss/dna/connector/svn/SVNRepositoryRequestProcessor.java :[223,86] cannot find symbol
symbol  : variable MIME
location: class org.jboss.dna.graph.JcrLexicon


[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3 minutes 43 seconds
[INFO] Finished at: Fri Dec 05 10:36:00 EST 2008
[INFO] Final Memory: 62M/353M
[INFO] ------------------------------------------------------------------------



------------------------------

Message: 2
Date: Fri, 5 Dec 2008 11:07:09 -0500 (EST)
From: jboss-qa-internal@redhat.com
Subject: [dna-dev] Hudson build is back to normal: DNA continuous on
    JDK1.5 ? JBoss DNA Connector to SVN #389
To: dna-dev@lists.jboss.org, rhauch@gmail.com
Message-ID:
    <2103588601.13301228493229923.JavaMail.hudson@hudson1.qa.atl2.redhat.com>
   
Content-Type: text/plain; charset=us-ascii

See http://hudson.qa.jboss.com/hudson/job/DNA%20continuous%20on%20JDK1.5/org.jboss.dna$dna-connector-svn/389/changes




------------------------------

_______________________________________________
dna-dev mailing list
dna-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/dna-dev


End of dna-dev Digest, Vol 9, Issue 6
*************************************



      Start your day with Yahoo!7 and win a Sony Bravia TV. Enter now http://au.docs.yahoo.com/homepageset/?p1=other&p2=au&p3=tagline
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/dna-dev/attachments/20081207/9e8fe034/attachment-0001.html

------------------------------

Message: 2
Date: Mon, 8 Dec 2008 08:35:29 -0600
From: Randall Hauch <rhauch@redhat.com>
Subject: [dna-dev] JDBC metadata connector
To: JBoss DNA <dna-dev@lists.jboss.org>
Message-ID: <C06A61F8-ABCA-46CE-8FA2-91CE6BAED768@redhat.com>
Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes

Sergiy,

Have you considered using Hibernate's metadata framework?  Considering 
that Hibernate has verified and tested support for 25 database 
management systems, it may very well be worth our while to simply 
reuse what they have for extracting metadata.  I would think this 
approach might offer the broadest coverage with a very small amount of 
simple code.  Basically, we'd just need to get the list of tables 
through JDBC metadata, and then we'd be able to call Hibernate's 
framework to load each table (which already handles all the foreign 
key functionality).

Thoughts?

Best regards,

Randall


------------------------------

Message: 3
Date: Mon, 8 Dec 2008 11:01:10 -0500 (EST)
From: jboss-qa-internal@redhat.com
Subject: [dna-dev] Build failed in Hudson: DNA continuous on JDK1.5 ?
    JBoss DNA JDBC Common model #393
To: dna-dev@lists.jboss.org, rhauch@gmail.com
Message-ID:
    <1486165683.31228752070403.JavaMail.hudson@hudson1.qa.atl2.redhat.com>
Content-Type: text/plain; charset=us-ascii

See http://hudson.qa.jboss.com/hudson/job/DNA%20continuous%20on%20JDK1.5/org.jboss.dna$dna-common-jdbc/393/changes

------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Building JBoss DNA JDBC Common model
[INFO]    task-segment: [clean, package]
[INFO] ------------------------------------------------------------------------
[INFO] [clean:clean]
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
Downloading: http://repository.jboss.org/maven2/commons-beanutils/commons-beanutils/1.8.0/commons-beanutils-1.8.0.pom
Downloading: http://apiviz.googlecode.com/svn/site/repo/mvn/release/commons-beanutils/commons-beanutils/1.8.0/commons-beanutils-1.8.0.pom
Downloading: http://repository.jboss.com/maven2/commons-beanutils/commons-beanutils/1.8.0/commons-beanutils-1.8.0.pom
Downloading: http://snapshots.jboss.org/maven2/commons-beanutils/commons-beanutils/1.8.0/commons-beanutils-1.8.0.pom
Downloading: http://repo1.maven.org/maven2/commons-beanutils/commons-beanutils/1.8.0/commons-beanutils-1.8.0.pom
10K downloaded
Downloading: http://repository.jboss.org/maven2/org/apache/commons/commons-parent/11/commons-parent-11.pom
Downloading: http://apiviz.googlecode.com/svn/site/repo/mvn/release/org/apache/commons/commons-parent/11/commons-parent-11.pom
Downloading: http://repository.jboss.com/maven2/org/apache/commons/commons-parent/11/commons-parent-11.pom
Downloading: http://snapshots.jboss.org/maven2/org/apache/commons/commons-parent/11/commons-parent-11.pom
Downloading: http://repo1.maven.org/maven2/org/apache/commons/commons-parent/11/commons-parent-11.pom
24K downloaded
Downloading: http://repository.jboss.org/maven2/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.pom
17K downloaded
[WARNING] *** CHECKSUM FAILED - Checksum failed on download: local = '2491c90667a751a5b7a9ba115385bca54bd29d3d'; remote = '76672afb562b9e903674ad3a544cdf2092f1faa3' - RETRYING
Downloading: http://repository.jboss.org/maven2/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.pom
17K downloaded
[WARNING] *** CHECKSUM FAILED - Checksum failed on download: local = '2491c90667a751a5b7a9ba115385bca54bd29d3d'; remote = '76672afb562b9e903674ad3a544cdf2092f1faa3' - IGNORING
Downloading: http://repository.jboss.org/maven2/org/apache/commons/commons-parent/5/commons-parent-5.pom
15K downloaded
Downloading: http://repository.jboss.org/maven2/hsqldb/hsqldb/1.8.0.7/hsqldb-1.8.0.7.pom
Downloading: http://apiviz.googlecode.com/svn/site/repo/mvn/release/hsqldb/hsqldb/1.8.0.7/hsqldb-1.8.0.7.pom
Downloading: http://repository.jboss.com/maven2/hsqldb/hsqldb/1.8.0.7/hsqldb-1.8.0.7.pom
Downloading: http://snapshots.jboss.org/maven2/hsqldb/hsqldb/1.8.0.7/hsqldb-1.8.0.7.pom
Downloading: http://repo1.maven.org/maven2/hsqldb/hsqldb/1.8.0.7/hsqldb-1.8.0.7.pom
621b downloaded
Downloading: http://repository.jboss.org/maven2/commons-beanutils/commons-beanutils/1.8.0/commons-beanutils-1.8.0.jar
Downloading: http://apiviz.googlecode.com/svn/site/repo/mvn/release/commons-beanutils/commons-beanutils/1.8.0/commons-beanutils-1.8.0.jar
Downloading: http://repository.jboss.com/maven2/commons-beanutils/commons-beanutils/1.8.0/commons-beanutils-1.8.0.jar
Downloading: http://snapshots.jboss.org/maven2/commons-beanutils/commons-beanutils/1.8.0/commons-beanutils-1.8.0.jar
Downloading: http://repo1.maven.org/maven2/commons-beanutils/commons-beanutils/1.8.0/commons-beanutils-1.8.0.jar
225K downloaded
Downloading: http://repository.jboss.org/maven2/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar
59K downloaded
[INFO] [compiler:compile]
[INFO] Compiling 81 source files to http://hudson.qa.jboss.com/hudson/job/DNA%20continuous%20on%20JDK1.5/org.jboss.dna$dna-common-jdbc/ws/target/classes
[HUDSON] Archiving http://hudson.qa.jboss.com/hudson/job/DNA%20continuous%20on%20JDK1.5/org.jboss.dna$dna-common-jdbc/ws/pom.xml  to /home/hudson/hudson_workspace/jobs/DNA continuous on JDK1.5/modules/org.jboss.dna$dna-common-jdbc/builds/2008-12-08_10-51-52/archive/org.jboss.dna/dna-common-jdbc/0.4-SNAPSHOT/pom.xml
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Compilation failure

http://hudson.qa.jboss.com/hudson/job/DNA%20continuous%20on%20JDK1.5/org.jboss.dna$dna-common-jdbc/ws/src/main/java/org/jboss/dna/common/jdbc/model/spi/DatabaseBean.java :[103,19] illegal character: \65533

http://hudson.qa.jboss.com/hudson/job/DNA%20continuous%20on%20JDK1.5/org.jboss.dna$dna-common-jdbc/ws/src/main/java/org/jboss/dna/common/jdbc/model/spi/DatabaseBean.java :[1658,15] illegal character: \65533

http://hudson.qa.jboss.com/hudson/job/DNA%20continuous%20on%20JDK1.5/org.jboss.dna$dna-common-jdbc/ws/src/main/java/org/jboss/dna/common/jdbc/model/spi/DatabaseBean.java :[1667,13] illegal character: \65533

http://hudson.qa.jboss.com/hudson/job/DNA%20continuous%20on%20JDK1.5/org.jboss.dna$dna-common-jdbc/ws/src/main/java/org/jboss/dna/common/jdbc/model/spi/DatabaseBean.java :[1667,8] not a statement


[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 9 minutes 14 seconds
[INFO] Finished at: Mon Dec 08 11:01:09 EST 2008
[INFO] Final Memory: 41M/408M
[INFO] ------------------------------------------------------------------------



------------------------------

Message: 4
Date: Mon, 8 Dec 2008 11:20:35 -0500 (EST)
From: jboss-qa-internal@redhat.com
Subject: [dna-dev] Build failed in Hudson: DNA continuous on JDK1.5 ?
    JBoss DNA JDBC Common model #394
To: dna-dev@lists.jboss.org, rhauch@gmail.com
Message-ID:
    <2120698925.81228753235529.JavaMail.hudson@hudson1.qa.atl2.redhat.com>
Content-Type: text/plain; charset=us-ascii

See http://hudson.qa.jboss.com/hudson/job/DNA%20continuous%20on%20JDK1.5/org.jboss.dna$dna-common-jdbc/394/changes

------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Building JBoss DNA JDBC Common model
[INFO]    task-segment: [clean, package]
[INFO] ------------------------------------------------------------------------
[INFO] [clean:clean]
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:compile]
[INFO] Compiling 81 source files to http://hudson.qa.jboss.com/hudson/job/DNA%20continuous%20on%20JDK1.5/org.jboss.dna$dna-common-jdbc/ws/target/classes
[HUDSON] Archiving http://hudson.qa.jboss.com/hudson/job/DNA%20continuous%20on%20JDK1.5/org.jboss.dna$dna-common-jdbc/ws/pom.xml  to /home/hudson/hudson_workspace/jobs/DNA continuous on JDK1.5/modules/org.jboss.dna$dna-common-jdbc/builds/2008-12-08_11-17-16/archive/org.jboss.dna/dna-common-jdbc/0.4-SNAPSHOT/pom.xml
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Compilation failure

http://hudson.qa.jboss.com/hudson/job/DNA%20continuous%20on%20JDK1.5/org.jboss.dna$dna-common-jdbc/ws/src/main/java/org/jboss/dna/common/jdbc/model/spi/DatabaseBean.java :[103,19] illegal character: \65533

http://hudson.qa.jboss.com/hudson/job/DNA%20continuous%20on%20JDK1.5/org.jboss.dna$dna-common-jdbc/ws/src/main/java/org/jboss/dna/common/jdbc/model/spi/DatabaseBean.java :[1658,15] illegal character: \65533

http://hudson.qa.jboss.com/hudson/job/DNA%20continuous%20on%20JDK1.5/org.jboss.dna$dna-common-jdbc/ws/src/main/java/org/jboss/dna/common/jdbc/model/spi/DatabaseBean.java :[1667,13] illegal character: \65533

http://hudson.qa.jboss.com/hudson/job/DNA%20continuous%20on%20JDK1.5/org.jboss.dna$dna-common-jdbc/ws/src/main/java/org/jboss/dna/common/jdbc/model/spi/DatabaseBean.java :[1667,8] not a statement


[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3 minutes 15 seconds
[INFO] Finished at: Mon Dec 08 11:20:34 EST 2008
[INFO] Final Memory: 48M/474M
[INFO] ------------------------------------------------------------------------



------------------------------

_______________________________________________
dna-dev mailing list
dna-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/dna-dev


End of dna-dev Digest, Vol 9, Issue 7
*************************************


Start your day with Yahoo!7 and win a Sony Bravia TV. Enter now.