MongoDB 3.4 continues the trend of databases building out support for a range of conceptual data models over the same underlying data store. This multimodel approach aims to deliver a single database that can be used to store data as documents, tables, and graphs simultaneously. The benefit to the user is a dramatically simplified infrastructure when compared to a polyglot persistence model, which might entail managing three or four separate data stores to satisfy those different use cases.
MongoDB 3.4 introduces the ability to perform recursive graph queries. It was co-released last November with version 2.0 of the BI connector, which provides the ability to query MongoDB using a SQL interface through tools like Tableau and Qlik. Also, aggregation operators were added to greatly enhance the ease and performance of facet-style interactions.
New and improved infrastructure features have been released in addition to this expanded query model. Most notably, updates to the v1 replication protocol have enabled MongoDB to pass previously failing Jepsen tests, meaning that MongoDB 3.4 should prevent stale reads, dirty reads, and lost updates.
Recursive searches are now available in the aggregation pipeline, allowing you to perform certain types of graph searches on a collection. The new
$graphLookup aggregation operator lets you define a subquery to join documents with each input document and a maximum depth on which to perform these joins. For example, imagine a collection that contains documents describing people, where one of the fields in each document is a list of children identified by their Social Security number. One such document might look like this:
To continue reading this article register now