Storing data in SQLite databases
SQLite is a relational database management system. With a code footprint of roughly 300 KB, SQLite is well suited to small devices such as smartphones. In addition, SQLite makes efficient use of memory, disk space, and disk bandwidth; and SQLite databases require no maintenance from a database administrator.
To create and use SQLite databases in your Java app, you must use the Database API, which is the net.rim.device.api.database package.
The Database API implements SQLite databases in a way that might be slightly different from what you're used to. To improve efficiency, SQLite runs as a service on the BlackBerry smartphone. Database operations use a runtime bridge to transfer data between Java and native code. For more information, see Performance of SQLite databases.
BlackBerry Device Software 7 uses SQLite 3.7.2. For more information about SQLite, see www.sqlite.org.
Viewing SQLite databases
SQLite database viewers are available from third-party vendors. These viewers can be useful aids to your database development process. Database viewers are especially useful for viewing changes to a database. When you run an SQL statement, you can see the result in the database viewer immediately.
An SQLite database viewer runs on your computer, not on the smartphone. To use the viewer, configure the BlackBerry Smartphone Simulator to emulate a microSD card. When you run your application, your database viewer reads the database from a folder on your computer.
SQLite database viewers cannot work on encrypted databases. You can encrypt the database after you complete your SQLite application.
Simulate a media card
To view SQLite databases in a database viewer, you might have to configure the BlackBerry Smartphone Simulator to emulate a media card. By default, database files are stored on a media card.
Create a folder on your computer to store emulation files for the media card.
In the BlackBerry Smartphone Simulator, on the Simulate menu, click Change SD Card.
Click Add Directory.
Navigate to and click the folder you created.