Writing a database application for PDAs
Published: 30 Aug 2002 15:47 BST
To demonstrate the process of creating a database application, we'll walk through an app that tracks movie information, such as a synopsis and ratings. Figure A outlines the class inheritance hierarchy and provides an overview of the application architecture. Notice the addition of an independent CDatabase class and CRecord class.
Figure A
Class inheritance hierarchy
The three main property pages are:
- CPropPage1: Overview--This is used to view the list of movies and their ratings. The user can also delete records from this dialogue by tapping and holding on a movie (Figure B).
- CPropPage2: View Movies--This allows the user to navigate backward and forward through the records in a read-only fashion (Figure C).
- CPropPage3: Add Movie--This allows the user to add a record to the database (Figure D).
Figure B

Deleting a record from the database
Figure C

Viewing movies
Figure D

Adding a movie to the database
The Database API encompasses the CDatabase class and the movie record structure within the CRecord class. Figure E illustrates the composition of the components.
Figure E

Class association and composition




