开发者

Appropriate DB solution for browser-based interactive query tool

开发者 https://www.devze.com 2023-03-26 21:42 出处:网络
I am working on an interactive query application for data records that look like this in a CSV file: w1 w2 ... , w3 w4 w5 ... , f1, f2, f3, f4

I am working on an interactive query application for data records that look like this in a CSV file:

w1 w2 ... , w3 w4 w5 ... , f1, f2, f3, f4

where the first and second field contain phrases comprised of 1-15 words, and the rest (n1, n2 ...) are simply floating point numbers ("features"). The data can contain as many as 2-5 million such records.

I want to build a browser-based, standalone interactive querying app where I can run queries such as:

  • find N records (10 < N < 100) where the first (second) field is of length 5 words or less
  • find N records where the first (second) field contains a specific string
  • find N records with the highest (lowest) values for feature f1 (or f2/f3/f4)
  • find N records where the first field is longer (shorter) than the second field
  • ...

I would like to use jquery to build the interactive part of this tool and, therefore, I figure that I need to use something like MongoDB to store the (JSON-formatted) data which I can then query using javascript. However, I am not sure whether it is even possible to use entirely local, client-side databases with JavaScript inside a browser. I am also not sure whether MongoDB can deal with queries like this for the data sizes that I will be dealing with. I am a complete novice at stuff like this so it is entirely possible that I may have missed something开发者_JAVA技巧 that's much more appropriate to this situation.

Thanks in advance!


I would think many local client browsers would run out of memory at that scale. I'd use Ajax to pass the queries back to some more traditional server-side database technology.


If you are developing this for an in-house type of project, you could definitely look into HTML5 client-side storage.

See:

  • http://www.webkit.org/blog/126/webkit-does-html5-client-side-database-storage/
  • https://developer.mozilla.org/En/Storage
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号