In fact, an application query need not even be SQL, or it may be a specialized derivative of SQL, e.g. for document or image queries, designed for specific DBMSs.In order to pass JDBC compliance tests and to be called "JDBC COMPLIANT ?" we require that a driver support at least ANSI SQL-2 Entry Level. This gives applications that want wide portability a guaranteed least common denominator. We believe ANSI SQL-2 Entry Level is reasonably powerful and is reasonably widely supported today.
JDBC答应查询表达式直接传递到底层的数据驱动,这样一个程序可以获得尽量多的SQL功能,但是可能被DBMS拒绝。事实上,一个程序的查询甚至可以不是SQL的,或者是SQL的一个非凡演化,例如:为专门数据库设计的文本或者图形查询。 为了通过JDBC兼容的测试,并且能够被称为JDBC兼容,我们要求一个驱动至少支持ANSI SQL-2的标准。这使得那些需要广泛移植性的程序获得一个最小的分母(这句话的原文是: This gives applications that want wide portability a guaranteed least common denominator.)。 我们相信ANSI SQL-2是足够强大的,并且是得到足够支持的。
2.3. JDBC必须可以建立在现有的数据库接口上
我们必须能够保证 JDBC SQL API 能够建立在普通的SQL API上,尤其是ODBC。这些要求已经对这个规范的一些部分产生了影响,尤其是对传出参数(OUT parameter)和大数据块的处理。
We would PRefer to keep this base API as simple as possible, at least initially. In general we would prefer to provide a single mechanism for performing a particular task,and avoid provid-ing duplicate mechanisms. We will extend the API later if any important functionality is miss-ing.
Before looking at specifics of the JDBC API, an understanding of typical use scenarios is help-ful. There are two common scenarios that must be treated differently for our purposes: applets and applications.