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答應(yīng)查詢表達(dá)式直接傳遞到底層的數(shù)據(jù)驅(qū)動(dòng),這樣一個(gè)程序可以獲得盡量多的SQL功能,但是可能被DBMS拒絕。事實(shí)上,一個(gè)程序的查詢甚至可以不是SQL的,或者是SQL的一個(gè)非凡演化,例如:為專(zhuān)門(mén)數(shù)據(jù)庫(kù)設(shè)計(jì)的文本或者圖形查詢。 為了通過(guò)JDBC兼容的測(cè)試,并且能夠被稱(chēng)為JDBC兼容,我們要求一個(gè)驅(qū)動(dòng)至少支持ANSI SQL-2的標(biāo)準(zhǔn)。這使得那些需要廣泛移植性的程序獲得一個(gè)最小的分母(這句話的原文是: This gives applications that want wide portability a guaranteed least common denominator.)。 我們相信ANSI SQL-2是足夠強(qiáng)大的,并且是得到足夠支持的。
2.3. JDBC必須可以建立在現(xiàn)有的數(shù)據(jù)庫(kù)接口上
我們必須能夠保證 JDBC SQL API 能夠建立在普通的SQL API上,尤其是ODBC。這些要求已經(jīng)對(duì)這個(gè)規(guī)范的一些部分產(chǎn)生了影響,尤其是對(duì)傳出參數(shù)(OUT parameter)和大數(shù)據(jù)塊的處理。
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.