PHP/Mongo – Using JOIN in queries

I’ve written one post about MongoDB and PHP about creating nested set model in this database, but there is another interesting topic: using JOINs in mongo queries. Sorry, wh… what? Joining tables in non-relational database? Yes, it’s possible and we can do this to collect much more data in only one, but more complicated query. Let’s start to see how we can achieve this.

Continue reading “PHP/Mongo – Using JOIN in queries”

PHP/Mongo – Nested set model

Last time I created some structure for linking different elements from similar groups. This project needed high performance and easy way to get elements hierarchy, but changes are not often. After consideration I decided to implement nested set tree model to do this. All is based on PHP and use Mongo database and I would like to show you some basis operations with that. It can be helful in some cases, and that model is very efficient in read operations.

Continue reading “PHP/Mongo – Nested set model”