This chapter describes various ways the client applications can communicate with Teradata Database.
Topics in this chapter include: • Attachment methods
• Network attachment methods
• Illustrating network attachment methods • Channel attachment methods
Attachment Methods
Clients can connect to Teradata Database using one of the following methods: • Network-attached through a Local Area Network (LAN), including:
• Java Database Connectivity (JDBC) • .NET Data Provider
• Open Database Connectivity (ODBC)
• Call Level interface Version 2 for Network-Attached Systems (CLIv2-NAS), a library of service routines that act as subroutines of the application
• OLE DB for Teradata
• Channel-attached through an IBM mainframe, using Call Level Interface Version 2 for Channel-Attached System (CAS), a library of service routines that act as subroutines of the application
Network Attachment Methods
Java Database Connectivity
Teradata JDBC Driver provides access Teradata Database using the Java language.
Java Database Connectivity (JDBC) is a specification for an API. The API allows platform- independent Java applications to access Teradata Database using SQL and, for Teradata Database running on 64-bit Windows and Linux, external stored procedures.
Network Attachment Methods
• Opening connections to databases • Executing SQL statements
• Processing results
Teradata JDBC Driver is a type 4 (pure Java) JDBC Driver. It is a set of Java classes that use TCP/IP to communicate directly with Teradata Database.
Open Database Connectivity
The Open Database Connectivity (ODBC) Driver for Teradata Database provides an interface to Teradata Databases using the industry standard ODBC Application Programming Interface (API).
The ODBC Driver for Teradata Database provides Core-level SQL and Extension-level 1 (with some Extension-level 2) function call capability using the Windows Sockets (WinSock) Transmission Control Protocol/Internet Protocol (TCP/IP) communications software interface. ODBC operates independently of CLI.
.NET Data Provider
The .NET Data Provider for Teradata uses CLIv2 to connect, execute commands, and retrieve results from Teradata.
Results can be processed directly or cached in an ADO.NET DataSet. An ADO.NET DataSet can generate XML and is the bridge between relational and XML data sources.
CLIv2 for Network-Attached Systems
CLIv2 is a collection of callable service routines that provide the interface between applications on a LAN-connected client and Teradata Database server.
CLI is the interface between the application program and the Micro Teradata Director Program (MTDP). CLIv2 can:
• Build parcels that MTDP packages for sending to Teradata Database using the Micro Operating System Interface (MOSI).
• Provide the application with a pointer to each of the parcels returned from Teradata Database.
MTDP performs many of the same functions as the channel-based Teradata Director program (TDP), including session initiation and termination, physical input to and output from the server, and logging, verification, recovery, and restart. Unlike TDP, MTDP does not control session balancing. Session balancing is controlled by Teradata Database Gateway on the server. MOSI is a library of service routines that provides operating system independence among the clients that access Teradata Database. With MOSI, only one version of MTDP is required to run on all network-connected platforms.
Illustrating Network Attachment Methods
OLE DB Provider for Teradata
The OLE DB Provider for Teradata allows programmers to design application programs to interface with Teradata Database that do not use SQL.
An application program requests database information from an intermediate program, which in turn accesses Teradata Database. The intermediate program receives the response from Teradata Database and returns a copy of the desired data to the application program. OLE DB terminology refers to the application program as the consumer and the intermediate program as the provider.
OLE DB also introduces the notion of service providers. A service provider enhances the functionality of a provider; for example, the Microsoft Cursor Service for OLE DB adds client- side cursor support to any provider.
Preprocessor2
For information on Preprocessor2 (PP2), see “Embedded SQL Applications” on page 101.
Illustrating Network Attachment Methods
The following figure illustrates the transparent connection between client applications and Teradata Database.
Channel Attachment Method
CLIv2 is a collection of callable service routines that provide the interface between applications and Teradata Director Program (TDP) on an IBM mainframe client.
Teradata Database Server REQUESTS RESPONSES 1091A006 Client Application Program Client Application Program Client Application Program Client Application Program Client Application Program .NET Data Provider
Channel Attachment Method
TDP is the interface between CLIv2 and Teradata Database server. CLIv2 can operate with all versions of IBM operating systems, including z/OS, Customer Information Control System (CICS), Information Management System (IMS), and Virtual Machine (VM).
What CLIv2 for Channel-Attached Clients Does
By way of TDP, CLIv2 sends requests to the server, and provides the application with a response returned from the server by way of TDP.
CLIv2 provides support for:
• Managing multiple serially executed requests in a session
• Managing multiple simultaneous sessions to the same or different servers
• Using cooperative processing so that the application can perform operations on the client and the server at the same time
• Communicating with Two-Phase Commit (2PC) coordinators for CICS and IMS transactions
• Generally insulating the application from the details of communicating with a server
Teradata Director Program
TDP manages communications between CLIv2 and a server. The program executes on the same mainframe as CLIv2, but runs as a different job or virtual machine. Although an individual TDP is associated with one logical server, any number of TDPs may operate and be accessed by CLIv2 simultaneously on the same mainframe. Each TDP is referred to by the application with an identifier called the TDPid (for example, TDP2) that is unique in a mainframe.
Functions of TDP include the following: • Session initiation and termination
• Logging, verification, recovery, and restart
• Physical input to and output from the server, including session balancing and queue maintenance
• Security
Teradata Database Server
A server implements the actual relational database that processes requests received from CLIv2 by way of TDP.
For More Information
For More Information
For more information on the topics presented in this chapter, see the following Teradata Tools and Utilities books.
Application Program CLIv2 TDP Teradata Database Server TDP Teradata Database Server TDP Teradata Database Server REQUESTS RESPONSES 1091B004
To learn more about… THEN see…
Call-Level Interface programming • Teradata Call-Level Interface Version 2 Reference for Channel-Attached Systems
• Teradata Call-Level Interface Version 2 Reference for Network-Attached Systems
JDBC, including Java language external stored procedures that use JDBC
• Teradata Driver for the JDBC Interface User Guide
• SQL Reference: UDF, UDM, and External Stored Procedure Programming
• SQL Reference: Data Definition Statements
Micro Teradata Directory Program • Database Administration
• Teradata Call-Level Interface Version 2 Reference for Network-Attached Systems
For More Information
OLE DB Provider OLE DB Provider for Teradata Installation and User Guide
.NET Data Provider .NET Data Provider for Teradata
Teradata Director Program Teradata Director Program Reference