In article <88991@palm-dev-forum>, [EMAIL PROTECTED] says...
> 
> I'm writing a simple vector drawing program.  I need the ability to store
> and retrieve multiple drawings.   Each drawing has simple entities (lines,
> arcs, etc.) that are stored in vector format.
> 
> I've been going under the assumption that each drawing would be a Database
> and that each entity in the drawing would be a Record.  So, if the user has
> 5 drawings stored on the device, there would be 5 Databases (one for each
> drawing), and each Database may have any where from a couple dozen to
> several hundred records (one record for each line, arc, etc.).
> 
> But, I'm starting to think I'm way off base in the way Databases and Records
> are intended to be used.  I.e., that I should have a single Database
> associated with my App, and that each drawing corresponds to a single
> Record.  E.g., if the user has 5 drawings stored on the device, then there
> would be 5 Records in the one Database.  Is this more in line with how
> Databases and Records are suppose to be used?

Either way is fine... the database mechanism on the Palm is very 
flexible, and it doesn't impose a particular policy.

Since you're treating these drawings as separate items, I would favor 
making each one its own DB.  It would simplify your IR beaming code, and 
also expose drawings to apps like Filez and RsrcEdit.  This is the 
technique that most DOC readers use.

However, I'd still consider using a packed record format within each DB.   
A record has overhead in memory, so if will be more efficient to get as 
more UI elements packed into a single record than scattering them 
through a bunch of records.  Reducing the record count will also make 
the HotSync process take less time.
-- 
Ben Combee <[EMAIL PROTECTED]>
CodeWarrior for Palm OS technical lead
Get help at http://palmoswerks.com/

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to