> > I come from a relational database background 
> > so I automatically just put them in 2 databases 
> > for my app. Each structure is about the same size 
> > in each table, probably on average between 1 and 
> > 2k.  Now i've realised that when i want to 
> > retrieve the order lines, i need to go
> > through every record in the database to discover 
> > the appropriate ones.

> If you index (i.e., "sort") OrderLines by the 
> order number, I don't think you'd have to go 
> through every record to find an order's items.

In fact, it might help you go think about how
relational databases would work.  If you just create
two tables, finding a record in table 2 that has the 
order number of an order in table 1 will likely
require the RDBMS to perform a full-table scan, 
unless you *design* for this case by creating an 
index on the order_number column of table 2.
You have to mimick something like that in your
Palm OS database structures.

And if you end up with a lot of tables with a lot
of relationships, you might be better off using
one of the relational database implementations
on the Palm (Oracle, Sybase, IBM, ...), instead of 
handcoding what amounts to a very specialized 
reimplementation of one.

Oliver

__________________________________________________
Do you Yahoo!?
Y! Web Hosting - Let the expert host your web site
http://webhosting.yahoo.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