title: Hybrid mobile app local storage
body: <p>I am making an offline game app using Phonegap. I used to store everything online for my previous web app projects, but this time I want to try local storage.</p>
  
  <p>I see there are couple of options for Phonegap:</p>
  
  <pre><code>- WebSQL, it seems just a SQL database.
  - IndexDB, which is not fully supported by Phonegap
  - File system. I mean I can cache the data on the device's local file system in my own pattern like most of the PC games do.
  </code></pre>
  
  <p>Suppose it is a RPG game and I need to store maps, characters, characters' items, characters' relative position in their map, etc...So I may often need to joint 4~5 tables in a relational database and deal with thousands of records. Is it going to be a heavy burden for WebSQL? If I use WebSQL, how will it be stored on the device's file system? If WebSQL, how can I let the app load the initial settings of the game when the app is running its first time?</p>
  
  <p>I am also wondering how to load these data during the runtime of the app. Do I cache everything into the memory when the app is initialized, or only retrieve the piece of data I need when I need to use it? </p>