What is the advantage of working with websql?

4

I was reading about webSql and I had this doubt, what is the advantage of working with webSql since it runs client-side?

    
asked by anonymous 05.02.2014 / 11:58

3 answers

1

WebSQL is a SQLite-based solution, since it is a synchronous request and has implementation restrictions by behind the API was dropped by W3C. However, it is still available in several browsers and is a very good solution for storing data on the client side to reduce the need for constant communication with the server or even work with data that only interests the user on the page or web application. p>

To replace WebSQL with W3C is IndexedDB which is a slightly different solution than usual SQL, but asynchronous and allows the engine that will store the data by the browser is independent of the API of access and writing of this data.

Finally there are JavaScript libraries that allow cross-compatibility between browsers, using the technology available to store the data.

05.02.2014 / 14:31
6

I suspect the real question is: What is the advantage in using client-side databases? (be webSql , or any other technology)

Client-side DBs (such as Webstorage referenced by @utluiz) should be used when information is too complex to use cookies, and when information is transient / transient / momentary.

In these cases, when you use BD in the client browser, the pressure on the server decreases. Instead of storing a large amount of data on the server, small amounts of data are stored on multiple clients.

In Portugal we have an expression: " distribute the evil by the villages ";)

    
05.02.2014 / 12:24
3

I may be wrong, but today it does not seem to have any advantage, as the standard-keeping body (W3C) has abandoned the project because of a lack of variety of implementations. It seems that all browsers used SQLite.

The current W3C recommendation is to use Webstorage .

Sources: W3C and Wikipedia

    
05.02.2014 / 12:16