|
|
|
|
|
|
|
|
Harness the power of databases on your Palm handheld (continued)
Designing your own database When designing your own database, think in terms of lists of items (that is, records) with columns (that is, fields). Or think of your database as a collection of preprinted index cards with field names and blanks for you to fill in.
Note that since this article is generic and not about a specific program, such as HanDBase, JFile, MobileDB, or ThinkDB, you'll have to refer to the documentation provided with your program on how to create a database.
Decide on fields that you need for each record. Fields can have different data types, depending on the particular database program you're using. Most database programs have text or string, number, yes/no, date, and time. Some of the more sophisticated programs have upwards of 20 field types. You can also set defaults for a field. You might want a date field to default to today's date. You could set the default for state to your home state if that's what's entered most of the time. Some database programs let you create pop-up or pull-down lists so you can select from a list, just as you can with Categories in the standard Palm applications.
Once you decide on the fields and their types, use your database program's create or define function to add the field names and data types to the database design. You can add defaults and pull-down lists later if you choose not to bother with them during the early design stage.
Lastly, start adding data. You may have created a database where you download the data from an existing table or spreadsheet on your PC. Again, follow the directions for your particular database program on how to do this.
Sample databases Finally, I'll present two example designs that you can use as the basis for your own databases. The method I use is to show one example record for the database I'm describing. First is the capitalized field name followed by the example field contents. I capitalize the field name to help you distinguish it from the field contents. But don't feel that you have to use upper case for the field names. You don't.
Client billing
This database is used to generate an invoice for a client at the end of each billing period. This database has a default date field that fills in today's date when you create a new entry. As you start and stop each activity, note the time in the START and END fields. Create pull-down lists for the PROJECT and COMPANY CODE fields. The billing RATE can default to a fixed amount if you bill the same for each client, or you can have a pull-down menu for listing all of your various billing rates.
DATE: 5/23/2001
START: 9:00
END: 10:30
PROJECT: Universal Widget
ACTIVITY: Design bifurcated turbulator
COMPANY CODE: UWC
RATE: 85.00
EXPENSE:
|
For out-of-pocket expenses, you fill in a new record leaving the START and END times and the RATE blank. List the expense item under ACTIVITY and fill in the dollar expense amount in the EXPENSE field:
DATE: 5/23/2001
START:
END:
PROJECT: Universal Widget
ACTIVITY: Purchased 5 triambulators
COMPANY CODE: UWC
RATE:
EXPENSE: 525.95
|
|
|
|
|
|
|
|
|
|
|
|