ODBC API Conformance

ODBC SQL Conformance

ODBC defines a minimum grammar requirement to meet a basic level of SQL conformance. ODBC drivers that support core and extended SQL grammar can use more complex SQL commands.

click to view at full size.

Figure 6.15 Driver requirements

All drivers must conform to the minimum grammar. As with API conformance, a driver must meet all elements of the SQL conformance level in order to comply with that level.

The following lists summarize the conformance levels for the SQL 92 specification.

Minimum SQL Grammar

  • Data Definition Language (DDL): CREATE TABLE and DROP TABLE.
  • Data Manipulation Language (DML): simple SELECT, INSERT, UPDATE SEARCHED, and DELETE SEARCHED.
  • Expressions: simple.
  • Data Types: CHAR, VARCHAR, or LONG VARCHAR.

Core SQL Grammar

  • Minimum SQL grammar and data types.
  • DDL: ALTER TABLE, CREATE INDEX, DROP INDEX, CREATE VIEW, DROP VIEW, GRANT, and REVOKE.
  • DML: full SELECT.
  • Expressions: subquery, aggregate set functions.
  • Data types: DECIMAL, NUMERIC, SMALLINT, INTEGER, REAL, FLOAT, DOUBLE PRECISION.

Extended SQL Grammar

  • Minimum and Core SQL grammar and data types.
  • DML: outer joins, positioned UPDATE, positioned DELETE, SELECT FOR UPDATE, and unions.
  • Expressions: scalar functions, date, time, and timestamp literals.
  • Data types: BIT, TINYINT, BIGINT, BINARY, VARBINARY, LONG VARBINARY, DATE, TIME, TIMESTAMP.
  • Batch SQL statements.
  • Procedure calls.

Lesson Summary

ODBC provides a common interface for accessing heterogeneous SQL databases. ODBC allows developers to build and distribute a client/server application without targeting a specific DBMS. Database drivers link the application to a DBMS. The ODBC Driver Manager loads the application database drivers to allow the client application to access the database. A data source name (DSN) specifies the location, driver type, and other parameters needed by the ODBC driver to access a database. All ODBC drivers must meet certain ODBC API and SQL conformance standards.


Microsoft Windows Architecture Training
Microsoft Windows Architecture for Developers Training Kit
ISBN: B00007FY9D
EAN: N/A
Year: 1998
Pages: 324

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net