Procedure documentationDeveloping Database Applications Locate this document in the navigation structure

 

Most applications use a database to store and manage data. To develop an application running on the SAP MaxDB database, you can choose between several programming interfaces. Some of these interfaces can also be used to access DBM Server and Loader functions.

You can also use a SAP MaxDB database as the database for your SAP system, for example as SAP Business All-in-One. Using SAP MaxDB databases in SAP systems is standardized and is not described in this section.

Prerequisites

You have created a database.

More information: Creating Databases

Procedure

  1. Develop the SQL statements that your application uses to access the database.

    More information:

    Recommendation Recommendation

    • Acquaint yourself with the general recommendations for developing database applications.

    • Formulate your search conditions to be as selective as possible.

      More information: Analyzing Database Performance, SAP Note 819641

    • Use prepared statements. Prepared statements have the following advantages:

      • They achieve better performance when the same prepared statement is executed again.

      • No SQL Injection is possible.

      More information:

    End of the recommendation.
  2. Connect the application to the database via an interface.

    SAP MaxDB Interfaces

    Name

    Driver or Module

    Features

    Prerequisites

    ADO.NET

    SDB.Data.dll

    Executing SQL statements

    Microsoft .NET Framework 2.0

    Backint for SAP MaxDB

    -

    Interface for developing third-party backup tools

    -

    Java

    • com.sap.dbtech.jdbc.DriverSapDB

    • com.sap.dbtech.powertoys.DBM

    • com.sap.dbtech.powertoys.Loader

    (all contained in sapdbc.jar)

    Executing SQL statements (JDBC driver)

    Executing DBM commands

    Executing Loader commands

    JDBC 2.0: JRE 1.2 or JDK 1.2 (for application development)

    JDBC 3.0: JRE 1.4, 1.5 or JDK 1.4, 1.5 (for application development)

    ODBC

    • sdbodbc[w].dll (Microsoft Windows)

    • libsdbodbc[w].so|a (Unix and Linux)

    Executing SQL statements

    Microsoft Windows: ODBC Driver Manager 3.52 or higher and MDAC 2.7 or higher

    Unix and Linux: Link directly to the application or use a driver manager (unixODBC 2.0.9 or iODBC 3.0.5)

    Perl

    • DBD::MaxDB

    • SAP::DBTech::dbm

    • SAP::DBTech::loader

    Executing SQL statements

    Executing DBM commands

    Executing Loader commands

    SAP MaxDB SQLDBC SDK

    Perl 4 (5.6.1)

    Perl DBI (1.2.1)

    PHP

    php_maxdb.[dll|so]

    Executing SQL statements

    PHP 5.2.5 or higher

    Python

    • sdb.sql

    • sdb.dbm

    • sdb.loader

    Executing SQL statements

    Executing DBM commands

    Executing Loader commands

    Python 1.5 - 2.3

    SQLDBC

    libSQLDBC.[dll|so]

    Executing SQL statements

    Developing applications and interfaces

    -

    WebDAV

    webdavServletMaxDB-<version>.war

    Accessing a document store in a SAP MaxDB database using the WebDAV protocol

    Servlet container

    Recommendation Recommendation

    For Java applications:

    • Use the JDBC connection management provided by the container.

    • During deployment, install the SAP MaxDB JDBC driver in the container rather than in the database application.

    End of the recommendation.
  3. Test your application.

    The Messages manual explains database error and information messages and recommends how you can react to them. The messages are sorted by error number.

    More information: Messages

More Information

Concepts of the Database System,