How to store emails??

Problems with WiFi, SQLite ,Bluetooth, WiMax, Proxies, etc...

How to store emails??

Postby upensabnis » Wed Aug 27, 2008 9:28 am

We are developing an email client. We need to store mails in our database on client side. What data type should we use to store mails in database?? My mails may contain text,images, multi media files or attachments. So suggest us proper solution. :?:
upensabnis
Junior Developer
Junior Developer
 
Posts: 18
Joined: Wed Jul 16, 2008 5:12 pm

Top

Postby cgreen » Wed Aug 27, 2008 11:09 am

text-only emails could be easily stored as a string.
data files is getting tricky. if you have a solution or idea, pls post it here.

afaik sqlite is typeless. just store any data into any table whereever you want :)
but it just ain't working with androids java classes
User avatar
cgreen
Experienced Developer
Experienced Developer
 
Posts: 56
Joined: Wed Jul 16, 2008 10:16 am

Postby upensabnis » Wed Aug 27, 2008 6:02 pm

thanks cgreen for the reply.

one of my senior told me to use object oriented approach of database. so will it be a proper solution?? can we use object oriented approach in SQLite??
upensabnis
Junior Developer
Junior Developer
 
Posts: 18
Joined: Wed Jul 16, 2008 5:12 pm

Postby cgreen » Wed Aug 27, 2008 7:09 pm

uh... Object DBMS like db4o ? ive no experience with something like that. www.db4o.com
or hes referring to object-relational mapping, which is more common. this might be possible...
User avatar
cgreen
Experienced Developer
Experienced Developer
 
Posts: 56
Joined: Wed Jul 16, 2008 10:16 am

Postby upensabnis » Tue Sep 02, 2008 4:21 pm

thanks cgreen..
i searched further with my query... but many of them told me to store link of the mail in the database.... and not the entire email... wat say??
upensabnis
Junior Developer
Junior Developer
 
Posts: 18
Joined: Wed Jul 16, 2008 5:12 pm

Postby cgreen » Wed Sep 03, 2008 1:55 pm

ok, thats a good idea, if youre not supposed to store the email permanently on a mobile device... you won't, thats common sense :)

you still have 2 options:
retain a url to a webbased email service: thats easy, if the web service is already available
or
store the emails into files...

[thinking aloud] write the entire email into a file with a string identifier
store the identifier into the database
maybe create a sdcard for more storage...
you will even be able to store binary data :)
give it a try
localhost is the android emulator
User avatar
cgreen
Experienced Developer
Experienced Developer
 
Posts: 56
Joined: Wed Jul 16, 2008 10:16 am

Top

Return to Networking & Database Problems

Who is online

Users browsing this forum: Google Feedfetcher and 4 guests