Page 1 of 1

Large initial database

Posted: Thu Aug 20, 2015 9:47 pm
by Bruno Grenier

Hi, i need to initiate the app with a lot of storage (ONLY OFFLINE).
Example:
County 1 - City 1 - User 1
County 1 - City 1 - User 2
County 1 - City 1 - User 3
...
County 1 - City 2 - User 1
County 1 - City 2 - User 2
County 1 - City 2 - User 3
...
County 2 - City 1 - User 1
County 2 - City 1 - User 2
County 2 - City 1 - User 3
...
County 2 - City 2 - User 1
County 2 - City 2 - User 2
County 2 - City 2 - User 3
...
more than 10.000 registers

and the app will access those records during the user uses.

Do i have to use json?? SQLite??
Some example?


Large initial database

Posted: Fri Aug 21, 2015 5:20 pm
by Serhii Kulibaba

Hello Bruno,

The best way is using SQLite (Web SQL). You can use it in generic services.
Example: http://www.tutorialspoint.com/html5/h...


Large initial database

Posted: Mon Aug 24, 2015 5:54 pm
by Bruno Grenier

Thanks Sergiy!
But this way I will create the table, then AFTER I will populate.
I would like to create a pre-populated table.
Like build-in OFFLINE database.
When I launch the application I will only read the data (not create tables, populate tables then to read tables)


Large initial database

Posted: Tue Sep 01, 2015 5:00 am
by Yurii Orishchuk

Hi Bruno,

Unfortunatly you can not prepopulate SQLite with app installing.

But you can implement such logic in your app.

Here is a basic plan:

1 Add JS asset to your APP. Inside this JS asset you need to populate all needed data.

2 In app run (for example "page load" for start page) you need to check whether there needed table inside SQLite.

3 If there is no needed table - you will get all data from JS asset(1st step) and put it into SQLite(simultaneously creating needed tables).

4 if there is needed tables - you can pass 3rd step.

Also you can use some source file in sources tab to load it only in time when it needs. (just to optimize the solution).

Regards.