Note that there are some explanatory texts on larger screens.

plurals
  1. POMultiple inequality conditions (range queries) in NoSQL
    text
    copied!<p>I have an application where I'd like to use a NoSQL database, but I still want to do range queries over two different properties, for example <em>select all entries between times T1 and T2 where the noiselevel is smaller than X</em>. On the other hand, I would like to use a NoSQL/Key-Value store because my data is very sparse and diverse, and I do not want to create new tables for every new datatype that I might come across.</p> <p>I know that you cannot use multiple inequality filters for the Google Datastore (<a href="http://code.google.com/appengine/docs/python/datastore/queriesandindexes.html#Inequality_Filters_Are_Allowed_On_One_Property_Only" rel="nofollow noreferrer">source</a>). I also know that this feature is coming (according to <a href="https://stackoverflow.com/questions/3021030/how-to-effectively-run-two-inequality-filters-on-queries-in-app-engine/3021407#3021407">this</a>).<br> I know that this is also not possible in CouchDB (<a href="https://stackoverflow.com/questions/1036828/does-couchdb-support-multiple-range-queries/1049896#1049896">source</a>).</p> <p>I think I also more or less understand why this is the case. </p> <p>Now, this makes me wonder.. <strong>Is that the case with all NoSQL databases?</strong> Can other NoSQL systems make range queries over two different properties?</p> <p>How about, for example, Mongo DB? I've looked in the Documentation, but the only thing I've found was the following snippet in their <a href="http://www.mongodb.org/display/DOCS/Advanced+Queries" rel="nofollow noreferrer">docu</a>:</p> <blockquote> <p>Note that any of the operators on this page can be combined in the same query document. For example, to find all document where j is not equal to 3 and k is greater than 10, you'd query like so:</p> <pre><code>db.things.find({j: {$ne: 3}, k: {$gt: 10} }); </code></pre> </blockquote> <p>So they use greater-than and not-equal on two different properties. They don't say anything about two inequalities ;-)</p> <p>Any input and enlightenment is welcome :-)</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload