Developer Notes - ITwelzel.biz
Developer Notes - ITwelzel.biz
Developer Notes - ITwelzel.biz
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
The following script creates and populates our Address database:<br />
create table address(street varchar,city varchar,state varchar,zip varchar)<br />
insert into address (street,city,state,zip) values('123 Anywhere<br />
St.','Hippsville','Utah','84321')<br />
insert into address (street,city,state,zip) values('456 Nowhere<br />
Ave.','Mytown','Utah','84789')<br />
insert into address (street,city,state,zip) values('111 S. 222.<br />
E.','Yourtown','Utah','84654')<br />
set autocommit true<br />
The following script creates and populates our Company database:<br />
create table company(name varchar,industry varchar)<br />
insert into company (name,industry) values('Acme','Textiles')<br />
insert into company (name,industry) values('Company<br />
B','Manufacturing')<br />
set autocommit true<br />
Conclusion<br />
<strong>Developer</strong> <strong>Notes</strong><br />
This AppNote introduced how the DAO strategy supports multiple JDBC<br />
databases with a single DAO class. It reduces redundant code and makes new<br />
database types simpler to include. To support a new database type, you merely<br />
add SQL statements for that database type to an XML configuration file, update<br />
the environment entry to use the new type, and then re-initialize the DAO.<br />
In the next AppNote in this series, we will discuss how our DAO framework can<br />
also be used to simplify and unify access to Web service provider sources.<br />
For Additional Information<br />
For more information about the technologies discussed in this AppNote, refer to<br />
the following resources:<br />
• For more information about JDBC, visit<br />
http://java.sun.com/products/jdbc/learning.html.<br />
• For more information about the DAO pattern, visit<br />
http://java.sun.com/blueprints/patterns/DAO.html.<br />
• For more information about the hsqldb Database Engine, visit<br />
http://hsqldb.sourceforge.net/.<br />
58<br />
www.novell.com/appnotes