Database creation

2003-02-17 Thread Brian Toothill
I'm developing an application that has a lot of read-only information (lots
of text).  What is the best way of creating/storing all of this information?
Should I create a single database, with all the text in it?  Or is there a
better way?

--
Brian Toothill



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



Database creation

2004-02-17 Thread druid
Im confused about creating a database
When you use
Err err = DmCreateDatabase(DB_CARDNO, DB_NAME, DB_CREATOR, DB_TYPE, false);
this creates a database but no fields are defined
How do you actualy define the fields in the database
thanks

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


Re: Database creation

2003-02-17 Thread Oliver
> I'm developing an application that has a lot of 
> read-only information (lots of text).  What is 
> the best way of creating/storing all of this 
> information? Should I create a single database, 
> with all the text in it?  Or is there a better 
> way?

To PalmOS it doesn't really matter much how you
structure the data in your database(s).  You should
think about how you'll use the data once it's in the
database(s).  In the apps I have worked on, the
ability to quickly retrieve or manipulate data in
the databases has had a significant impact on the
structure of the database(s).

Oliver


__
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day
http://shopping.yahoo.com

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



Re: Database creation

2003-02-17 Thread Dave Lippincott
You could always put the necessary text on an expansion card as CSV, text or
whatever.  Modify your Palm app to read the data from the card.  That way
you won't have to worry about the db structure or about Palm record size
limitations.
If the target device doesn't have an expansion slot, the Palm db format you
put your data in shouldn't matter much unless you need to sync it up to the
host PC/Mac.  (In this case, the fewer total # of records the better.)

- Original Message -
From: "Oliver" <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Monday, February 17, 2003 12:40 PM
Subject: Re: Database creation


> > I'm developing an application that has a lot of
> > read-only information (lots of text).  What is
> > the best way of creating/storing all of this
> > information? Should I create a single database,
> > with all the text in it?  Or is there a better
> > way?
>
> To PalmOS it doesn't really matter much how you
> structure the data in your database(s).  You should
> think about how you'll use the data once it's in the
> database(s).  In the apps I have worked on, the
> ability to quickly retrieve or manipulate data in
> the databases has had a significant impact on the
> structure of the database(s).
>
> Oliver
>
>
> __
> Do you Yahoo!?
> Yahoo! Shopping - Send Flowers for Valentine's Day
> http://shopping.yahoo.com
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/
>



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



Re: Database creation

2003-02-18 Thread Brian Toothill
Thanks for your reply.

Let's assume the target device has no expansion card.  So what's the best
way for me to 'create' my initial database?  Do I have potentially huge
arrays of data in my C source code files?  Do I write a separate Palm
application to create a database?  Do I use string resources?

How do 'you lot' store large amounts of read-only data?

--
Brian Toothill



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



Re: Database creation

2004-02-17 Thread Ben Combee
At 07:27 AM 2/17/2004, you wrote:
Im confused about creating a database
When you use
Err err = DmCreateDatabase(DB_CARDNO, DB_NAME, DB_CREATOR, DB_TYPE, false);
this creates a database but no fields are defined
How do you actualy define the fields in the database
You don't.  Standard Palm OS databases do not have fields.  Instead, think 
of the database as an array of binary objects, where each binary object it 
just a memory handle pointing to a chunk of data.  The interpretation of 
the chunk is up to the program; the OS doesn't do any interpretation for 
you.  There actually are a couple of fields in the chunk header -- a unique 
ID for the record and a few bits to set a category, but other than that, 
it's just data.



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


RE: Database creation

2004-02-17 Thread Girish NS
Hi,

First of all palm database is not exactly a database. Writing to palm
database is like writing a structure to a file using fwrite() function
in c.

Going by this logic, U will be having a structure for which u will
create a instance and fill the data members. Using DmNewRecord() u will
get a memory handle to the new record. U will lock the memory handle and
using Dmwrite() u will assign the instance of structure to the memory
handle and unlock the memory handle. After that u will use
DmReleaseRecord() to release the record u have newly created.

Hope this helps...

Girish.


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of druid
Sent: Tuesday, February 17, 2004 6:57 PM
To: Palm Developer Forum
Subject: Database creation

Im confused about creating a database
When you use
Err err = DmCreateDatabase(DB_CARDNO, DB_NAME, DB_CREATOR, DB_TYPE,
false);
this creates a database but no fields are defined
How do you actualy define the fields in the database
thanks

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


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


Re: Database creation

2004-02-17 Thread Dave Lippincott
You may be confusing the Palm file structure (referred to as a 'database')
with a traditional database with tables.
Read over the 'Data and Resource Manager' section in the SDK reference.  You
should also look over a few of the examples included in the Palm SDK.
(hint: reading about DmNewRecord or DmAttachRecord would help)

- Original Message - 
From: "druid" <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Tuesday, February 17, 2004 8:27 AM
Subject: Database creation


> Im confused about creating a database
> When you use
> Err err = DmCreateDatabase(DB_CARDNO, DB_NAME, DB_CREATOR, DB_TYPE,
false);
> this creates a database but no fields are defined
> How do you actualy define the fields in the database
> thanks
>
> -- 
> For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/
>



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