5 ms·
Ok, so write me a query that shows me which orders were placed for a specific widget within a date range for a customer belonging to a particular company where
by jawngee 17y ago
Ok, so write me a query that shows me which orders were placed for a specific widget within a date range for a customer belonging to a particular company where the payment is still being processed.
You say it yourself: (IRL it's never that simple, but...)
What's the but?
And I'm still not certain how different applications access a NoSQL store without clobbering each other, where RDBMS systems enforce regulated access.
- smcq 17y agoDo the same thing you would do in SQL, run the efficient query (you're almost guaranteed have a view for date limited for a specific customer) then filter it based on product. This is exactly what your RDBMS does, and I don't see how you're gaining anything except a different language.
- wvenable 17y ago2 words: Query Optimizer http://en.wikipedia.org/wiki/Query_optimizer http://en.wikipedia.org/wiki/Query_optimizer If you think you're doing exactly that an RDBMS does, you're kidding yourself. Even if you do, you're still wasting effort re-coding something that already exists. The fact is, running the query on the order and filtering on the product may not be the most efficient way of getting the data. It might be faster query on the product and then filter based on the order. RDBMS's make those sorts of decisions all the time.
- smcq 17y agoLook, I'm not going to argue with you because you have no idea what you're talking about. Go away.
- viraptor 17y ago"... but I'll show a trivial example, because methods of orders processing and querying could take a whole blog post." The key to such query is using the correct data representation, and the query itself is no different to the previous one: condition and condition and [...] You can solve the date + payment being processed by first getting a list of orders satisfying those conditions and then checking which of them have the widget you need. That's still only 2 queries (if the db can handle multi-key get). It's not slow/complicated/whatever and it's more or less what your typical RDBMS will do. How often do you write complicated new queries IRL? Stopping document stores from clobbering each other? Reader/writer locks if you're working on a local store. Or setting up an arbitrating db access manager if you're working on a remote one. Exactly the same as SQL servers (SQLite and any RDBMS respectively)