From: Christopher Dicely Date: 2008-04-17T01:15:48+09:00 Subject: Re: Is there a One True Postgres interface? Is Ruby-postgresmaintained? On Wed, Apr 16, 2008 at 8:57 AM, Phillip Gawlowski wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Thomas Kellerer wrote: > > | This is not want I meant. It's the driver that provides the JDBC API to > | the application. This is true for all 100% Java JDBC drivers. (e.g. the > | Oracle, SQL Server, MySQL). > > http://java.sun.com/products/jdbc/overview.html > > "JDBC Architecture > The JDBC API contains two major sets of interfaces: the first is the > JDBC API for application writers, and the second is the lower-level JDBC > driver API for driver writers." > > Later on: > > "Included in the Java Platform > As a core part of the Java 2 Platform, the JDBC API is available > anywhere that the platform is. This means that your applications can > truly write database applications once and access data anywhere. The > JDBC API is included in both the Java 2 Platform, Standard Edition > (J2SE) and the Java 2 Platform, Enterprise Edition (J2EE), providing > server-side functionality for industrial strength scalability." > > In short: The driver talks to the DB, hooking Java and the DB together > via the JDBC API. ODBC works similar (much less well, though, IME). > > > | > | I'm a complete newbie with Ruby, but from what I have seen, I would be > | very surprised if it wasn't possible to implement a pure Ruby > | implementation to communicate with a Postgres backend. How much work > | that would be, is probably another question though. > > Needs an API, though. And that needs working with Ruby's C code first, > to "teach" the Ruby language basic functionality (or to enable adapters > in a coherent manner). Even if Ruby didn't have a database API, why would it take working with Ruby's C code to add it? All an API is is a defined interface. > JDBC allows agnostic access to Databases. Theoretically, any way. > Similar to Sequel, DataMapper, or ActiveRecord in the Ruby space. ActiveRecord, DataMapper, and Sequel are ORM libraries, not really comparable to JDBC. JDBC's closest Ruby equivalent is Ruby-DBI.