admin管理员组

文章数量:1419234

I need some database functionality for our intranet at work, but I am severely limited in my options. My only scripting tools are JavaScript/JQuery.

I was wondering if it would be possible to use SQLite with html5 and JS/JQ?

Thanks for all the pointers in the right direction!

Desired usage:

I wish to port in a large excel sheet in the db file, and run queries and return row results in the intranet page.

I need some database functionality for our intranet at work, but I am severely limited in my options. My only scripting tools are JavaScript/JQuery.

I was wondering if it would be possible to use SQLite with html5 and JS/JQ?

Thanks for all the pointers in the right direction!

Desired usage:

I wish to port in a large excel sheet in the db file, and run queries and return row results in the intranet page.

Share Improve this question edited May 12, 2015 at 16:41 JonYork asked May 12, 2015 at 16:29 JonYorkJonYork 1,2438 gold badges32 silver badges52 bronze badges 3
  • 1 No, it's not possible to use SQLite with just Javascript alone. What exactly do you mean with "some database functionality"? What exactly are your requirements? How much data do you need to store? Do you need to share it between browsers? What queries do you need to perform on the data? – Philipp Commented May 12, 2015 at 16:30
  • 2 YOU CAN! use github./agershun/alasql – user757095 Commented May 12, 2015 at 16:33
  • @Philipp it is possible to use sqlite from the browser. You can use something like bookshelf.js, check bookshelfjs/#faq although i dont remend it outside a server enviroment either. The native localStorage will do the job in most scenarios – devconcept Commented May 12, 2015 at 16:38
Add a ment  | 

2 Answers 2

Reset to default 3

Yes it's possible, there are some libraries on the web. For example, the library sql.js is a port of SQLite to Javascript.

There are many options to solve this problem:

  1. There are some packages, which can read data from XLSX file directly, for example: js-xlsx library, where you can retrieve data directly from Excel table (so, you do not need to use SQLite). It takes some time to read whole Excel, but you can keep your XLSX alive.

  2. You can install simple node server for your intranet with SQLite package. This is a fastest way, because the client version of SQL.js loads whole file with database, which can be much bigger than original XLSX file.

本文标签: jqueryHtml5Javascriptsqlite for intranetStack Overflow