Prev | Current Page 147 | Next

Brad Ediger

"Advanced Rails"

See http://en.wikipedia.org/wiki/ACID for a full definition and explanation.
??  Instructions are at http://wiki.rubyonrails.org/rails/pages/HowtoConnectToMicrosoftSQLServerFromRailsOnLinux;
FreeTDS is available from http://www.freetds.org/.
??? http://rubyforge.org/projects/ruby-oci8/
Large/Binary Objects | 101
However, the Oracle client library still maps net service names to connection specifications,
so the host parameter provides a service name rather than a physical
hostname:
development:
adapter: oci
host: ORCL
username: user
password: pass
The ORCL in the preceding configuration corresponds to an entry in the TNSNAMES.
ORA file, which will look something like this:
ORCL =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = srv)(PORT = 1521))
)
...
)
Alternatively, you can provide the connection specification on one line with the Rails
database configuration:
development:
adapter: oci
host: (DESCRIPTION = (ADDRESS_LIST = (...)))
username: user
password: pass
The connection setup is the hardest part. Once the database is connected, Rails supports
Oracle connections just as it does connections to any other DBMS. Stored procedures
and other Oracle-specific syntax are available through the standard methods
that expose an SQL interface, such as ActiveRecord::Base.find_by_sql.
Large/Binary Objects
Sooner or later, many web applications must deal with the issue of LOB (large
object) data.


Pages:
135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159