[Rails] Connecting to MySQL
rubyonrails at freeze.org
rubyonrails at freeze.org
Wed Nov 10 16:13:55 GMT 2004
Hi
It just occured to me that I didn't know how raile (Activerecord actually)
connects to a MySQL server, so I went and checked out the code.
To my surprise, it looks like activerecord is writing socket code
to connect directly to the server and not using some mysql or
dbi layer. Very impressive.
However, now my question is, is there an advantage to using the mysql
shared library? It's been years since I looked at that library and
I'm not sure what it does, other than it was written in C.
Here's a hypothetical question: Say I wanted to access a MySQL server
(possibly local, possibly not) in an application (not rails).
Would I be better off using the MySQL shared library or using
something like ActiveRecord? When I say 'better off', I am
mainly referring to speed, but, ease of use matters as well.
Anyway, thanks for listening to my ramblings. All insights are
appreciated.
--
Jim Freeze
More information about the Rails
mailing list