We ve covered a lot of territory so far in this book. Now we can put some of your newly gained knowledge to use. In this chapter, we will explore what it takes to develop a JDBC driver. In doing so, we will also touch on some of the finer points of the JDBC specification. Throughout this chapter, I will use excerpts from the SimpleText JDBC driver that is included on the CD-ROM. This driver allows you to manipulate simple text files; you will be able to create and drop files, as well as insert and select data within a file. The SimpleText driver is not fully JDBC-compliant, but it provides a strong starting point for developing a driver. We ll cover what the JDBC components provide, how to implement the JDBC API interfaces, how to write native code to bridge to an existing non-Java API, some finer points of driver writing, and the major JDBC API interfaces that must be implemented. The JDBC Driver Project: SimpleText The SimpleText JDBC driver is just that a JDBC driver that manipulates simple text files, with a few added twists. It is not a full-blown relational database system, so I would not recommend attempting to use it as one. If you are looking for a good way to prototype a system, or need a very lightweight database system to drive a simplistic application or applet, then SimpleText is for you. More importantly, though, the SimpleText driver can serve as a starting point for your own JDBC driver. Before continuing, let s take a look at the SimpleText driver specifications. SimpleText SQL Grammar The SimpleText JDBC driver supports a very limited SQL grammar. This is one reason that the driver is not JDBC compliant; a JDBC-compliant driver must support ANSI92 entry level SQL grammar. The following SQL statements define the base SimpleText grammar: create-table-statement ::= CREATE TABLE table-name (column-element [, column- element]…) drop-table-statement ::= DROP TABLE table-name insert-statement ::= INSERT INTO table-name [(column-identifier [, column- identifier]…)] VALUES (insert-value [, insert-value]…) select-statement ::= SELECT select-list FROM table-name [WHERE search- condition] The following elements are used in these SQL statements: column-element ::= column-identifier data-type column-identifier ::= user-defined-name comparison-operator ::= < | > | = | <>
We are comcast web hosting company willing to take you step further, please look comcat web hosting services.