The sql.js library will enable you to call SQL queries on the client side. with that libray, you can easily stream the whole data between the server and the client by calling .open(data) and .exportData(). this is very handy.
in addition HTML5 has storage capabilities, but as new technology standard, you can not assume that all the clients will support that.
Lawnchair is very good option if you are not stuck with SQL, as it gives an easy to use key/value approach. these two libraries make a complete solution for working with sql database on client-side.
Another good storage library is jstorage. it can be used to conserve the data from the "sql.js" on the client. It supports a large variety of browsers (including mobile browsers, and IE7 and IE7 !), and even survives browser crashes.