Prev | Current Page 71 | Next

Kevin Marshall, Chad Pytel, and Jon Yurek

"Pro Active Record: Databases with Ruby and Rails"

This value is provided in plain text.
The following example shows how to open an Active Record database connection for
Sybase:
ActiveRecord::Base.establish_connection(:adapter => "sybase",
:database => "test", :host => "www.yourdbserver.com",
:usrname => "kevin", :password => "test")
Learning More
By design, Active Record abstracts many of the details of each database, leaving the developer
free to focus on the details of coding the application. Switching from one backend database to
another, from an Active Record view, generally requires little more than changing your connection
information. For the most part, Active Record developers are shielded from having to learn
the specifics of any one database implementation??”or even most of ANSI SQL for that matter.
Still, each database is fundamentally different and will provide varying levels of support
for features and data types. Some will readily support triggers, sequences, and stored procedures;
others will not. Some will have elegant ways of dealing with CLOB and BLOB data types;
others will not.


Pages:
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83