IBM Books

Embedded SQL Programming Guide

About This Book

This book discusses how to design and code application programs that access DB2 databases and application servers. It presents detailed information on the use of Structured Query Language (SQL) in supported host language programs. Where you require information unique to your specific operating system, see the appropriate book from the following list. This book refers to the following titles collectively as DB2 SDK Building Applications:

To effectively utilize the information in this book to design, write, and test your DB2 application programs, you need to refer to the SQL Reference alongside this book. If you are using the DB2 Call Level Interface (CLI) in your applications to access DB2 databases, refer to the CLI Guide and Reference. If you want to use the DB2 APIs in your application programs, refer to the API Reference. To help you decide which DB2 programming interface or programming method meets your requirements, refer to the Road Map to DB2 Programming.

You can access data using embedded SQL statements, (as discussed in this book), or the DB2 Call Level Interface (DB2 CLI) as discussed in the CLI Guide and Reference. DB2 CLI may provide some data access capabilities that may not be available through embedded SQL. Capabilities such as the use of scrollable cursors and the use of multiple result sets in stored procedure applications are only available with DB2 CLI. See the discussions in the Road Map to DB2 Programming and in "The DB2 Call Level Interface (CLI)" to help you decide whether to use embedded SQL or DB2 CLI.

Your programs can perform database manager administration tasks by calling the DB2 Application Programming Interfaces (APIs). These APIs are discussed in detail in the API Reference.

Applications can also be developed where one part of the application runs at the client and another part runs at the server. This technique is discussed in Chapter 5. "Writing Stored Procedures".

There are object-based extensions to DB2 that you can use to enhance your DB2 application programs by making them more powerful, flexible, and active than traditional DB2 applications. The extensions include: large objects, user-defined distinct types, user-defined functions, and triggers. These features of DB2 are described in Chapter 6. "Using the Object-Relational Capabilities", Chapter 7. "Writing User-Defined Functions (UDFs)", and Chapter 8. "Using the Active DBMS Capabilities".

References to 'DB2' in this book should be understood to mean the 'DB2 Universal Database' product. References to DB2 on other platforms use the specific product name (such as DB2 for MVS/ESA or DB2 for AS/400).


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]

[ DB2 List of Books | Search the DB2 Books ]