一、

Loading the Database Driver
前面第一步说了,要制定数据库的驱动,所以我们现在要做的是:怎么制定(载入)数据库的驱动呢? 
ØWe  load the driver class by calling Class.forName() with the Driver class name as an argument.
句子结构分析:
主语:我们
谓语:载入
宾语:驱动
宾语子句:通过调用Class.forName(),怎么调用:将驱动的类的名字作为参
ØOnce loaded, the Driver class creates an instance of itself.
 instance:  n. 实例;情况;建议    vt. 举...为例
一旦载入,这个驱动的类就自己创建了一个实例
为什么要创建实例呢?
ØThe General format is :
              Class.forName( String ClassName );
General:  adj. 一般的,普通的;综合的;大体的  n. 将军,上将;一般;常规
一般的形式就是:Class.forName( String ClassName );
按照上面所讲的String ClassName,这个参数也就是驱动的名字。
 
ØClass is a class in java.lang package.
这里C大写的Class指的是Class.forName中的Class。
这个地方告诉我们这个类是java.lang包中的一个类
那在逻辑上这个地方应该问java.lang这是一个什么包?
软件包 java.lang 的描述
  提供利用 Java 编程语言进行程序设计的基础类。最重要的类是 Object(它是类层次结构的根)和 Class(它的实例表示正在运行的应用程序中的类)。
ØExample : Class.forName("oracle.jdbc.driver.OracleDriver");
这个地方是一个举例说明,实际上是上面讲到的Class.forName(String ClassName)的一个具体情况,这里的参数String ClassName是oracle.jdbc.driver.OracleDriver,说明了这个驱动的类的名字就是oracle.jdbc.driver.OracleDriver
 
We are using type4 oracle driver.
这个地方指明了我们使用的是第四种类型的驱动,前面讲过了驱动共有四种类型,第四种类型的描述是  ”Type 4 Driver or Native-Protocol Driver ”,中文解释是“直接与数据库相连的纯Java驱动程序”,通过这个例子也告诉我们什么叫做直接与数据库相连的纯java驱动程序了
 二、
  DriverManager class
  前面一段将的是怎么载入制定的驱动,那很明显的是驱动载入后,肯定就是也要管理的了。不管理那怎么行呢。
ØManages all the JDBC Drivers that are loaded in the memory
驱动管理类DriverManager class是干什么的,晕,这个废话也说,从名字就能知道了呀,不就是管理所有的JDBC驱动的么,当然这些内存是载入到内存中的驱动了,不载入要管理个屁呢。
ØHelps in dynamic loading of Drivers
这个就奇怪了,不是说管理驱动的么,没载入也可以帮助呀,这个是讲帮助动态载入驱动的。
为什么要动态载入驱动呢?
动态这个词到底起了什么作用呢?
看下面的内容可能会有讲解
ØIts getConnection() method is used to establish a connection to a database.
这句话中直接给我们讲了驱动管理类DriverManager class中的一个方法:getConnection()。并且说明了这个方法是用来干什么的:用来建立一个数据库的连接的。在具体的理解一下,前面讲的是通过Class.forName( String ClassName );来制定用哪个驱动,但是驱动指定了并木有建立连接了,驱动指定了并木有和数据库建立连接,这个时候就需要getConnection()这个方法了。
ØIt uses a username, password, and a jdbc url to establish a connection to the database and returns a connection object.
ok,讲了用getConnection()这个方法可以和数据库建立连接了,但是问题是这个方法怎么用,空空的什么也没有,肯定是不好和数据库建立连接的,想一想,数据库还有自己的名字,而且要登录数据库还需要用户名和密码,所以getConnection()方法的使用肯定是还需要一些参数的。这个地方就讲了需要哪些参数的,也说明了通过getConnection()方法连接后,总会做出点什么结果的,总不能连接了后啥行动也没有。所以建立连接后返回了一个连接的对象。
The DriverManager class provides methods to obtain a connection to a database through a driver, register and deregister drivers, set up logging, and set login timeouts for database access. When you request a connection it returns an object of the Connection interface. The Connection object is then used to create SQL statements and handle ResultSets.
set up:  v. 建立;装配;开业;竖立
logging:  n. 记录;伐木工作 v. 把…锯成段木;砍伐树木(log的ing形式)
timeouts:  n. 超时设定
handle:  这里当做"处理"来理解
 
 再次具体的总结了,总的说明了驱动管理类DriverManager class是干什么的:驱动管理类DriverManager class提供了一些方法,这些方法可以通过一个指定好的驱动和数据库建立一个连接。使用驱动应该相当于注册,所以驱动管理类DriverManager class还提供了一些方法,这些方法可以注册、注销各种驱动。我们还要注意的是,还有一点前面没有提,在其他地方可以也会说的比较少,那就是驱动管理类DriverManager class还提供了一些方法来建立记录,并且驱动管理类DriverManager class还有一些方法是用来设置连接时那个数据库登录的超时设定的,这样可以控制访问数据库的时间。
同时只要你要求建立一个连接后,就会返回一个连接接口的对象。
返回的连接接口的对象有什么用呢,为什么要返回这个连接对象,很明显,肯定是有用的。这个对象在我们之后可以用来创建SQL的语句,或者用来处理结果集ResultSets。也就是说,如果不返回连接对象,那么程序和数据虽然建立连接了,但是仍然什么也干不了,什么也不能做,就只是建立了一个连接。
public static synchronized Connection getConnection
(String url ,String user, String password) throws SQLException
详细的说明了getConnection()简单的定义。说明了这个方法有哪些参数
In this method, the along with the URL, the user Id and password can be passed directly but not a very good way because mutiple changes need to be made when there are changes in userId and password
 这里在详细的分析一下上面的方法:在这个方法中,伴随着URL,用户的ID和密码可以直接传输,但是不是一个非常好的方式,因为多个变化需要修改,当在用户名和密码有改变的时候。
这里告诉我们的是,按照上面那样直接用用户名和密码不太好,因为啊,只要用户名和密码一改,很多地方可能都要改了。可能要问了,那应该怎么办呢?那就要看下面的了。
DriverManager.getConnection(“jdbc:oracle:thin:@IP of the Oracle server:host string”, “”, “”);
 public static synchronized void registerDriver(java.sql.Driver
driver) throws SQLException
This method is invoked by Drivers to register themselves with DriverManager. This
is generally used when you have a custom driver to connect to the database. The
following example illustrates the use of the method.
/* myDriver is a custom driver written in Java. How to write a driver is beyond the scope of this session */
DriverManager.registerDriver(Driver myDriver);
 public static void setLogStream(java.io.PrintStream out) throws SQLException