How can I create localStorage database in apache cordova

1

Good afternoon,

I wanted to know in what way I can create a localstorage database because I have had problems when doing it with IndexedDb because I can not relate two tables to each other.

    
asked by Aaron VC 15.04.2016 в 18:43
source

1 answer

3

When you create a db on the client side in html you do not have a relational model like you would when you use Sql Server, Oracle, MySql, etc., it is a reduced model NoSql style, where the entities are not related.

IndexedDB Basic Concepts

Alli mentions

  • IndexedDB is object oriented. IndexedDB is not a relational database, with tables, rows, and columns.

  • IndexedDB does not use SQL (Structured Query Language) . Instead it uses queries on an index that produce a cursor. This one can
    used to iterate over the result set. Here is where check the NoSql system

Basically you should design the data based on NoSql concepts, where you record object structure.

If you want to maintain a relationship between these you could persist a complex object where the entity and its relations are in the same object that you persist.

In summary, there is no relational database on the client side in html.

    
answered by 15.04.2016 в 21:08