0

I tried to establish some document references in the no-sql database MongoDb.

It turns out that the document reference DbRef is kind of an outdated features and that it is poorly supported by available tooling (for example Navicat does not allow to click on DbRef to resolve it).

I would need to run custom queries on the client to resolve document references. The drivers do not seem to support a way to resolve references / perform joins in a single step.

As a workaround I could use:

  • Mongoose with its populate method (runs two separate queries in the background)

  • The combination of manual reference, $lookup and $unwind. $lookup won't work with sharded collections and always returns its result as array.

Also see the links below.

=> I am wondering if MongDb is the right tool for me or if there is a better alternative out there.

Requirements:

  • No-Sql database
  • Establish document references that can be resolved by queries/tools
  • Programming language: Python or JavaScript
  • Optional: allow to distribute/shard data over several cluster notes

Related:

1 Answer 1

0

RethinkDb offers joins and powerful APIs:

https://rethinkdb.com/docs/table-joins/

Like many traditional database systems, RethinkDB supports JOIN commands to combine data from multiple tables. In RethinkDB joins are automatically distributed—a join command is automatically sent to the appropriate nodes across the cluster, the relevant data is combined, and the final result is presented to the user.

https://rethinkdb.com/docs/introduction-to-reql/

ReQL embeds into your programming language. Queries are constructed by making function calls in the programming language you already know. You don’t have to concatenate strings or construct specialized JSON objects to query the database.

All ReQL queries are chainable. You begin with a table and incrementally chain transformers to the end of the query using the . operator.

All queries execute on the server. While queries are constructed on the client in a familiar programming language, they execute entirely on the database server once you call the run command and pass it an active database connection.

Another alternative might be ArangoDb

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.