Browse files

Re-org into a separate section for each: AR and DM

  • Loading branch information...
1 parent 94a1a48 commit 1431b0f55b086bbc17a9ba49565900d8a04b9e2a @jcrossley3 jcrossley3 committed May 10, 2011
Showing with 41 additions and 37 deletions.
  1. +41 −37 docs/en-US/src/main/docbook/database.xml
View
78 docs/en-US/src/main/docbook/database.xml
@@ -4,14 +4,17 @@
<chapter id="database">
<title>Database Connectivity</title>
- <para>Typical applications require the use of databases. Within the Rails
- community, ActiveRecord is one of the more popular database connectivity
- libraries. With traditional Ruby-based applications, you needed to require
- the correct ActiveRecord adapter for the database you were connecting to.
- Each adapter managed the communication between the client and the end
- database, directly mediating the connection.</para>
+ <section>
+ <title>ActiveRecord</title>
+
+ <para>Typical applications require the use of databases. Within the Rails
+ community, ActiveRecord is one of the more popular database connectivity
+ libraries. With traditional Ruby-based applications, you needed to require
+ the correct ActiveRecord adapter for the database you were connecting to.
+ Each adapter managed the communication between the client and the end
+ database, directly mediating the connection.</para>
- <para><mediaobject>
+ <para><mediaobject>
<imageobject role="html">
<imagedata align="center" fileref="images/database-traditional.png"
format="PNG" scale="70" />
@@ -23,13 +26,13 @@
</imageobject>
</mediaobject></para>
- <para>Since TorqueBox is based on the JBoss Java environment, it has the
- capability to use enterprise-grade JDBC (Java Database Connectivity API)
- drivers. Rails applications can take advantage of these drivers by using the
- generic ActiveRecord JDBC adapter. The adapter will locate and activate the
- correct underlying Java JDBC adapter for the target database.</para>
+ <para>Since TorqueBox is based on the JBoss Java environment, it has the
+ capability to use enterprise-grade JDBC (Java Database Connectivity API)
+ drivers. Rails applications can take advantage of these drivers by using the
+ generic ActiveRecord JDBC adapter. The adapter will locate and activate the
+ correct underlying Java JDBC adapter for the target database.</para>
- <para><mediaobject>
+ <para><mediaobject>
<imageobject role="html">
<imagedata align="center" fileref="images/database-jdbc.png"
format="PNG" scale="70" />
@@ -41,38 +44,39 @@
</imageobject>
</mediaobject></para>
- <para>The most visible change required of applications using the JDBC-based
- ActiveRecord adapter involves the gems your application must rely on.
- Primarily you must rely on the <code>activerecord-jdbc-adapter</code>. This
- adapter is adjusts ActiveRecord configuration to use the JDBC version of any
- specified driver.</para>
+ <para>The most visible change required of applications using the JDBC-based
+ ActiveRecord adapter involves the gems your application must rely on.
+ Primarily you must rely on the <code>activerecord-jdbc-adapter</code>. This
+ adapter is adjusts ActiveRecord configuration to use the JDBC version of any
+ specified driver.</para>
- <para>Additional gems need to be available to your system, depending on your
- target database:</para>
+ <para>Additional gems need to be available to your system, depending on your
+ target database:</para>
- <itemizedlist spacing="compact">
- <listitem>
- <para><filename>jdbc-postgres</filename></para>
- </listitem>
+ <itemizedlist spacing="compact">
+ <listitem>
+ <para><filename>jdbc-postgres</filename></para>
+ </listitem>
- <listitem>
- <para><filename>jdbc-mysql</filename></para>
- </listitem>
+ <listitem>
+ <para><filename>jdbc-mysql</filename></para>
+ </listitem>
- <listitem>
- <para><filename>jdbc-sqlite3</filename></para>
- </listitem>
- </itemizedlist>
+ <listitem>
+ <para><filename>jdbc-sqlite3</filename></para>
+ </listitem>
+ </itemizedlist>
- <para>These gems simply embody the Java JAR holding the actual underlying
- JDBC driver.</para>
+ <para>These gems simply embody the Java JAR holding the actual underlying
+ JDBC driver.</para>
- <para>No changes to your application's database configuration is required.
- You still specify the correct driver name for the database, such as
- <code>postgresql</code> or <code>sqlite3</code>.</para>
+ <para>No changes to your application's database configuration is required.
+ You still specify the correct driver name for the database, such as
+ <code>postgresql</code> or <code>sqlite3</code>.</para>
+ </section>
<section>
- <title>Using DataMapper</title>
+ <title>DataMapper</title>
<para>
Not everyone uses ActiveRecord to connect to a database. TorqueBox
also works well with DataMapper, and you don't have to do anything special.

0 comments on commit 1431b0f

Please sign in to comment.