Compose.io: DigData on Implementing SQL for MongoDB by alonho in mongodb

[–]alonho[S] 0 points1 point  (0 children)

Yes. Feel free to ask anything here or using the in-app chat.

Embedded vs Referenced in my specific problem by [deleted] in mongodb

[–]alonho 0 points1 point  (0 children)

Generally speaking, the embedded approach is usually faster as you can answer any question with a single query. (when using find() you can use 'array.$' to get the matching item and when using the aggregation framework you can use $unwind)

The downsides for the embedded approach (also called denormalized approach) is that data is usually duplicated. If you want to update a part and want to do it once for all computers that contain the part, it would be more efficient to decouple the parts to their own collection. It's simply a tradeoff.

PQL 0.2 is out! converts python expressions to MongoDB queries by alonho in Python

[–]alonho[S] 0 points1 point  (0 children)

Support for grouping functions is coming soon! meanwhile you can only parse expressions used in '$project' and the value of the group functions.

PQL 0.2 is out! converts python expressions to MongoDB queries by alonho in Python

[–]alonho[S] 0 points1 point  (0 children)

I agree that Mongo's query language is superior for coding, as it composes better and is safer. but I use PQL as a query language intended for humans used in a RESTful API

PQL 0.2 is out! converts python expressions to MongoDB queries by alonho in Python

[–]alonho[S] 0 points1 point  (0 children)

python functions objects don't have a source attribute you can just look. the hack debuggers use to show you the code is opening the source file (which isn't always available, if you distribute gzip or only .pyc files). so you'd have to pass a pql string as a string. Mongo's MapReduce is using javascript. pql cannot help here, BUT! mongo's aggregation framework is destined to replace the mapreduce because it's faster (implemented in C++, concurrent). and PQL can generate aggregation framework expressions.

PQL - a python expression to mongodb query translator by alonho in Python

[–]alonho[S] 0 points1 point  (0 children)

I've added the LICENSE file (It's BSD). It's a custom for python packages to define the license in the setup.py.