Couto
Couto

Reputation: 853

How to store a 250mb database in an Offline Web App

Ok, maybe i'm not seeing the whole picture or something, but i kinda need a brainstorm.

So the purpose is to make a webapp (HTML5, CSS, Javascript) that has to search on a 250mb database without any internet connection, so.. yes the database has to be on the client side.

The hard part here is, this App has to work on an iPod or iPhone without internet connection. (An initial connection to download the App is ok), LocalStorage has a 5mb limit, couchDB would be great since they have an webapp easily accessed by Javascript (privacy concerns don't matter at this point), so i'm pretty much out of ideas....

Does anyone see an alternative, or solution for the purpose?

Upvotes: 2

Views: 3449

Answers (2)

Beachwalker
Beachwalker

Reputation: 7915

I think you should use the tools best fitting for the job... and this seems to be a client-app-job. Here is a small tutorial how to use a database (sqlite) on the iPhone and you should be able to use any other embeddable database availalable for the iPhone/iPad, too.

Sqlite on the iPhone Tutorial

If you are really forced to use HTML5 and the web widget stuff you mentioned above you wil have the option to embed a browser window into a native app and react for url changes or post/get messages.

Upvotes: 1

tster
tster

Reputation: 18257

It's not possible to store a 250MB database in 5MB of storage.

Possible work-arounds:

  1. If you know about your data, you can write a specialized compression algorithm.
  2. Store only a subset of the data offline which you think that user will use. If they need other data, then they will need to connect.
  3. Don't include images, sounds, videos, etc. in the offline data, but include all the text. 5MB will hold a lot of text, but not very many pictures and graphics.

Upvotes: 1

Related Questions