Java DB and JDBC(Embedded Derby)

彩虹彩虹彩虹彩虹彩虹彩虹

There are two patterns of Derby, Embedded and Network Server.

礼品盒礼品盒礼品盒Pattern I:

红玫瑰 how to connect to the database?

1. load the embedded driver;

2. wanna create a DB? then set some properites;

3. create and connect to the database using DriverManager;

红玫瑰 how to operate on the DB?

1. create a statement from the connection;

2. execute the statement and put the results into result set;

3. do something on the result;

红玫瑰 some cleaning work?

1. I know you remember this, aha~

红玫瑰 where to get the code?

http://www.qqread.com/java/2008/08/w427265.html

礼品盒礼品盒礼品盒Pattern II:

红玫瑰 How it works?

It is just for application of different JVM, the classic client/server framework.

YSEMK)(]LSWHJ39JE$BKOHW

红玫瑰 How to develop?

Client-code: nothing serious difference from the embedded pattern, other than some String arguments;

Server-code: just run a command to start up the server.

红玫瑰 where to get the code?

http://www.qqread.com/java/2008/08/w427265.html

凋谢的玫瑰凋谢的玫瑰凋谢的玫瑰凋谢的玫瑰凋谢的玫瑰 I wanna do some practice, but…

凋谢的玫瑰凋谢的玫瑰凋谢的玫瑰凋谢的玫瑰凋谢的玫瑰 It took me for more than one hour to install Mysql database, see it? haha~~

%A~7A~}1X0}EZIJ)M9RC[60

原文地址:https://www.cnblogs.com/alipayhutu/p/2316694.html