From: Kirk Haines Date: 2005-04-08T00:39:41+09:00 Subject: Re: In-depth schema details in ActiveRecord Jason Foreman wrote: > I'm also new to Ruby and RubyOnRails. Coming from Java, we have the > benefit of the JDBC standard that most db drivers followed reasonably > well. The metadata provided by the driver could give me tons of > useful info. Does such a construct exist in Ruby (DBI?) that could > be leveraged in something like AR? I notice that AR has various > adapters for different databases, this might provide some insight. > I'll try to dig into all this over the weekend. Ruby does have a DBI implementation. The ORM I primarily use and develop on (Kansas) uses it because it was a very simple way to gain usability with a variety of database backends. The biggest drawback to using DBI, and the reason, I assume, why neither AR nor Og do, is performance. Purpose built adapters to connect an ORM right with the low level driver for a given database are going to perform better (faster, less RAM usage) than going through DBI. In practice, the DBI tax has not been a problem for me, but one of my goals is to make a set of purpose build adapters available for Kansas so that one may use them instead of DBI for supported databases (which will probably initially be MySQL, PostreSQL, and SQLite2&3) because I can forsee it potentially being a problem in the future. Kirk Haines