The Database interface represents the database. This interface provides methods for changing a database on the BlackBerry device, including methods for creating SQL statements to add, delete, or update records in the database and methods for committing and canceling transactions in the database. This interface also provides methods for setting and retrieving the database's metadata.
To create the database, you can use one of the methods of the DatabaseFactory class.
The sample application uses this interface to create statements to insert, delete, and update records in the database.
The Statement interface represents an SQL statement. You can use the Statement interface to retrieve, add, delete, or change entries in the database.
The Cursor interface provides methods for traversing a result set that is retrieved using the Statement object. A Statement object creates the Cursor object using the Statement.getCursor() method as part of its query process. Therefore, a Cursor is always associated with a specific query.
The Row class represents a row in a result set that a SELECT query returns.
This class provides methods for retrieving column indices in the Row object and the values stored in the Row object's columns.
You create this class using the Cursor.getRow() method.
The DatabaseFactory class provides methods for creating, opening, configuring, and deleting a new or existing Database. Configuration options include persistent or nonpersistent storage and encryption.
To create a new database, you must use the DatabaseFactory.openOrCreate() method or the DatabaseFactory.create() method. If you have already created the database, the DatabaseFactory.openOrCreate() method returns a reference to the database.