ODBC Definitions



Application


An application, as it relates to the ODBC standard, performs tasks such as: requesting a connection to a data source; sending SQL requests to a data source; processing errors; and terminating the connection to a data source. It may also perform functions outside the scope of the ODBC interface.


Conformance


There are two types of conformance levels for ODBC drivers--ODBC API and ODBC SQL grammar (see SQL Grammar). Knowing the conformance levels helps you determine the range of functionality available through the driver, even if a particular database does not support all of the functionality of a particular level.


For ODBC API conformance, most quality ODBC drivers support Core, Level 1, and a defined set of Level 2 functions, depending on the database being accessed.


Connection String


A string passed in code that specifies connection information directly to the Driver Manager and driver.


Data Source


A data source includes both the source of data itself, such as relational database, a flat-file database, or even a text file, and the connection information necessary for accessing the data. Connection information may include such things as server location, database name, logon ID, and other driver options. Data source information is usually stored in a DSN (see Data Source Name).


Driver


An ODBC driver communicates with the application through the Driver Manager and performs tasks such as: establishing a connection to a data source; submitting requests to the data source; translating data to and from other formats; returning results to the application; and formatting errors into a standard code and returning them to the application.


Driver Manager


The main purpose of the Driver Manager is to load drivers for the application. The Driver Manager also processes ODBC initialization calls and maps data sources to a specific driver.


DSN (Data Source Name)


A DSN stores the data source information (see Data Source) necessary for the Driver Manager to connect to the database. This can be configured either through the ODBC Administrator or in a DSN file. On Windows, the information is called a system or user DSN and is stored in the Registry. Data source information can also be stored in text configuration files, as is the case on UNIX.


DTC (Distributed Transaction Coordinator)


In Microsoft Windows NT, Windows 2000, Windows XP, and the Windows Server 2003 family, the DTC is a system service that is part of COM+ services. COM+ components that use DTC can enlist ODBC connections in distributed transactions. This makes it possible to scale transactions from one to many computers without adding special code.


Isolation Level


An isolation level represents a particular locking strategy employed in the database system to improve data consistency. The higher the isolation level number, the more complex the locking strategy behind it. The isolation level provided by the database determines how a transaction handles data consistency.


The American National Standards Institute (ANSI) defines four isolation levels:
  • Read uncommitted (0)
  • Read committed (1)
  • Repeatable read (2)
  • Serializable (3)

Locking Level


Locking is a database operation that restricts a user from accessing a table or record. Locking is used in situations where more than one user might try to use the same table or the same time. By locking the table or record, only one user at a time can affect the data.


MTS


Microsoft Transaction Server (MTS) is a component-based transaction processing system for developing, deploying, and managing high-performance, scalable, and robust enterprise, Internet, and intranet server applications. MTS was the precursor to COM+, the current version of this processing system (see DTC).


ODBC Administrator


On Windows, the Microsoft ODBC Data Source Administrator manages database drivers and configures system and user DSNs. On computers running the Microsoft Windows 2000 or XP operating systems, this application is located in the Windows Control Panel under Administrative Tools. Its icon is named "Data Sources (ODBC)."


In UNIX environments, there is no ODBC Administrator. To configure a data source, you must create or edit the system information file, a plain text file that contains file DSNs.


SQL Grammar


ODBC defines a core grammar that roughly corresponds to the X/Open and SQL Access Group SQL CAE specification (1992). ODBC also defines a minimum grammar, to meet a basic level of ODBC conformance, and an extended grammar, to provide for common DBMS extensions to SQL. The following list summarizes the grammar included in each conformance level:


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 (such as A > B + C).
  • 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, set functions such as SUM and MIN.
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 such as SUBSTRING and ABS, date, time, and timestamp literals.
  • Data types: BIT, TINYINT, BIGINT, BINARY, VARBINARY, LONG VARBINARY, DATE, TIME, TIMESTAMP
  • Batch SQL statements.
  • Procedure calls.

Unicode


Unicode, developed by the Unicode Consortium, is a standard that attempts to provide unique coding for all international language characters. The current number of supported characters is over 95,000.

Click here for more on Unicode and ODBC from DataDirect.

ODBC RESOURCES

ODBC - WHAT'S NEW

» Platinum ODBC

It's All About Cognos!

IBM certifies and recommends DataDirect ODBC for connecting IBM Cognos BI Server to data located in Microsoft SQL Server.

» Read the TUTORIAL

» DOWNLOAD a free, 15 day trial of Connect for ODBC v.5.3 (for Cognos 8 users)