On Wed, 1 Aug 2001, Phun Lee wrote:
> Hi,
>
> I'm designing my database and I'm unclear on a few
> things, and have found no answers in the docs...hoping
> somone can clear these up...
>
> 1)
> I see quite a few people using a "packed" and
> "unpacked" record structure system for databases.
>
> The packed structure is usually a smaller structure
> with fewer memebers and the data is just concatenated
> into the fewer memebers.
>
> Supposedly this saves space but I don't see how that's
> the case.  After you've populated your sturcture, just
> before writing Why not just use
> sizeof(SomeStructure) then open your record to that
> size and do your thing?


Using a packed structure saves space because each record requires some
header information to keep track of it.  Granted, this is a pretty small
amount, but the main benefit comes when you have many many small records.
If youre records are medium or large in size, it's probably better to use
1 record per record.


> 2)
> Is there a max record size, or is it only limited by
> the storage left on the device?

Yes, there's a limit, which is actually explained in the docs, but it's
slightly less (31 bytes) than 64K.


> 3)
> Are there a max number of records per database or is
> that again only limited by storage?

Yes, there's a max, but I don't remember what it is.  This is also talked
about in the docs somewhere.

> thanks very much for any help!
>


-- 
Brian Mathis
Direct Edge
http://www.directedge.com


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

Reply via email to